create-pr
Skill782 starsChanged 7 months agoApache-2.0View on GitHub
Create high-quality pull requests via gh pr create. Use when the user wants to create a PR, submit a PR, open a pull request, submit for review, or push changes for review. Triggers on: create a pr, create-pr, submit a pr, open a pull request, submit for review, make a pr, gh pr create.
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
91 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/vscodetheir own version, first seen Nov 12, 2026
- lohi-ai/babysittheir own version, first seen Oct 5, 2026
- HLND2T/CS2_VibeSignaturestheir own version, first seen Oct 5, 2026
- andeeplus/aplustheir own version, first seen Oct 4, 2026
- moeru-ai/auvtheir own version, first seen Oct 4, 2026
- kdy1/kdy1-scriptstheir own version, first seen Oct 4, 2026
Used with
Projects with it also use create-issue, merge-pr and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
sahinSkillcreate-issue
Also in 9 projects that use this
anderson-c-santosSkillmerge-pr
Merge a GitHub PR after all checks pass. Trigger for: /merge-pr, merge PR, approve and merge, squash merge, ship PR. Verifies CI, draft state, and approvals, then merges with the correct strategy based on branch type.
Also in 3 projects that use this
SentrySkillfix-ci
Diagnose and fix failing CI on a PR. Load repo-setup first.
Also in 6 projects that use this
Microsoft AzureSkillreview-pr
Review a pull request for functional issues, coding guideline adherence, and best practices. Use this when asked to review, inspect, or provide feedback on a pull request (Azure DevOps or GitHub). Proposes comments for user approval before posting.
Also in 21 projects that use this
32103210Skillcreate-rule
Create Cursor rules for persistent AI guidance. Use when you want to create a rule, add coding standards, set up project conventions, configure file-specific patterns, create RULE.md files, or asks about .cursor/rules/ or AGENTS.md.
Also in 3 projects that use this
MicrosoftSkillupdate-skills
Check for and apply updates to installed skill branches from upstream.
Also in 3 projects that use this
Other versions91 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 91
- microsoft/vscode★ 196ksame name
- vercel/next.js★ 144ksame name
- ToolJet/ToolJet★ 41ksame name
- microsoft/aspire★ 6.3ksame name
- docker/docs★ 4.7ksame name
- NeoLabHQ/context-engineering-kit★ 1.7ksame name
- block/berd★ 962same name
- getsentry/toolkit★ 912same name
- warpdotdev/common-skills★ 604same name
- r3bl-org/r3bl-open-core★ 485same name
81 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- update-prSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 11 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 82 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create well-structured, reviewer-friendly pull requests following best practices.
- Distinctive: line 18
Run these checks before anything else:
- Distinctive: line 25
Run git status to check for uncommitted changes.
- Distinctive: line 37
If precommit hooks modify files, re-stage with git add -u and retry (up to 3 times).
- Distinctive: line 47
If there are commits, use the current branch as-is
- Distinctive: line 48
If there are NO commits (branch is at same point as base), this means something went wrong — investigate and fix
- Distinctive: line 65
If the push is rejected (e.g., diverged history after rebase), use git push --force-with-lease -u origin HEAD.
- Distinctive: line 95
Do NOT include any "Generated with Claude Code" footer or bot attribution
- Very specific: line 96
Do NOT include Co-Authored-By lines
- Distinctive: line 100
Write body to a temp file and create the PR:
- Very specific: line 129
If gh pr create fails, diagnose the error and retry with fixes
- Distinctive: line 135
Commit History: If the commit history is messy, suggest rebasing to clean it up before creating the PR.
- Distinctive: line 137
Feedback Requests: If the user mentions wanting specific feedback, add a "Feedback Requested" section to the body.
“Common” is measured: kept by at least 6 in 10 of the 82 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PR Creator
Create well-structured, reviewer-friendly pull requests following best practices.
CRITICAL: This skill MUST always result in a PR being created. Do NOT stop early, do NOT ask the user to run another command first. Handle all prerequisites (committing, branching, pushing) inline and proceed to gh pr create.
Workflow
Step 1: Pre-flight Checks
Run these checks before anything else:
- Verify GitHub CLI authentication — run
gh api user --jq '.login'to confirm the CLI is authenticated. If this fails, tell the user to rungh auth loginfirst and stop. - Determine the base branch — default to
main. If the user specifies a different base, use that. Capture as$BASE_BRANCH.
Step 2: Commit Uncommitted Changes
Run git status to check for uncommitted changes. If there are uncommitted changes, commit them directly — do NOT delegate to another skill or tell the user to commit first.
- Stage changes — run
git add <files>for relevant modified/untracked files. Do not stage.envor gitignored files. - Lint and format — if Python files are staged, run:
Re-stage any modified files.ruff check --fix <files> && ruff format <files> - Commit — write a conventional commit message based on the staged diff:
If precommit hooks modify files, re-stage withgit commit -m "<type>: <description>"git add -uand retry (up to 3 times).
Step 3: Ensure Feature Branch
- Check current branch — run
git branch --show-current. - If on
$BASE_BRANCH, create a feature branch:- Analyze the commits/changes to pick a descriptive name (e.g.,
feat/add-auth,fix/login-bug) - Run
git checkout -b <branch-name>
- Analyze the commits/changes to pick a descriptive name (e.g.,
- If on a different branch, check whether the branch has PR-worthy commits vs
$BASE_BRANCH:- Run
git log $BASE_BRANCH..HEAD --oneline - If there are commits, use the current branch as-is
- If there are NO commits (branch is at same point as base), this means something went wrong — investigate and fix
- Run
Step 4: Sync with Base Branch
- Fetch latest — run
git fetch origin $BASE_BRANCH - Check for divergence — run
git log HEAD..origin/$BASE_BRANCH --oneline - Rebase if needed — if the base branch has new commits:
a. Run
git rebase origin/$BASE_BRANCHb. If conflicts arise, surface them to the user — show both sides and ask which to keep. Do not silently resolve. c. After resolving,git add <file>andgit rebase --continue
Step 5: Push
Push the branch to remote:
git push -u origin HEADIf the push is rejected (e.g., diverged history after rebase), use git push --force-with-lease -u origin HEAD.
Step 6: Analyze Changes and Draft PR
- Analyze — run these in parallel:
git log $BASE_BRANCH..HEAD --oneline— all commitsgit diff $BASE_BRANCH...HEAD --stat— files changed summarygit diff $BASE_BRANCH...HEAD— full diff
- Check PR size — if >500 lines changed, warn the user but continue.
- Draft title — under 70 characters, conventional prefix (
feat:,fix:,refactor:,docs:,chore:). - Draft body using this template:
## Summary
<1-5 bullet points explaining what changed and WHY>
## Changes
<Categorized list of what was modified — group by area/concern>
## Diagrams
<OPTIONAL — include Mermaid diagrams when visual aids clarify workflow or architecture changes>
## Test Plan
<How the changes were verified — manual testing steps, automated tests run, curl commands, etc.>Guidelines:
- Explain why, not just what
- For WIP PRs, use the
--draftflag instead of[WIP]prefix - Include Mermaid diagrams when they clarify workflows or architecture
- Do NOT include any "Generated with Claude Code" footer or bot attribution
- Do NOT include
Co-Authored-Bylines
Step 7: Create the PR
Write body to a temp file and create the PR:
cat > /tmp/pr_body.md <<'EOF'
## Summary
...
## Changes
...
## Test Plan
...
EOF
gh pr create --title "the pr title" --base $BASE_BRANCH --body-file /tmp/pr_body.mdOptional flags:
- WIP/draft: add
--draft - Reviewers: add
--reviewer <handle> - Assignees: add
--assignee <handle>
Do NOT add:
--authorflag (gh uses the authenticated user automatically)- Any
Co-Authored-Bytrailer - Any "Generated with Claude Code" footer
Step 8: Report
- Return the PR URL so the user can review it
- If
gh pr createfails, diagnose the error and retry with fixes
Best Practices
Commit History: If the commit history is messy, suggest rebasing to clean it up before creating the PR.
Feedback Requests: If the user mentions wanting specific feedback, add a "Feedback Requested" section to the body.
Screenshots: For frontend changes, remind the user to add screenshots or recordings to the PR after creation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

