Code review
Review the pending changes on the current branch (or a specified PR) for correctness, security, tests, and clarity. Use when the user asks for a code review, says "review my branch", "review this PR", invokes `/code-review`, or finishes a chunk of work and wants a second pair of eyes before merging.From its SKILL.md
npx -y skills add adamziel/Skills --skill code-reviewAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.4 KB, as published. Nobody here has run it
Code review
Produce a focused, high-signal review of pending changes. Avoid drive-by nits; flag things that actually matter.
What "the changes" means
Resolve the review target in this order:
- If the user passed a PR number or URL, fetch that PR's diff and metadata.
- Else, if the working tree is on a feature branch, diff against the merge-base with the default branch (
mainormaster). - Else, if there are uncommitted changes, review those.
- If you can't determine a target, ask the user once before doing anything else.
For PRs, also pull: title, description, linked issues, and the list of files touched. For local diffs, run git log against the merge-base to see commit messages — they often reveal intent the diff doesn't.
How to read the diff
- Read the whole changed file when a hunk is non-trivial — diffs hide context (function being modified, surrounding invariants, callers).
- For each touched symbol, grep the repo for callers and tests. A change that looks local often isn't.
- Check the test files in the diff: do they actually exercise the new behavior, or just compile?
- If a config, schema, migration, or public API changed, check for backwards-compatibility implications.
What to look for
In rough priority order — stop reporting once signal drops:
- Correctness bugs — off-by-one, wrong condition, missing await, swapped arguments, race conditions, null/undefined handling, error swallowing.
- Security — injection (SQL, shell, HTML), auth/authz gaps, secret exposure, unsafe deserialization, SSRF, path traversal, missing input validation at trust boundaries.
- Data safety — destructive operations without guards, migrations that can't be rolled back, schema changes without backfill, queries that lock or scan large tables.
- Test coverage of the new behavior — not "is there a test" but "does the test fail if the implementation regresses?" Note missing edge cases (empty, error path, concurrency).
- API / contract changes — breaking changes to public functions, types, HTTP routes, CLI flags, config keys, env vars; missing changelog or version bump where the project tracks them.
- Performance traps — N+1 queries, accidental quadratic loops, large allocations in hot paths, sync I/O on a request thread.
- Clarity — naming that misleads, dead code, half-finished refactors, comments that lie, magic numbers without explanation.
- Consistency with the codebase — does it follow patterns already used here? If it diverges, is there a stated reason?
Skip: bikeshedding on style the formatter handles, restating what the diff already shows, "consider adding a comment" without saying what the comment should explain.
Output format
Group findings by severity. Use these exact labels:
- Blocker — must fix before merge (correctness, security, data loss).
- Should fix — meaningful issue, fix unless there's a reason not to.
- Nit — minor, optional. Cap at 3 total nits across the whole review; if you have more, you're being noisy.
- Question — something you can't determine from the diff and need the author to clarify.
For each finding:
- **<Severity>** `path/to/file.ext:LINE` — <one-sentence problem>. <One- to two-sentence explanation or suggested fix.>
Always include the file path and line number so the user can jump to it. If the finding spans multiple lines, cite the start line.
End with a one-paragraph Summary: overall verdict (ship / needs work / blocked), what the change does well, and the top 1–3 things to address.
When there's nothing to flag
Say so plainly. "Reviewed N files / M lines. No blockers or should-fixes. Two nits below if you care." Don't manufacture findings to look thorough.
Things to avoid
- Don't propose large refactors unrelated to the diff.
- Don't repeat the same finding in multiple places — cite once, link other locations.
- Don't quote large blocks of the diff back at the user; they wrote it.
- Don't comment on generated files, lockfiles, or vendored code unless something there is actually wrong.
- Don't post the review to GitHub unless the user explicitly asked.