/kanso:kanso-pr [optional: target branch, defaults to main]from kanso
Writes self-contained PR descriptions from commit history, diff summary, and repo conventions. Pulls context via git and gh CLI, adapts to PR templates and recent merged PRs.
Ships in kanso. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Writes PR descriptions that survive Jira migrations, Slack thread rot, and six months of organisational drift. Self-contained by default. Pulls from commit history rather than re-inventing.
The principles from kanso-principles apply. The description earns its place the same way code does.
A PR description has two readers: the present reviewer and the future archaeologist. The present reviewer needs enough context to approve or push back. The future archaeologist — human or AI — needs enough context to understand why without cloning the repo, reading the diff, and reverse-engineering intent.
External links rot. The description must stand on its own. Links supplement; they don't substitute.
Gather context in this order:
!git rev-parse --abbrev-ref HEAD for current, $ARGUMENTS or main as target.!git log <target>...HEAD --format="%h %s%n%b%n---". These commits already contain the what and ideally the why. Pull from them.!git diff <target>...HEAD --stat for scope awareness.!gh pr list --state merged --limit 5 --json title,body (if gh is available). Match the tone and structure of what the repo already merges.!find . -path '*/PULL_REQUEST_TEMPLATE*' -o -name 'pull_request_template*'. If one exists, use it as the skeleton instead of the default.If no PR template exists and no recent PRs are findable, fall back to the universal skeleton below.
## What
<One or two sentences. What does this PR accomplish? Must be
independently meaningful — not "see title".>
## Why
<The problem being solved. What broke, what was slow, what was
impossible that should be possible. Include the impact of NOT making
this change if it's relevant.>
## How (non-obvious decisions only)
<Skip this section entirely if everything in the diff is self-evident.
Otherwise: algorithmic choices, data structure decisions, architectural
tradeoffs that aren't visible in the code. One bullet per decision.>
## Verification
<What was actually run and the result. Test command and outcome,
typecheck, lint, manual paths exercised. If something wasn't tested,
say so explicitly and why — "no integration tests exist for this
module" beats silence. Reviewers shouldn't have to guess what's
covered.>
## Risks
<Side effects, performance implications, known limitations, anything
intentionally NOT changed. Rollback plan if non-obvious.>
## References
<Issue numbers, design docs, related PRs. Short list, not a dump.>
Sections that have nothing to say are omitted, not padded. A PR that doesn't need a "Risks" section shouldn't have an empty one.
If the branch has well-written commits (ideally via /kanso-commit), the PR body is mostly synthesis rather than invention:
__tests__/ or *.test.* files, plus the verify results from /kanso-audit or /kanso-refactor if they ran on this branch.If commits are poorly written ("fix", "wip", "more work"), the PR body has to carry all the context that the commits lack. Flag this to the user — ideally they should rewrite the commits before opening the PR, or at least squash on merge.
A 50-line PR doesn't need a five-section description. A 2,000-line PR needs more context, not less — counterintuitively, large PRs often have the shortest descriptions because authors assume the scope speaks for itself. It doesn't.
Rule of thumb:
If the diff is over 500 lines and touches more than a few concerns, recommend splitting before writing the description.
If this is part of a series, the description must say so:
This is PR 2 of 4 in the feature X series.
- PR 1 (#123, merged): schema migration and API stubs
- PR 2 (this): core logic for X
- PR 3 (#125, open): edge cases and error handling
- PR 4 (not yet opened): documentation and metrics
This PR intentionally does not include <what's deferred to PR 3/4>.
Each PR in a series should be reviewable in isolation. If it isn't, the split is wrong.
This is the core limitation worth stating plainly. AI-generated PR descriptions are consistently good at the what (summarising the diff) and consistently weak at the why (which lives outside the codebase: business context, prior decisions, regulatory constraints, conversations that happened elsewhere).
If the user hasn't explained why the change is needed, and the commits don't contain it, ask before writing the PR. Options:
Don't invent a plausible-sounding why. An invented rationale is worse than a missing one.
If the PR introduces a breaking change:
Example:
## ⚠️ Breaking change
The `/api/users` endpoint now requires a `x-client-version` header.
Requests without it will receive a 400 response.
Migration:
Before:
GET /api/users
After:
GET /api/users
x-client-version: 2.0
Match recent merged PRs in the repo. Some teams are terse and imperative. Some are conversational. Some use emoji headers. The description should look like it belongs.
General rules regardless of tone:
gh pr create to open the PR (or print the body if gh isn't available).Show the user:
Target: main ← feature/oauth-refactor (12 commits, +340 -180)
Draft PR description:
---
## What
Replace the legacy OAuth implementation with PKCE-based flow.
## Why
The previous implicit grant flow is deprecated by RFC 8252 for SPA
clients due to token leakage via browser history. PKCE adds a
per-request secret that makes interception attacks infeasible.
...
---
Open the PR? (y/n/edit)
Wait for approval before running gh pr create.
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 blakecyze/skills --plugin kanso2 plugins ship this exact skill · first indexed Jul 9, 2026
12 skills in this plugin
/kanso-auditUse when the user asks for a code review, audit, pre-PR check, quality sweep, or pattern analysis of a diff, branch, module, or codebase. Also use when the user asks to "check" or "look over" their code for issues./kanso-commitUse when the user asks to commit changes, stage their work, write commit messages, or split the working tree into logical commits./kanso-contextUse when the user asks to update, prune, audit, or create AGENTS.md, CLAUDE.md, or other agent context files. Also use when the user says their AI agents keep making the same mistakes and they want to fix it at the context level.