agentsclimarketplace

Github pr

Skill forjd/agent-skills/skills/github-pr

Agent skills for GitHub repo hardening, PR creation, and review actioning — portable capabilities for any skills-compatible AI agent

Install
npx -y skills add forjd/agent-skills --skill github-pr

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Create standardised GitHub pull requests using the gh CLI. Use when the user wants to create a PR, open a pull request, submit changes for review, or says things like "PR this", "open a PR", or "submit for review". Enforces conventional commit titles, structured body templates, labels, and reviewers.

SKILL.md

4.6 KB, as published. Nobody here has run it

GitHub PR Creation

Create well-structured pull requests using gh pr create with consistent formatting and conventions.

Prerequisites

  1. gh CLI is installed and authenticated
  2. Current directory is a git repository
  3. Changes are committed and on a feature branch (not main or master)

Workflow

1. Check prerequisites

# Determine branches
current_branch=$(git branch --show-current)
base_branch=${BASE_BRANCH:-$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')}

printf 'current=%s base=%s\n' "$current_branch" "$base_branch"

If the current branch matches the default/base branch, stop before pushing and ask the user to create a feature branch first.

Once on a feature branch, ensure it is pushed to remote:

git push -u origin HEAD

2. Determine PR type

Infer the type from the branch name prefix:

PrefixTypeLabel
feat/, feature/Featureenhancement
fix/, bugfix/Bugfixbug
hotfix/Hotfixbug, priority: critical
chore/, refactor/, docs/, test/Chorechore

If the branch name doesn't match a known prefix, ask the user what type of PR this is.

3. Generate PR title

Convert the branch name to a conventional commit-style title:

  • feat/add-user-authfeat: add user auth
  • fix/login-crashfix: login crash
  • hotfix/null-pointerfix: null pointer

Replace hyphens with spaces. Drop the prefix category from the branch name. Capitalise only where appropriate.

If the branch has a single commit, prefer the commit message as the title instead.

4. Fill the PR body

Read the matching template from assets/ and fill it in based on the changes:

To understand what changed, run:

# See commits on this branch
base_branch=${BASE_BRANCH:-$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')}
git log --oneline "$base_branch"..HEAD

# See the full diff
git diff "$base_branch"...HEAD --stat
git diff "$base_branch"...HEAD

Fill in the template sections with concrete details from the diff. Remove HTML comments. Do not leave placeholder text.

5. Set reviewers

If a CODEOWNERS file exists, read it to identify who should review:

cat .github/CODEOWNERS 2>/dev/null || cat CODEOWNERS 2>/dev/null || cat docs/CODEOWNERS 2>/dev/null

Parse CODEOWNERS conservatively. GitHub accepts usernames and team slugs as reviewers, but not email addresses or comments. If ownership is broad, ambiguous, or path-specific in a way that does not clearly match the diff, ask the user who should review.

Before creating the PR, verify requested labels exist:

gh label list --limit 200 --json name --jq '.[].name'

Only pass labels that exist. If the intended label is missing, ask whether to omit it or create it. Use the --reviewer flag only with validated usernames or team slugs; ask the user when reviewers are ambiguous.

6. Create the PR

gh pr create \
  --title "feat: add user auth" \
  --body "$(cat <<'EOF'
## Summary

Added user authentication using OAuth2...

## Changes

- Added auth middleware
- Created login/logout endpoints

## Test Plan

- Ran full test suite
- Manual testing against staging

## Checklist

- [x] Changes are scoped to the feature described above
- [x] Tests added or updated
- [x] No unrelated changes included
EOF
)" \
  --label "enhancement" \
  --reviewer "username"

Always use a heredoc for the body to preserve formatting.

7. Report back

After creating the PR, show the user:

  • The PR URL
  • Title and labels applied
  • Who was assigned to review

Conventions

  • One PR per feature/fix — don't bundle unrelated changes
  • Keep diffs small — if the diff is large (>500 lines), suggest splitting
  • Draft PRs — use --draft if the work is still in progress
  • Base branch — default to the repository default branch from gh repo view; use --base if targeting a different branch

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.