- Home
- Skills
- Code Quality & Review
- PR Description with Risk and Rollback
Works with the AI Agents you already use
PR Description with Risk and Rollback
Write a reviewer-ready PR description from a diff: what and why in one line, changes by area, a risk level with its reason, only the tests that really ran, rollback steps, and what reviewers should read first.
Free
PR Description with Risk and Rollback
Example session with this skill installed
Write the PR description for my branch team-discounts against main. Ticket is BILL-482. I ran the billing tests and lint. Migrations run automatically on deploy.
- Read your context and instructions
- Compiled the pr description
## Apply a 10% team discount to invoices for accounts with 10+ seats, behind a flag
**Why:** BILL-482. 10% off for teams of 10+ seats, taxed after the discount. (Shortened.)
### Changes
(7 lines in 6 areas, each with its file; see references/example.md)
### Risk: High
Touches the money path (invoice total, tax base, and rounding in `src/billing/invoice.ts` and `src/billing/discounts.ts`), plus a data migration (`db/migrations/20261128_add_discount_cents.*`), an additive public API field (`src/api/invoices.ts`), a new config flag (`src/config.ts`), and a minor dependency bump (`package.json`).
### How it was tested
- `npm test -- test/billing` -> 3 files, 21 tests passed
- `npm run lint` -> passed, no warnings
- Not tested: the migration against a production-size copy of `invoices` (lock time unknown)
- Not tested: the full test suite (only `test/billing` ran)
- Not tested: an invoice built and rendered end to end with `TEAM_DISCOUNT_ENABLED=true`
### Rollback
1. Fastest: set `TEAM_DISCOUNT_ENABLED` to anything but `"true"` (or unset it) and restart. Totals go back to the old calculation and new invoices get `discount_cents = 0`.
2. Code: revert the merge commit, but keep the two migration files in the revert so the migration tool does not find an applied migration with no file. This reverts `package.json` and `package-lock.json` together. Old code runs with the new column (it never reads it, and the default fills it), so leave the schema in place.
3. Do not run the down migration unless the column itself causes a problem. It drops `discount_cents`, which is the only record of discounts on invoices issued while the flag was on. Export first: `SELECT id, account_id, discount_cents FROM invoices WHERE discount_cents > 0;`
Not undone by rollback: invoices already issued with a discount keep their discounted totals and tax. Finance decides whether to reissue them.
### Review first
1. `src/billing/invoice.ts` hunk at line 23: tax now uses the discounted base. Does that match the tax rule for every region in `taxOn`, not only the one BILL-482 mentions?
2. `src/billing/discounts.ts` lines 11 and 12: is half-to-even rounding of the discount what finance expects, and is the threshold `>= 10` seats (10 qualifies) correct?
3. `db/migrations/20261128_add_discount_cents.up.sql`: `ADD COLUMN ... NOT NULL DEFAULT 0` on `invoices`. Is our database version one that adds a constant default without rewriting the table? If not, this locks `invoices` during deploy.
Connects securely to your tools. The creator never sees your data.
About this skill
Most pull request descriptions say "small fix, tested locally". The reviewer then has to work out from the diff whether it touches billing, whether there is a migration, and whether anything was really tested.
This skill gives your agent a fixed method for writing the description from the diff itself.
What you get
- A one-line what and why, taken from the ticket or commits. If the why is unknown, it says TODO instead of guessing.
- Changes grouped by area (data, logic, API, config, dependencies, tests), one line per behavior change, with the file.
- A risk scan for six flags: data migration, auth, money path, public API, config, dependency bump. A decision table turns the flags into Low, Medium, or High, with a reason that names the files. A two-line change to an invoice total is High.
- A testing section that lists only commands that ran, with results, and says "Not tested" plainly for the rest.
- Rollback steps in the order you would run them: feature flag, revert, what happens to a migration and its data, and side effects a revert does not undo.
- One to three "review first" items with the question the reviewer should answer.
- A full worked example: a fictional team-discount PR with a migration, a money path change, and a dependency bump.
What it does not do
It does not review the code for bugs, run your tests, or open the PR. It writes the description you paste in.
Cannot verify test execution without manual output logs. Does not produce customer-facing changelogs. Scope is limited to technical branch diffs.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 3 days ago
- Free with an Agensi account
- Software
Git
No scripts, no Python, no network
Permissions
What's inside
Frequently Asked Questions
New in Code Quality & Review
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.