pr-writer
Writes clear pull request titles and descriptions from the actual commits and diff. Use whenever the user is about to open a pull request, asks for a PR description, changelog entry, merge request text or release note for a branch, or says "summarize my changes", even if they onl
Install
npx skills add https://github.com/MehranQadirian/skills/tree/main/git/pr-writer
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install mehranqadirian-skills@llmmart
git clone https://github.com/MehranQadirian/skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole mehranqadirian/skills collection as a plugin from our marketplace. Git is the plain clone.
README
pr-writer
A Claude skill that turns a branch into a clear pull request: title, summary, testing, risk and breaking changes.
What it does
- Gathers facts from git with
pr_summary.sh: commits, areas, test and risk signals - Suggests a conventional title and checks it against the change
- Fills a description template with why, what, how it was tested and rollout risk
- Flags missing tests, migrations, dependency and CI changes and breaking changes
- Writes changelog lines from the user's point of view
Try it
Write the PR description for my current branch.
Summarize these commits into a changelog entry.
My PR says "fix stuff". Rewrite it properly.
Install
Claude.ai: zip this folder, then go to Settings > Capabilities > Skills > Upload.
Claude Code:
cp -r git/pr-writer ~/.claude/skills/
Structure
pr-writer/
├── SKILL.md skill instructions for Claude
├── scripts/pr_summary.sh facts for the description
└── templates/pull-request.md description template
Skill manifest
pr-writer
A good PR description lets a reviewer decide in a minute what to read first, what could break and how it was verified. The script gathers facts; the writing explains intent.
pr-writer/
├── SKILL.md
├── scripts/
│ └── pr_summary.sh commits, suggested title, changed areas, test and risk signals
└── templates/
└── pull-request.md description template with prompts for each section
When to use
- Opening a pull request or merge request
- Turning a branch into a changelog or release note entry
- Summarizing someone else's diff
- Rewriting a vague description such as "fixes stuff"
Workflow
- Collect facts:
bash scripts/pr_summary.sh origin/maininside the branch. It lists commits, a suggested title, changed areas, whether tests changed, migrations, dependency and CI changes, breaking change markers and referenced issues. - Read the diff for the parts that matter (
git diff origin/main...HEAD). The script cannot know intent; do not invent it. Ask the user for the reason if it is not visible in commits or issues. - Write the title: imperative, specific, under about 70 characters, in the repository's style (for example
fix(cart): round totals half up). Check the suggested title; it is only a starting point. - Fill the template (
templates/pull-request.md). Delete sections that do not apply instead of writing "N/A". - State testing honestly: exact commands and results, and what was not tested. If tests did not change, say how the change was verified.
- Flag risk: migrations, auth, dependency, CI or breaking changes get their own note with a rollback path.
- Check before sending: every claim traces to the diff, issue links are right, no secrets or private data.
Writing rules
- Lead with the effect on users or developers, then the mechanism
- Explain why, not a list of files; reviewers can see the files
- Group by area, not by commit order
- One logical change per PR; if the summary needs "and also", suggest splitting
- Never claim tests passed unless they were run
- Use plain words; avoid "various improvements" and "minor fixes"
- Link the issue:
Closes #123closes it on merge
Title quality
| Weak | Better |
|---|---|
Fixes |
fix(auth): reject expired refresh tokens |
Update code |
refactor(cart): extract price calculation |
WIP |
feat(search): add fuzzy matching behind a flag |
Changelog entry
When asked for a changelog line, give one sentence from the user's point of view:
- Discount codes now apply before tax, so totals match invoices. (#12)
What to report back
| Field | Content |
|---|---|
| Title | one line |
| Description | filled template |
| Open questions | anything you could not determine from the diff |
| Suggested follow ups | split, missing tests, docs |
Related skills
commitsmith: clean commit messages that feed a good PRcode-review: the review the PR will receive; self-review firstsecrets-hygiene: scan the diff before pushing
Files (skills)
-
scripts
-
pr_summary.sh 3.4 KB
Loading…
-
-
templates
-
pull-request.md 853 B
Loading…
-
-
README.md 1.1 KB
# pr-writer A [Claude skill](../../README.md) that turns a branch into a clear pull request: title, summary, testing, risk and breaking changes. ## What it does - Gathers facts from git with `pr_summary.sh`: commits, areas, test and risk signals - Suggests a conventional title and checks it against the change - Fills a description template with why, what, how it was tested and rollout risk - Flags missing tests, migrations, dependency and CI changes and breaking changes - Writes changelog lines from the user's point of view ## Try it > Write the PR description for my current branch. > Summarize these commits into a changelog entry. > My PR says "fix stuff". Rewrite it properly. ## Install **Claude.ai:** zip this folder, then go to Settings > Capabilities > Skills > Upload. **Claude Code:** ```bash cp -r git/pr-writer ~/.claude/skills/ ``` ## Structure ``` pr-writer/ ├── SKILL.md skill instructions for Claude ├── scripts/pr_summary.sh facts for the description └── templates/pull-request.md description template ``` -
SKILL.md 3.5 KB
--- name: pr-writer description: Writes clear pull request titles and descriptions from the actual commits and diff. Use whenever the user is about to open a pull request, asks for a PR description, changelog entry, merge request text or release note for a branch, or says "summarize my changes", even if they only paste a diff or commit list. Collects facts with a script, then writes why, what, how it was tested and risk, and flags breaking changes and missing tests. --- # pr-writer A good PR description lets a reviewer decide in a minute what to read first, what could break and how it was verified. The script gathers facts; the writing explains intent. ``` pr-writer/ ├── SKILL.md ├── scripts/ │ └── pr_summary.sh commits, suggested title, changed areas, test and risk signals └── templates/ └── pull-request.md description template with prompts for each section ``` ## When to use - Opening a pull request or merge request - Turning a branch into a changelog or release note entry - Summarizing someone else's diff - Rewriting a vague description such as "fixes stuff" ## Workflow 1. **Collect facts**: `bash scripts/pr_summary.sh origin/main` inside the branch. It lists commits, a suggested title, changed areas, whether tests changed, migrations, dependency and CI changes, breaking change markers and referenced issues. 2. **Read the diff** for the parts that matter (`git diff origin/main...HEAD`). The script cannot know intent; do not invent it. Ask the user for the reason if it is not visible in commits or issues. 3. **Write the title**: imperative, specific, under about 70 characters, in the repository's style (for example `fix(cart): round totals half up`). Check the suggested title; it is only a starting point. 4. **Fill the template** (`templates/pull-request.md`). Delete sections that do not apply instead of writing "N/A". 5. **State testing honestly**: exact commands and results, and what was not tested. If tests did not change, say how the change was verified. 6. **Flag risk**: migrations, auth, dependency, CI or breaking changes get their own note with a rollback path. 7. **Check before sending**: every claim traces to the diff, issue links are right, no secrets or private data. ## Writing rules - Lead with the effect on users or developers, then the mechanism - Explain why, not a list of files; reviewers can see the files - Group by area, not by commit order - One logical change per PR; if the summary needs "and also", suggest splitting - Never claim tests passed unless they were run - Use plain words; avoid "various improvements" and "minor fixes" - Link the issue: `Closes #123` closes it on merge ## Title quality | Weak | Better | |------|--------| | `Fixes` | `fix(auth): reject expired refresh tokens` | | `Update code` | `refactor(cart): extract price calculation` | | `WIP` | `feat(search): add fuzzy matching behind a flag` | ## Changelog entry When asked for a changelog line, give one sentence from the user's point of view: ``` - Discount codes now apply before tax, so totals match invoices. (#12) ``` ## What to report back | Field | Content | |-------|---------| | Title | one line | | Description | filled template | | Open questions | anything you could not determine from the diff | | Suggested follow ups | split, missing tests, docs | ## Related skills - `commitsmith`: clean commit messages that feed a good PR - `code-review`: the review the PR will receive; self-review first - `secrets-hygiene`: scan the diff before pushing
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.