gh-pr-create
Skill1 starsChanged 7 months agoMITView on GitHub
Create GitHub pull requests with structured descriptions via the gh CLI. Use when the user says "create pr", "open pr", "submit pr", "push and create pr", or "draft pr".
- Reads credentials
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- yuler/skillstheir own version, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- yuler/skills★ 1same 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 repository18 other files it gives its agents.
- close-out-sessionSkill
- code-reviewSkill
- comprehension-artifactSkill
- continue-workflowSkill
- enforce-integration-testSkill
- extract-engineering-styleSkill
- full-path-githubSkill
- generate-skill-docSkill
- grill-meSkill
- improve-codebase-architectureSkill
- playwright-capture-flowSkill
- prd-to-issuesSkill
- scaffold-docs-folderSkill
- scaffold-workspaceSkill
- setup-nvim-tmuxSkill
- spec-to-issueSkill
- structured-backlogSkill
- tdd-pocockSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
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 38
If commits need cleanup (squash, reword, reorder), do that before opening the PR — much cheaper than amending after review starts.
- Very specific: line 52
Don't pipe complex bodies through --body "$(...)" — markdown breaks in weird ways.
- Distinctive: line 101
Commit subjects that drift from the actual change
- Distinctive: line 123
Keep titles ≤ ~70 characters.
- Very specific: line 178
If you opened against main and need release-2.x:
- Distinctive: line 193
After this skill runs you should have:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create a GitHub Pull Request
A small recipe-style skill for opening clean PRs from the command line
via gh. Optimized for personal projects:
draft-first, body-from-file, structured template.
When to Use
Triggers:
- "create pr"
- "open pr"
- "submit pr"
- "push and create pr"
- "draft pr"
Prerequisites
ghCLI installed and authenticated (gh auth statusshows green)- Branch is committed and ready to push
- You have push access to the target repo (or are working on a fork)
Workflow
1. Confirm the branch state
git status # working tree clean?
git log --oneline {base}..HEAD # are these the commits you mean?
git diff {base}...HEAD --stat # roughly the change shape you expect?If commits need cleanup (squash, reword, reorder), do that before opening the PR — much cheaper than amending after review starts.
2. Push the branch
git push -u origin HEADThe -u sets up tracking so future git push / git pull work without
arguments.
3. Compose the PR body in a file
Don't pipe complex bodies through --body "$(...)" — markdown breaks in
weird ways. Use a temp file:
cat > /tmp/pr-body.md <<'EOF'
{Summary paragraph: what this PR does and why, 2–3 sentences}
{Technical detail:
- Architecture chosen and why
- Key components added/modified
- Integration points
- Feature flags}
## Test Plan
- [ ] {testable step 1}
- [ ] {testable step 2}
## Review Notes
{Anything the reviewer should scrutinize, defer, or override}
Closes #{issue_number}
EOF4. Open the PR (draft by default)
gh pr create \
--base main \
--head $(git rev-parse --abbrev-ref HEAD) \
--draft \
--title "{imperative summary} (closes #{issue_number})" \
--body-file /tmp/pr-body.mdOpening as draft is the safer default — it lets you self-review the diff in the GitHub UI before flagging it for human eyes.
5. Self-review the diff
Open the PR URL gh pr create returns. Walk the diff once with the
checklist that lives in your head (or code-review if installed).
Common things to catch on self-review:
- Stray
console.log/binding.pry/ debug prints - Files committed that shouldn't be (
.env.local,.idea/, etc.) - Generated artifacts that should be regenerated, not edited
- Commit subjects that drift from the actual change
6. Mark ready for review
gh pr readyOr, if there are issues you spotted during self-review, fix them in
new commits (or amend), git push, and only then mark ready.
Title Conventions
Strong defaults for personal projects:
| Pattern | Use when |
{imperative verb} {what} | Most changes — Add session expiry guard, Fix race in retry handler |
{verb} {what} (closes #N) | When the PR closes one specific issue |
[refactor] {what} | Pure refactor; reviewer should expect zero behavior change |
[wip] {what} | Stays as draft; signals "not for review yet" |
Keep titles ≤ ~70 characters. Move detail to the body.
Body Template
A reusable template you can paste at the top of /tmp/pr-body.md:
{Summary paragraph}
## Why
{Context, motivation, prior art, links}
## Approach
{What changed, in what order, and why}
## Test Plan
- [ ] {step}
- [ ] {step}
## Risk / Rollback
{What could go wrong; how to undo}
## Review Notes
{Anything the reviewer should scrutinize}
Closes #{issue_number}Common Variations
Open against a fork
gh pr create \
--repo upstream-owner/upstream-repo \
--head my-fork-owner:branch-name \
--base main \
--draft \
--title "..." \
--body-file /tmp/pr-body.mdOpen non-draft (small / trivial change)
Drop --draft. Reserve this for changes you'd be comfortable merging
without a self-review pass — typo fixes, doc updates, dependency bumps
where the test suite carries the weight.
Re-target the base branch
If you opened against main and need release-2.x:
gh pr edit {pr_number} --base release-2.xAnti-Patterns
- Opening non-draft on a 500-line change without self-review. Reviewer time is more expensive than yours.
- Empty PR body. "I'll fill it in later" — you won't, and the reviewer pays the cost.
- Multiple unrelated changes in one PR. Split first; the review will be faster and the revert cheaper.
- Long-lived branches that diverge for weeks. Rebase or open a smaller PR; large diffs get rubber-stamped.
Output
After this skill runs you should have:
- A pushed branch tracking origin
- A draft PR open with a structured description
- A self-reviewed diff
- A PR marked ready for review (when validation is clean)
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.

