Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Pr Description?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ku5ic-pr-description)
---
name: pr-description
description: Draft a PR's title and body from the branch's diff, in the project's template
argument-hint: "<optional: base ref like main>"
allowed-tools:
- Bash(gh pr view *)
- Bash(gh pr diff *)
- Bash(gh repo view *)
- Bash(glab mr view *)
- Bash(glab mr diff *)
- Bash(glab repo view *)
- Bash(git show *)
- Bash(git fetch *)
- Bash(git rev-parse *)
- Bash(git branch --show-current)
---
# /pr-description
Generate a pull request title and description from the current diff.
Loading this skill isn't enough. Before the step a row names, read its file.
| Before | Read |
| ----------------------------- | ---------------------------------------------------------------------- |
| Writing the title or the body | [reference/description-practice.md](reference/description-practice.md) |
| Writing the body's sections | [reference/structure.md](reference/structure.md) |
## Procedure
1. Check for a project PR template: resolve the project root via `kit project-root`, then check these exact paths in order, using the first that exists:
- the code host's PR template paths in `skills/code-host-patterns`, under `<root>`, in their order
Test each exact path (e.g. `test -f <path>`); do not run a keyword/substring search like `fd -i pull_request_template` across the tree. Two failure modes make that unsafe:
- `.github` and `.gitlab` are hidden directories that `fd` silently excludes unless you pass `-H`, so a template living there gets missed entirely.
- `.github` commonly holds several unrelated `*_pull_request_template.md` variants (per-team or per-change-type templates, e.g. `ds_pull_request_template.md`), and a substring match sorted alphabetically will confidently pick the wrong one instead of the actual default.
Exact-path checks sidestep both.
If one exists, read it: its sections replace the default structure in [reference/structure.md](reference/structure.md). This is mandatory, not a preference, even for a one-line diff. Never substitute the default Structure when a project template exists. If none exists, fall back to the default Structure.
2. Resolve the base: `kit git-base`. If $ARGUMENTS is a valid single-word git ref (no spaces, not a sentence), use it as the explicit base instead by running `kit git-base "$ARGUMENTS"` via Bash.
3. Pull the diff: `kit git-base --diff`, with step 2's explicit base after `--diff` when there is one
4. Pull the log (last 20): `kit git-base --log -20`, with that base after `--log` the same way
5. Read any referenced issue number in recent commit messages, but do not fetch external data.
6. Build the risk map. List the changed files with `kit git-base --diff --name-only` (plus the explicit base from step 2, if any). Run `kit blast-radius <file>` on each one that isn't a test file; it exits 2 for a file type it can't scan, so skip those. A file qualifies when it has 5 or more consumers, or when it has consumers and none of them is a test (`test 0`).
## Output
Write the PR description to the path `kit scratch-dir pr-description <branch>` prints. It opens with the draft header from `skills/pr-publish/SKILL.md`, `Head:` being `git rev-parse HEAD` and `PR:` the branch's open PR, else `Branch:`. Under the header, a `Title: <title>` line, a blank line, then the body below; `/pr-publish` posts everything after the `Title:` line as the body.
The body follows [reference/structure.md](reference/structure.md): the project template when step 1 found one, else the default structure.
## Rules
- Title: one line in the shape the step 4 log uses (Conventional Commits, ticket prefix, plain), naming the change's purpose, per [reference/description-practice.md](reference/description-practice.md).
- Why, not what. This is a hard rule. The reviewer already has the diff for what changed and the test files for what's covered. Never restate either. A bullet that only narrates the diff ("renamed X to Y", "added a null check") earns no place in the description; only the bullet's reason for existing does.
- An impact or failure mode goes in only when the diff, the log, or a linked issue establishes it (`skills/kit-rules/reference/evidence.md` section 1). Otherwise describe the change and say nothing on severity.
- If a section would only restate the diff or the tests, cut it (default structure only). Under a project template, an empty section keeps its heading and gets `N/A`.
- Length and tone: `skills/kit-rules/reference/output.md` sections 0 and 4. The headings `reference/structure.md` defines, and the project template's, stay.
- Signatures and footers: `skills/kit-rules/reference/workflow.md` section 1.
- If the diff is empty, say so and stop.
- Post nothing. Posting the approved draft is `/pr-publish`.