pr-author
Skill2 starsChanged 7 days agoMITView on GitHub
Draft a PR title and body — Summary + Test plan + Closes-line on top of any PR template. Auto-fires when about to run \"gh pr create\", after a first push with no open PR, or on \"open a PR\". Hands over a ready-to-run gh command; NEVER runs the GitHub write itself. Skip on the default branch. /pr-author.
- Commits and pushes
2 other projects use a version of this.
Adopted by
Most recently taken up by
- lxsmnsyc/agent-skillstheir own version, first seen Nov 8, 2026
- bang9/claude-code-settingstheir own version, first seen Apr 19, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- lxsmnsyc/agent-skills★ 4same name
- bang9/claude-code-settings★ 2same 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 repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- autonomizeSkill
- blueprintSkill
- brainstormSkill
- captureSkill
- checkpointSkill
- close-outSkill
- coordinateSkill
- cycleSkill
- deliverSkill
- design-proposalSkill
- discoverSkill
- dispatchSkill
- draft-planSkill
- envisionSkill
- executeSkill
- extract-conventionsSkill
- glossarySkill
- humanizeSkill
- human-viewSkill
- improve-promptSkill
- memory-auditSkill
- new-agentSkill
- new-agents-mdSkill
- new-hookSkill
- new-mcpSkill
- orchestrateSkill
- prepSkill
- pre-pushSkill
- pr-triageSkill
- recapSkill
- retrospect-coreSkill
- reviewSkill
- rulesSkill
- shortcutsSkill
- specSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- update-changelogSkill
- update-codemapSkill
- using-git-worktreesSkill
- visualise-codemapSkill
- visualSkill
- work-stateSkill
- wrapSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 84
Does not post anything to GitHub: No comments, no labels, no reviewers assigned — title/body draft only.
- Very specific: line 87
Does not guess
Closes #NNN: Only emits it when a commit clearly references the resolving issue.
≈ “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
pr-author
Reviewee-side PR drafting. The second of the GitHub reviewee triad; siblings are pre-push and pr-triage.
PR title and body get composed in-place each time with varying quality — title length, summary structure, test plan, base branch all improvised. This skill drafts them to a contract, shows you the draft, and hands you a ready-to-run command. It does not open the PR itself.
No Claude-initiated GitHub writes (triad-wide boundary — see pre-push). This skill drafts the PR and produces the exact gh pr create command for the user to run. Claude never executes gh pr create. Read-only gh / git calls (resolving base, listing commits) run freely.
Auto-fires via this description, not a hook (per skill-auto-fire).
When to run
Auto-fire when:
- About to run
gh pr create(any form) — intercept and draft first. - Just after a successful first push (
git push -u origin <branch>) to a non-default branch that has no open PR (the pre-push handoff moment). - The user says "open a PR", "create the pull request", "let's PR this", or equivalent.
Skip when:
- The user says "draft only, don't post" — still draft the title/body and surface it, but don't produce the run-it prompt; just hand over the text.
- The current branch is the default branch (nothing to PR from).
Manual trigger: /pr-author.
Procedure
1. Resolve PR context
All read-only:
- Branch —
git rev-parse --abbrev-ref HEAD. - Base branch —
git symbolic-ref refs/remotes/origin/HEAD(striprefs/remotes/origin/); fall back tomain→master→trunkby checking which exists on the remote. - Fork case —
gh repo view --json parent. If the repo has a parent (the user is contributing via a fork), the base isupstream's default branch, notorigin's. Adjust and note it in the draft. - Commits in range —
git log <base>..HEAD --oneline. - Diff stats —
git diff --stat <base>..HEAD. - Linked issues — scan commit messages in range for
#NNNreferences.
2. Draft the PR
Title:
- One line, ≤70 chars (hard cap —
ghtruncates the title bar otherwise). - Lowercase verb start (per git.md commit-format convention), no trailing period, no ticket prefix unless project convention requires it.
- Says what the change does for the reader, not how. "cut websocket frames by 70% with gzip", not "negotiate permessage-deflate on the websocket". Don't restate the branch name.
Body — per the contract below, layered on any existing template:
- Detect a PR template in order:
.github/PULL_REQUEST_TEMPLATE.md→.github/pull_request_template.md→docs/PULL_REQUEST_TEMPLATE.md. If one exists, its content is the baseline; fill the skill's sections on top of it rather than replacing it. (Multiple templates under.github/PULL_REQUEST_TEMPLATE/→ v2; for v1, surface that they exist and let the user pick one to paste.) - ## Summary — open with the problem in one or two plain sentences, in the user's words where they gave them (from the session, the issue, or the commit messages). Then 1–3 bullets on the fix. Not a list of every file or function touched; not a commit-log copy.
- ## Test plan — a checklist of how the change was verified or how a reviewer can verify it.
- Closes line —
Closes #NNNwhen a commit referenced an issue and it's the issue this PR resolves. Only when confident; otherwise omit. - No AI-attribution footer.
3. Surface the draft + hand over the command
Show the user:
- The drafted title and body (body in a copy-ready fenced block).
- The resolved base branch (and a note if it's a fork's upstream).
- The exact command they can run, body written to a temp file to avoid shell-escaping issues:
Ready to open. Run this yourself when you're happy with the draft:
```
gh pr create \
--base <base> \
--head <branch> \
--title "<title>" \
--body-file <path-to-tmp-body-file>
```
(Add `--draft` for a draft PR. I've written the body to <path> so quotes/markdown survive.)Then ask: "Want me to revise the draft? (edit title / edit body / fork-base looks wrong / looks good)" — all options edit the draft, none of them post. "Looks good" ends the skill with the command in the user's hands.
The skill never runs gh pr create. It writes the body to a temp file and constructs the command; running it is the user's action. Even on an explicit "you run it", do not execute the gh write — restate the policy in one line ("I draft, you run — here's the command ready to paste") and hand the command over. The no-Claude-initiated-GitHub-writes boundary has no exceptions; a user who wants one-key submission can run the handed-over command directly.
What pr-author does NOT do
- Does not run
gh pr create. Drafts and hands over the command. The user opens the PR. - Does not post anything to GitHub. No comments, no labels, no reviewers assigned — title/body draft only.
- Does not auto-merge or set auto-merge. Out of scope; that's a GitHub setting and a user decision.
- Does not replace the PR template. Layers on top of an existing one; never discards it.
- Does not guess
Closes #NNN. Only emits it when a commit clearly references the resolving issue.
Relationship to other organs
- pre-push — hands off to pr-author after a first push with no PR.
- pr-triage — the third triad skill; runs later, when review comments arrive on the opened PR — triages them into a checklist and routes the code actions (you write the replies).
- git.md — title format (lowercase verb start, no AI attribution).
- discover — optional, for project-specific PR conventions.
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.

