Ask your agent
What it does
Up to seven findings, most important first, each with the file, line and a concrete fix.
SKILL.md
---
name: code-review
description: "Reviews a pull request or diff for bugs, missing tests, security problems and unclear names, most important first. Use when the user asks for a code review, to review a pull request, or whether a change is ready to merge."
---
# Code review
Review the change the way a careful teammate would: find what will hurt users first, then what will
hurt the next person to touch the code. Use checklist.md for what to look for and severity.md to rank it.
## Before you start
- Read the pull request title and description, then the whole diff once without commenting.
- If there's no description, write one line saying what you think the change does and ask the user to confirm.
- If the diff is over ~800 changed lines, say so and offer to review it file by file.
## Steps
1. **Summarise** the change in one sentence ("Adds retry with backoff to the webhook sender").
2. **Behaviour first.** Walk each changed function and ask what happens with empty input, null,
the largest realistic input, a failed network call, and two requests at once. Look for wrong
conditions, missing `await`, off-by-one errors, swallowed errors and changed defaults.
3. **Tests.** For every behaviour that changed, name the test that would fail without the change.
If there isn't one, that's a finding.
4. **Security and data** using checklist.md: auth checks on new endpoints, input validation,
secrets or personal data in logs, SQL or shell built from strings.
5. **Readability last.** Only flag names and structure that would genuinely mislead a reader.
## Output
Reply with at most seven findings, ranked by severity.md. For each:
```
[severity] path/to/file.ts:42: what is wrong
Why it matters: one sentence.
Fix: the concrete change, as code when it's short.
```
Finish with a verdict: **Ready to merge**, **Merge after fixes** (list which), or **Needs another pass**.
Don't pad the review: if the change is good, say so and stop.
3 files
- SKILL.md1.9 KB
- checklist.md0.9 KB
- severity.md0.5 KB