NagareNegishi/DJ-App / .claude/skills/pr-draft
pr-draft
VerifiedPR Draft
Produce a PR title and body from local git history and write them to a draft file the user reviews before publishing.
Hard limits
- Read-only git, never
gh. Allowed network calls:git ls-remoteandgit fetch origin mainin that exact form — never push, pull, or any other fetch. - Draft only: never create, update, or comment on a pull request.
Gather input
- Detect the base branch:
git rev-parse --abbrev-ref refs/remotes/origin/HEAD, stripped of theorigin/prefix. If that fails, usemain, ormasterwhen there is nomain. - Confirm the base is fresh:
- Base is
main: rungit fetch origin main— exact form only — then diff against the refreshedorigin/main. - Any other base, or the fetch failed: compare
git ls-remote origin <base>againstgit rev-parse origin/<base>. On matching SHAs, continue with the local ref. - On SHA mismatch or
ls-remotefailure: stop, report the failing step, and produce no draft.
- Base is
- Collect the branch's work:
git log <base>..HEADandgit diff <base>...HEAD --stat. If the log is empty (on the base branch, or no commits yet), stop and tell the user there is nothing to draft — never invent one. - Read the full diff of any file whose purpose is unclear from the stat and commit messages. Never paste raw diffs into the draft.
- Run
git status; if anything is uncommitted, note in chat that it is not part of the draft. - If
.github/PULL_REQUEST_TEMPLATE.mdexists, fill its structure instead of the default one below.
Write the draft
Follow the human-writing skill for the body text.
Title: under 70 characters, imperative mood. Use a feat:, fix:, refactor:, docs:, chore: prefix when the branch's commits already use that convention.
Labels: draw only from the preset .claude/skills/label-setup/labels.yml — never a label outside it. Keep the set small: usually one type label (e.g. feature, bug, refactor), optionally paired with one priority: label. Don't stack overlapping types. Use an empty list when none apply.
Default body structure (when there is no PR template):
- Summary — what changed and why, two to five sentences. Lead with the user-facing effect.
- Notable decisions — trade-offs, rejected alternatives, anything a reviewer would otherwise have to ask about. Omit the section if there are none.
- Test plan — how the change was or should be verified. If tests were added or updated, name them. If verification is manual, give the steps. Never claim a verification that did not happen; phrase unrun checks as steps to run.
Describe intent, not mechanics. "Moves validation into the service layer so both endpoints share it" beats a list of edited files. Fold trivial commits (formatting, typo fixes) into a single line or leave them out.
Output
Write the draft to .github/drafts/pr-draft.md — always this exact path — creating the directory if needed and overwriting any existing file. Never commit the draft file.
File format:
---
title: "feat: share validation between create and update endpoints"
base: main
labels: [feature, refactor]
---
<body, ready to paste into the GitHub PR form>
base is the base branch confirmed in step 2.
After writing
Do not render the draft in chat — the user reviews the file in their editor. Show the file path and ask them to choose:
- Happy, publish — hand off to the
pr-publishskill. - Needs change — revise the draft, rewrite the file, and ask again.
- Happy, but don't publish now — stop; the draft file stays for later.
- Something else — open-ended.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |