gh-pr
Skill2 starsChanged 43 days agoMITView on GitHub
Create GitHub pull requests with smart title and description from branch commits
- Commits and pushes
4 other projects use a version of this.
Adopted by
Most recently taken up by
- longmajs/claude-skillstheir own version, first seen Oct 15, 2026
- mehdi-dbx/claude-skillstheir own version, first seen Jun 2, 2026
- Cogni-AI-OU/cogni-ai-agent-skillstheir own version, first seen May 19, 2026
- puku0x/agent-skills-testtheir own version, first seen Apr 19, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- Cogni-AI-OU/cogni-ai-agent-skills★ 4same name
- puku0x/agent-skills-test★ 1same name
- longmajs/claude-skills★ 0same name
- mehdi-dbx/claude-skills★ 0same name
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 repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- changelog-bump-verSkill
- gh-copilot-review-readSkill
- gh-copilot-review-resolveSkill
- gh-copilot-reviewSkill
- gh-cr-submitSkill
- gh-issue-fixSkill
- gh-issueSkill
- gh-pr-mergeSkill
- gh-protect-default-branchSkill
- gh-pr-reviewSkill
- gh-releaseSkill
- git-branchSkill
- git-commitSkill
- git-pushSkill
- make-changelogSkill
- mir-skills-installSkill
- mir-skills-updateSkill
- python-venvSkill
- save-planSkill
- session-noteSkill
- work-reportSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
52 rules. 0 are common, 27 are distinctive, and 25 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
27
Distinctive
This author's own choices. Worth a look.
25
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Create concise PR description with summary and 3-5 key changes
- Very specific: line 18
Create GitHub PR using gh CLI and self-assign it to the authenticated GitHub user
- Very specific: line 19
Update root CHANGELOG.md when present with one PR-linked unreleased bullet using the PR URL, then commit and push that changelog update …
- Distinctive: line 23
Use this skill when the user asks to create a GitHub pull request from the current feature branch.
- Distinctive: line 27
Must be on a feature branch (not master/main)
- Very specific: line 30
If gh not installed → error: "GitHub CLI not found.
- Distinctive: line 34
Check current branch: git branch --show-current
- Distinctive: line 35
If on master or main → error message and exit
- Distinctive: line 36
Check for commits ahead of base:
- Distinctive: line 39
If no commits ahead → warn user and exit
- Very specific: line 43
Check if branch exists on remote: git ls-remote --heads origin <branch-name>
- Very specific: line 44
If not on remote: git push -u origin <branch-name>
- Distinctive: line 45
If exists on remote: git push
- Very specific: line 46
If a follow-up changelog sync creates a new CHANGELOG.md commit after PR creation, push that commit to the same branch as well
- Very specific: line 53
If commits use conventional format (feat:, fix:), strip type prefixes
- Distinctive: line 85
Always self-assign the PR to the authenticated GitHub CLI account
- Very specific: line 86
Use --assignee @me with gh pr create
- Distinctive: line 87
Do not derive the assignee from local git config such as git config user.name or email
- Distinctive: line 91
If the agent is working on a GitHub issue in the current session:
- Distinctive: line 92
Check session context for issue number (e.g., working on issue #123)
- Distinctive: line 93
Add issue reference to PR body footer:
- Very specific: line 106
If working on an issue, append Closes #<issue-number> to the description
- Very specific: line 107
Always include --assignee @me so the PR is assigned to the signed-in gh user
- Very specific: line 113
After the PR is created, optionally sync the repository root CHANGELOG.md.
- Very specific: line 117
Only if CHANGELOG.md exists at the repository root
- Very specific: line 118
Only if ## [Unreleased] exists exactly once
- Distinctive: line 119
Only if the unreleased section already contains the target subsection heading
- Distinctive: line 120
If any of the above checks fail, skip changelog editing without failing PR creation
- Distinctive: line 124
After the PR exists and its number is known:
- Distinctive: line 126
Update or insert the single PR-linked unreleased bullet using the PR number and PR URL
- Very specific: line 127
If CHANGELOG.md is unchanged after the sync logic, stop here
- Very specific: line 128
If CHANGELOG.md changed, stage only that file:
- Very specific: line 132
Verify the staged set contains only CHANGELOG.md before committing:
- Very specific: line 136
If any staged path other than CHANGELOG.md appears, warn and skip the changelog commit rather than risking unrelated files in the commit.
- Distinctive: line 137
Create a dedicated changelog commit:
- Distinctive: line 141
If the skill updated an existing bullet rather than adding a new one, use:
- Very specific: line 152
Only create the follow-up changelog commit when CHANGELOG.md actually changed
- Very specific: line 154
Verify the staged set contains only CHANGELOG.md before git commit.
- Distinctive: line 155
Keep the changelog commit dedicated to the changelog sync so the PR history is easy to understand
- Very specific: line 156
If CHANGELOG.md already has unrelated local edits that make the sync unsafe or ambiguous, skip changelog editing and warn the user instead …
- Distinctive: line 157
Do not fail PR creation just because changelog commit or push steps are skipped
- Distinctive: line 161
Write exactly one bullet for the PR in this format:
- Distinctive: line 165
Keep it to one line
- Distinctive: line 166
Use changelog-style wording, not PR-body wording
- Distinctive: line 183
Treat changelog state as one PR = one bullet
- Very specific: line 185
Only move bullets within the ## [Unreleased] section (between its subsections) when the PR's high-level purpose is better represented …
- Very specific: line 186
Never create duplicate bullets for the same PR number within ## [Unreleased]
- Very specific: line 187
If multiple matching bullets for the same PR number exist within ## [Unreleased], or if matching bullets are found only outside ## …
- Very specific: line 188
If an existing plain (#<pr-number>) suffix is found, rewrite it to the linked (#<pr-number>) form during the update
- Very specific: line 189
If changelog sync succeeds and produces a file change, commit and push that CHANGELOG.md change to the same PR branch
- Distinctive: line 193
Not on feature branch → "Error: Cannot create PR from master/main branch"
- Distinctive: line 194
No commits ahead → "Warning: No commits to create PR for"
“Common” is measured: kept by at least 6 in 10 of the 4 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
What I do
- Validate feature branch has commits ahead of master/main
- Push branch to remote if needed
- Generate PR title summarizing all commits + session work (no type prefix)
- Create concise PR description with summary and 3-5 key changes
- Link GitHub issue if working on one in current session
- Create GitHub PR using
ghCLI and self-assign it to the authenticated GitHub user - Update root
CHANGELOG.mdwhen present with one PR-linked unreleased bullet using the PR URL, then commit and push that changelog update back to the same branch
When to use me
Use this skill when the user asks to create a GitHub pull request from the current feature branch.
Prerequisites
- Must be on a feature branch (not master/main)
- Branch must have commits ahead of base branch
- GitHub CLI (
gh) must be installed and authenticated - If
ghnot installed → error: "GitHub CLI not found. Install: https://cli.github.com/"
Validation Workflow
- Check current branch:
git branch --show-current - If on
masterormain→ error message and exit - Check for commits ahead of base:
- Try:
git log master..HEAD --oneline - Fallback:
git log main..HEAD --oneline
- Try:
- If no commits ahead → warn user and exit
Push Workflow
- Check if branch exists on remote:
git ls-remote --heads origin <branch-name> - If not on remote:
git push -u origin <branch-name> - If exists on remote:
git push - If a follow-up changelog sync creates a new
CHANGELOG.mdcommit after PR creation, push that commit to the same branch as well
PR Title Generation
- Analyze all commit messages in the branch
- Analyze agent's session context and work completed
- Summarize into one cohesive title (no type prefix)
- If commits use conventional format (
feat:,fix:), strip type prefixes - Capitalize first letter
- Examples:
Add CSV export functionality and update documentationResolve NPE in call graph builderImplement parallel test execution
PR Description Generation
- Analyze commits, diffs, and session context
- Summarize many commits into 3-5 key points (avoid listing every commit)
- Format (only these sections):
## Summary <2-3 sentence overview of what was accomplished> ## Changes - <key change 1> - <key change 2> - <key change 3> - <key change 4 (if needed)> - <key change 5 (if needed)>
Base Branch Detection
- Primary:
master - Fallback:
main(if master doesn't exist) - Check:
git rev-parse --verify master 2>/dev/null && echo "master" || echo "main"
Assignee Resolution
- Always self-assign the PR to the authenticated GitHub CLI account
- Use
--assignee @mewithgh pr create - Do not derive the assignee from local git config such as
git config user.nameor email
Issue Linking
If the agent is working on a GitHub issue in the current session:
- Check session context for issue number (e.g., working on issue #123)
- Add issue reference to PR body footer:
--- Closes #<issue-number>
Create PR
Execute the pull request creation:
gh pr create --base <master-or-main> --assignee @me --title "<title>" --body "<description>"- If working on an issue, append
Closes #<issue-number>to the description - Always include
--assignee @meso the PR is assigned to the signed-inghuser - Capture the created PR number and URL for any follow-up changelog sync, commit, and push
- Return the PR URL to the user
CHANGELOG.md Sync
After the PR is created, optionally sync the repository root CHANGELOG.md.
When to sync
- Only if
CHANGELOG.mdexists at the repository root - Only if
## [Unreleased]exists exactly once - Only if the unreleased section already contains the target subsection heading
- If any of the above checks fail, skip changelog editing without failing PR creation
Changelog Commit and Push Workflow
After the PR exists and its number is known:
- Update or insert the single PR-linked unreleased bullet using the PR number and PR URL
- If
CHANGELOG.mdis unchanged after the sync logic, stop here - If
CHANGELOG.mdchanged, stage only that file:git add CHANGELOG.md - Verify the staged set contains only
CHANGELOG.mdbefore committing:
If any staged path other thangit diff --cached --name-onlyCHANGELOG.mdappears, warn and skip the changelog commit rather than risking unrelated files in the commit. - Create a dedicated changelog commit:
If the skill updated an existing bullet rather than adding a new one, use:git commit -m "docs: add changelog entry for PR #<pr-number>"git commit -m "docs: update changelog entry for PR #<pr-number>" - Push that new changelog commit to the same branch that backs the PR:
git push
Rules:
- Only create the follow-up changelog commit when
CHANGELOG.mdactually changed - Stage only
CHANGELOG.md; never use broad staging likegit add . - Verify the staged set contains only
CHANGELOG.mdbeforegit commit; otherwise warn and skip the changelog commit - Keep the changelog commit dedicated to the changelog sync so the PR history is easy to understand
- If
CHANGELOG.mdalready has unrelated local edits that make the sync unsafe or ambiguous, skip changelog editing and warn the user instead of guessing - Do not fail PR creation just because changelog commit or push steps are skipped
Changelog Entry Format
- Write exactly one bullet for the PR in this format:
- <high-level PR summary> ([#<pr-number>](<pr-url>)) - Keep it to one line
- Use changelog-style wording, not PR-body wording
- Focus on the high-level thing the PR does, not an implementation checklist
Section Selection
Choose the best matching subsection under ## [Unreleased] based on the PR's high-level purpose:
### Addedfor new user-facing capabilities or first-time integrations### Changedfor meaningful behavior changes or enhancements to existing functionality### Deprecatedwhen marking functionality as discouraged but still available### Removedwhen functionality is no longer available to users### Fixedfor user-visible bug fixes### Securityfor security-relevant fixes or improvements### Misconly when the PR is notable but does not fit the standard Keep a Changelog sections
Update Rules
- Treat changelog state as one PR = one bullet
- Within the
## [Unreleased]section, if a bullet already references that PR number using either(#<pr-number>)or([#<pr-number>](<pr-url>)), update that line instead of appending a second one - Only move bullets within the
## [Unreleased]section (between its subsections) when the PR's high-level purpose is better represented elsewhere - Never create duplicate bullets for the same PR number within
## [Unreleased] - If multiple matching bullets for the same PR number exist within
## [Unreleased], or if matching bullets are found only outside## [Unreleased], treat the changelog as ambiguous and skip editing - If an existing plain
(#<pr-number>)suffix is found, rewrite it to the linked([#<pr-number>](<pr-url>))form during the update - If changelog sync succeeds and produces a file change, commit and push that
CHANGELOG.mdchange to the same PR branch
Error Handling
- Not on feature branch → "Error: Cannot create PR from master/main branch"
- No commits ahead → "Warning: No commits to create PR for"
ghnot installed → "Error: GitHub CLI not found. Install: https://cli.github.com/"ghnot authenticated /gh auth statusfails → "Error: GitHub CLI not authenticated. Run: gh auth login"- Self-assignment fails (for example, assignees unsupported or user not assignable) → surface the
gherror clearly and do not claim the PR was self-assigned CHANGELOG.mdmissing, malformed, ambiguous, or missing the needed unreleased subsection → skip changelog sync and continue- Staged set contains files other than
CHANGELOG.mdafter sync → warn and skip the changelog commit to avoid committing unrelated staged changes git commitforCHANGELOG.mdfails → warn user but keep the PR: "Warning: PR created but changelog commit failed."git pushfor the follow-up changelog commit fails → warn user but keep the PR: "Warning: PR created but changelog commit was not pushed."
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.

