/trace:pr-description [base-branch | PR#]from trace
Drafts PR descriptions and squash-merge commit messages in a structured What/Approach/Updated context format. Useful when a developer asks for a PR description or squash-merge message.
Ships in trace. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use Claude Code’s Read, Glob, Write, and Edit tools for file operations. Use AskUserQuestion for closed choices and normal chat for open questions. Invoke referenced skills with the Skill tool. Resolve script paths from this installed skill; respect the session’s permissions.
Draft a PR description or squash-merge message in TRACE's shape: why the change exists, what approach it takes, and what permanent context moved. The shape has no prefixes and no enum of change types.
Before drafting, read authoring-rules.md, change-summary-style.md, and example-pr-description.md. The example sets the target length.
Emit exactly this template, dropping any optional section that is empty:
{Imperative-mood title, ≤72 chars, no prefix}
## What is this
{1–3 sentences. The why — the problem this change solves, the intent.}
## Approach
{Bullets when there are 3+ distinct points; short prose (2–3 sentences) when it is one continuous thought.}
- **{The decision, in plain words}:** {one sentence of detail, about 15 words}
- **{The decision, in plain words}:** {one sentence of detail, about 15 words}
## Risks / follow-ups
- **{Risk or deferred work}:** {what the reviewer or operator needs to know}
## Updated context
- ADR: {NNNN-short-title} — {one-line summary}
- Docs: {file or area} — {one-line summary}
## How to verify
- {Action only a reviewer can meaningfully take — staging behaviour, a UI flow, an output CI cannot assert. Not "run the tests".}
/trace:pr-description 123): run gh pr view 123 --json baseRefName,headRefName,number,title,body, fetch the base if needed, and diff against origin/<base>./trace:pr-description main): diff <base>...HEAD.gh pr view --json baseRefName, then the remote's default branch, then main or master. Tell the developer which base you picked.Start from git diff --stat <base>...HEAD and git log <base>..HEAD --oneline. Read the files that matter, and skip lockfiles, generated output, and formatting-only churn. If the diff is empty, say so and stop.
The body is the why: the problem and the intent, in one to three sentences. If the conversation did not establish the intent, draft it from the diff and confirm it with one short question.
Approach holds the decisions that survive the delete test in change-summary-style.md.
Risks / follow-ups holds what a reviewer or operator must act on or watch: a manual rollout step, deferred cleanup, a known limitation, or a feature flag. Skip it if nothing qualifies.
Fill this from git diff --name-status <base>...HEAD, and skip it if both lists are empty.
**/adr/NNNN-*.md. Read it for the title and a one-line summary.AGENTS.md or CLAUDE.md, or a file in the folder the ADRs live in. Say what changed, not what the file is. Skip package READMEs, changelogs, and generated docs.If the change made a substantial decision with no ADR in the diff, say so in your final message so the developer can run /trace:adr. Do not invent an ADR entry.
Include it for behaviour changes, bug fixes, and anything user-facing. Skip it for trivial changes and pure refactors. Write one to three concrete steps a reviewer can take, each with a URL or command and the expected result. Leave out anything CI or the developer already covered, such as tests, lint, or the build. If CI is the only check, skip the section.
Check the draft against the rules files and fix it before showing it. Output the body in a fenced block, then act on the request:
gh pr create with the title and body.gh pr view --json number succeeds): gh pr edit <number> --body-file <tmp>. Do not open a duplicate.glab mr create, glab mr view, and glab mr update <number> --description "$(cat <tmp>)".The title goes in the title field of GitHub or GitLab, and the rest in the body. A squash-merge message takes the whole block. Do not push or open a PR when the developer asked only for the text.
Without gh or glab, the PR-number and apply paths are unavailable, and base inference falls back to git. For a single commit, use /trace:commit-message.
When to use: Triggers only on an explicit ask. Two cases — (1) the developer asks for the PR text itself ("write the PR description", "draft the PR body", "give me the squash message", "update the PR description"); (2) the developer asks the agent to open or update the PR ("open a PR for this", "push and open a PR", "edit the open PR's body") — the skill drafts the body the agent then uses. Do not trigger merely because the developer is wrapping up, says "ship it", or pushes a branch — those signals belong to /trace:distil or to no skill at all. For a single commit's message, use /trace:commit-message instead.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub axakon/trace --plugin trace11 skills in this plugin
/adrRecord an architecture decision as a lightweight, immutable ADR in the scope's docs folder. Owns the ADR template, numbering, and write. Invokable directly for a direct-path decision, or by /trace:spec at handoff./agents-md-setupSet up or review the project's AGENTS.md through an interactive interview with the developer/commit-messageDraft a single commit's message — imperative-mood title plus a short why body, optional decision bullets, plain text (no markdown). Use when the developer explicitly asks for a commit message, asks to fix a message before amending, or asks the agent to perform the commit on their behalf./context-graphMeasure context weight per directory: AGENTS.md chains, @ imports, gotchas, on-demand docs./distilEvaluate recent changes and propose updates to the project's permanent context (AGENTS.md or the scope's docs folder) when something durable was learned/doctorValidate a TRACE-adopted scope against TRACE's own conventions — doc structure, marker pairs, AGENTS.md spec, ADR numbering and immutability, working-note banners, relative links — then guide the fixes. Owns the resolution flow for ADR number collisions left by merged branches. Useful after merges, before releases, or whenever the structure feels off.