From Core Commands
Pure writer for PR titles and bodies. Takes a PR reference (or the current branch), reads diff + commits + linked issue + PR template, and returns structured {title, body}. Does NOT call `gh pr create` or `gh pr edit`. Invoke from `/pr`, `/cpm`, or any caller that needs a CCGM-voice PR body without the publishing plumbing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/commands-core:pr-descriptionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A pure writer skill. One job: produce `{title, body}` for a pull request in CCGM voice, value-first, matching the repo's PR template when one exists.
A pure writer skill. One job: produce {title, body} for a pull request in CCGM voice, value-first, matching the repo's PR template when one exists.
Never publishes. Never calls gh pr create, gh pr edit, gh pr comment, or any mutating GitHub command. The caller is responsible for doing something with the returned text.
/pr, /cpm, a coordinator agent) needs PR text and wants the voice separated from the publishing flowDo NOT run this skill when the caller already has a finalized title and body - pass them through instead.
Accept any of the following as the PR reference:
| Form | Example | Meaning |
|---|---|---|
| bare number | 561 | PR #561 in the current repo |
| hash number | #561 | same |
| prefixed | pr:561 | same |
| full URL | https://github.com/owner/repo/pull/561 | PR in that repo |
| branch name | 288-pr-description-writer-skill | find the open PR for this branch, or fall through to "no PR yet" |
| empty / current | (no argument) | current branch; PR may or may not exist |
| steering text | emphasize the benchmarks | applied on top of any other input as a tone/content hint |
Multiple forms can coexist. pr:561 emphasize the perf numbers means "PR #561, lean on perf."
If no PR exists yet (e.g., the caller is about to create one), operate on the branch: compare origin/main...HEAD for the diff and commit set.
Collect in this order. Stop once each input is captured or confirmed absent.
{issue-number}-{description} convention) or from the PR body's Closes #N line. Read with gh issue view {num}.git log origin/main..HEAD --pretty=format:"%s%n%n%b%n---"git diff origin/main...HEAD --statgit diff origin/main...HEAD (sampled; see "Diff Sampling" below)pull_request_template.md in the repo rootPULL_REQUEST_TEMPLATE.md in the repo root.github/pull_request_template.md.github/PULL_REQUEST_TEMPLATE.mdreferences/default-template.mdgh pr view {num} --json body,title. Treat as prior art to improve, not replace wholesale.For diffs over ~500 lines, sample rather than dump:
{file}: {N} lines; generated/lockfile, skipped"Never claim coverage of a file you did not actually read.
{type}({scope}): {summary} or CCGM-style #{issue}: {summary} if the branch name carries an issue numberadd, extract, fix), not past tense#{issue}: prefix (check recent git log --oneline -20 on main), match that conventionExamples:
| Bad | Good |
|---|---|
| Updated pr.md and cpm.md to use new skill | #288: extract PR description writer as reusable skill |
| Refactor commands-core | #288: move inline PR body generation into pr-description skill |
| Big changes to review flow | feat(review): add scope-drift audit before specialist agents |
The body leads with what the PR enables, fixes, or changes in the user's world. File churn is supporting evidence, not the lead.
pr-description skill under commands-core"/pr to delegate body generation to the skill"cpm.md"bash tests/test-modules.sh, manual smoke test of /pr on a test issue, etc.Fill the template's sections verbatim. Do not add sections the template does not include. Do not remove sections the template marks required.
If a section in the template does not apply to this PR (e.g., "Screenshots" for a backend-only change), write N/A - {one-line reason} rather than leaving it blank.
| You are about to write... | The reality is... |
|---|---|
"This PR modifies foo.ts and bar.ts..." | Lead with what those modifications do for the user. File names are not value. |
| "I refactored the review flow for cleanliness." | Cleanliness is not a user-visible outcome. What does the refactor enable? |
| "Adds a new module." | Which module, what does it do, why does that matter? One sentence each. |
| "Various improvements." | If you cannot name them, do not mention them. Delete the bullet. |
Return exactly this structure as the skill's output. The caller parses it.
### TITLE
{title, single line, no trailing punctuation}
### BODY
{full body, markdown, starts with `Closes #N` line if applicable}
### METADATA
- Issue: #{num} or "none"
- Branch: {branch-name}
- Commits: {count}
- Files changed: {count}
- Template used: {path} or "default"
- Steering applied: {yes/no}; {one-line summary if yes}
Do NOT wrap in additional prose. Do NOT invoke gh commands with the result. Do NOT emit a "here's your PR body" preamble.
gh pr create)gh pr edit)The caller handles all of the above.
/pr and /cpmBoth commands currently write PR bodies inline. A caller that delegates to this skill should:
$ARGUMENTS (steering text) straight throughTITLE and BODY blocks as --title and --body args to gh pr createThis keeps the writer pure and the publisher in charge of side effects.
When invoked by another skill or agent (not a human), behave as if mode:headless:
BLOCKED note at the top of the output and stopPorted from EveryInc/compound-engineering's skills/ce-pr-description/SKILL.md. Adapted to CCGM voice, to match existing commands-core conventions ({issue}: {description} title prefix, Closes #N body line), and to slot into the skill-authoring rules (imperative voice, no AI attribution, value-first body, references file for the default template).
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub lucasmccomb/ccgm --plugin commands-core