agentleFS
MaheshAwasareMaheshAwasare/claude-skills-pro/skills/write-pr-description/SKILL.md

write-pr-description

Skill1 starsChanged 7 months agoMITView on GitHub

Write a PR description that gets reviewed quickly — the change in one sentence, the why, the test plan, the rollback. Use when opening any non-trivial PR, or when an existing PR description is "see commits" / auto-generated bullet list.

  • Sends data out

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use research.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • DockerSkill

    research

    Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use only the sections that apply.

    line 55
  2. Distinctive:

    If the why isn't obvious from a linked issue, it has to be in the description.

    line 77
  3. Distinctive:

    Only the *interesting* parts of the implementation.

    line 81
  4. Distinctive:

    Don't write a test plan that says "tested locally." Specific actions a reviewer can repeat.

    line 101

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Write a PR Description

A good PR description gets reviewed in 10 minutes. A bad one (or none) gets stalled, rubber-stamped, or starts a thread of clarifying questions. This skill is the template.

When to use

  • Opening a non-trivial PR (>50 lines, new behavior, anything risky).
  • Reviewing a PR with a "see commits" or auto-generated description and asking the author to expand.
  • Writing the PR description before opening, so the description shapes the implementation.

When NOT to use

  • Trivial PRs (typo, dependabot bump, one-line config tweak) — title is enough.

The template

## What

One sentence: what changes, observable to a user or another developer.

## Why

The motivation. What problem does this solve? Link to issue / ticket / Slack thread / metric.

## How

The interesting design choices. Skip the obvious. Mention what you considered and rejected.

## Test plan

- [ ] Step a reviewer or CI can verify
- [ ] Step b
- [ ] Step c

## Rollback plan

How to revert if this misbehaves in prod. Commands or PR. Time to revert.

## Screenshots / video

(For UI changes only.)

## Refs

- Closes #123
- Related to #456

Use only the sections that apply. A small backend PR might be: What, Why, Test plan. A UI PR adds Screenshots. A risky migration adds Rollback plan. Don't pad sections that don't help review.

Each section, tightly

What

One sentence. Describes change in user-facing or developer-facing terms.

BadGood
"Fixes auth""OAuth sign-in callback now decodes state param before comparing."
"Adds endpoint""Adds POST /api/refunds with partial-amount support via Razorpay Optimum."
"Updates package""Bumps @clerk/nextjs 5.4 → 5.7 to pick up org-invitation webhook fix."

Why

The trigger for the change. Examples:

  • "Reported by user #4521 — see Sentry issue 88a4."
  • "From design doc: docs/design/team-invites.md (slack: #invites-design)."
  • "Compliance audit (ticket SEC-89) flagged HMAC SHA-1 usage."
  • "Latency p95 on /search jumped 400ms after #2156; this rolls back the embedding lookup change."

If the why isn't obvious from a linked issue, it has to be in the description. Reviewers shouldn't have to ask "why are we doing this?"

How

Only the interesting parts of the implementation. Skip:

  • "Added a new file services/refunds.ts" — visible in the diff.
  • "Wrote tests" — visible in the diff.

Include:

  • Design choices a reviewer might question. ("Used a Postgres advisory lock instead of Redis because…")
  • Performance trade-offs. ("Computed at write time rather than read time because read traffic is 100x.")
  • Security choices. ("Idempotency key required to prevent double-charge on retry.")
  • What you tried and rejected. ("Initially used pg_notify; switched to Postgres LISTEN/NOTIFY-via-pg-boss because we already depend on it.")

Test plan

A checklist a reviewer or CI can mechanically verify. Examples:

  • pnpm test passes (CI).
  • Manual: curl -X POST .../api/refunds -d '{"amount": 5000}' returns 201 with refund row.
  • Manual: webhook signature failure → 400, not 500.
  • Browser: invitation accept page renders with org name.
  • Load test: 100 concurrent POST /charges doesn't exceed pool of 20 connections.

Don't write a test plan that says "tested locally." Specific actions a reviewer can repeat.

Rollback plan

For risky PRs only — see plan-the-rollback skill. Specific commands or revert PR.

**Rollback:** Revert this PR (`git revert <merge-sha>`); no schema changes
to undo. Time to revert: ~5 min (deploy time).

For DB-touching PRs:

**Rollback:**
1. Revert PR.
2. `ALTER TABLE refunds DROP COLUMN partial_amount_paise;` (column nullable; safe to drop).
3. Total time: ~10 min including deploy.

Screenshots / video

For UI changes — before/after side-by-side. Use Loom for interactions / animations. For multi-state UI, screenshot each state.

Refs

Issues, related PRs, design docs, Slack threads. Use Closes #123 to auto-close issues on merge.

Worked example

## What

Adds partial refund support to `POST /api/refunds`. Default behavior
unchanged (full refund); pass `amount` (in paise) for partial.

## Why

Customer support has been issuing full refunds because the dashboard
didn't expose partial. Refund $-volume is up 8x from change requests
since launch — see #2156. Partial refund support reduces $-loss
without changing the support agent workflow.

## How

- Added `amount` (optional, integer paise) to `POST /api/refunds` body.
- When `amount < payment.amount_paise`, calls Razorpay with
  `speed: "optimum"` (UPI/IMPS instant where supported, fallback to
  normal).
- Validates `amount > 0` and `amount <= remaining_refundable`.
- `remaining_refundable = payment.amount - sum(prior refunds)`. Stored
  as a generated column on `payments` for fast access.

Considered: refund-by-line-item mapped to invoice lines. Rejected for
this PR — needs new invoice/line-item models. Tracked as #2233.

## Test plan

- [ ] CI green (unit + integration).
- [ ] Manual: full refund still works (`amount` omitted).
- [ ] Manual: partial refund creates row in `refunds` with correct amount.
- [ ] Manual: over-refund (>remaining) returns 422 with clear message.
- [ ] Manual: webhook `refund.processed` updates `payments.refunded_paise`.

## Rollback plan

Revert this PR; the new `remaining_refundable` generated column is safe
to keep (unreferenced). To fully clean up after revert:
`ALTER TABLE payments DROP COLUMN remaining_refundable;`. Total time
~10 min.

## Refs

Closes #2156
Related #2233

A reviewer reading this can: understand the change, agree it's the right scope, know what to spot-check, know what happens if it breaks.

Anti-patterns

  • "See commits" — you're outsourcing the review prep to the reviewer.
  • Auto-generated bullet list of file changes — visible in the diff; adds no info.
  • No why — reviewer can't judge whether the change is the right approach.
  • No test plan — reviewer either takes your word or has to figure out the manual tests.
  • Marketing copy ("This exciting new feature…") — reviewers want facts, not pitch.
  • Two unrelated changes in one PR — see shrink-this-pr. The description can't cleanly cover them.
  • "Tested locally" as the entire test plan — what did you test? How does the reviewer repeat it?
  • No rollback plan on a migration PR — see plan-the-rollback.
  • Screenshots without captions — reviewer can't tell which is "before" vs "after."
  • Linking to a Slack thread without summary — Slack messages disappear into history.

Verify it worked

  • What is one sentence and concretely describes the change.
  • Why links to a real motivation (issue, ticket, metric, complaint).
  • How surfaces the interesting design choices, not the obvious.
  • Test plan is a checklist a reviewer can run, not "tested locally."
  • Rollback plan exists for any DB / config / external-dep change.
  • UI changes have screenshots or Loom links.
  • PR title matches Conventional Commit format (per write-commit-message).
  • Reviewer can read the description in < 2 min and have the context to start the review.
  • No "see commits" or "various improvements" anywhere.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.