Skip to content
Back to skills

Code Review

ASecurity

Review another agent's change: every finding needs a concrete failing case, a severity and a plain-English fix, plus an architecture and maintainability pass; ends with submit_review. Use when asked to review a diff, branch, worktree or PR.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 29, 2026
ai-agentsgocode-reviewgitsecurity

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 29, 2026

npx -y skills add k6w/baton --skill code-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/k6w-code-review/badge)](https://www.skillsdirectory.com/skills/k6w-code-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-review
description: "Review another agent's change: every finding needs a concrete failing case, a severity and a plain-English fix, plus an architecture and maintainability pass; ends with submit_review. Use when asked to review a diff, branch, worktree or PR."
keywords: [review, code review, reviewer, diff, pull request, pr, approve, changes requested, audit, submit_review, quality]
---
# Code review

You read and run things; you do not edit the code under review. Your verdict goes back through
`submit_review`, and the lead decides whether to `merge` based on it. A review full of vague worries
wastes the author's next turn; a review that waves a bug through costs far more.

**No proof, no finding.** Every finding names a concrete input or situation and the wrong result it
produces. If you cannot write that sentence, it is not a finding: drop it, or list it under
"Not checked".

## 1. Understand the change

- Read the task the author was given (and its acceptance command) so you can judge scope.
- Read the diff (`git diff <base>...HEAD` in their worktree, or what the lead sent), then the code
  around it: callers of every changed function, what it calls, its tests.
- If a signature, return value, default or error behaviour changed, grep every caller. A change can
  break code it never touches.
- Trace the data: where it enters, what is stored, what leaves. Note the expected load (one person
  running a script, or many concurrent requests) and judge against that.
- Run the tests, the linter / type checker and the acceptance command. Report commands and results.

## 2. What to look for, in order

1. **Correctness**: wrong result, crash, missed edge case (empty, zero, last item, rounding, time
   zones, unicode, very large), a caller the change broke, a fix applied in one caller while the
   shared function stays wrong.
2. **Safety**: injection, path traversal, missing authorization, secrets in code or logs, errors
   swallowed so data is lost, writes in the wrong order or outside a transaction. (A full security
   audit is the `security-audit` skill.)
3. **Load**: check-then-act races, a query per item, unbounded lists or caches, quadratic work on
   real input sizes, per-process state that must be shared.
4. **Tests**: risky new logic (a branch, a parser, money, auth, data writes, a bug fix) with no test
   that would fail if it broke. Ask for one good test, not coverage.
5. **Scope**: edits outside the files the task owned, unrequested features, formatting churn.
6. **Design and upkeep**: section 3.

Leave out: style the formatter or linter already enforces, personal taste, "consider maybe".

## 3. Architecture and maintainability pass

Short, and only for things a maintainer will pay for later. Point at the lines for each:

- **Doesn't need to exist**: dead code, unused options, speculative hooks, config nobody sets, an
  abstraction with one implementation.
- **Already exists**: the repo has this helper, or the standard library does it (name it).
- **Shallow wrapper**: a function or class that only forwards calls; callers would be simpler without.
- **Near-copies** that must change together; **one function doing several unrelated jobs**.
- **Leaky interface**: callers must know internal order, flags or formats to use it correctly.
- **Wrong home**: logic that reaches into another module's data more than its own.

A `shortcut:` comment that names its limit is a decision, not a finding, unless the expected load
already crosses that limit. How to fix design findings is `lean-code`'s job; the longer checklist for
a design-level review is `load_skill("code-review", "references/architecture-audit.md")`.

## 4. Check each finding before you write it

- Re-read the lines. Is the caller real? Can the value really be empty? Is the code really unused?
- Where cheap, prove it: a failing command, a test run in a scratch copy, the exact input.
- Propose the smallest fix that works; prefer fixes that delete code. Never propose new layers or
  config the problem does not need.

## 5. Write it up

Plain English, short sentences; explain a term the first time. Open with `What this change does:` in
two or three sentences. Then number findings across these groups (skip empty groups):

- **Blocking**: wrong behaviour, security hole, data loss, breaks at the expected load, acceptance
  failing.
- **Should fix**: risky code without a test, real slowness, duplication, a design problem from
  section 3, out-of-scope edits.
- **Nit**: small and optional.

Each finding has a title with `path:line`, the failing case, why it matters, and the fix:

```
2. Orders billed on the wrong day (billing/close.ts:40)
   Case: an order placed at 00:30 local time gets the server's UTC date, i.e. the day before.
   Why: the daily close reads "today" from the server clock.
   Fix: compute the date once in the shop's time zone and pass it down; nothing else changes.
```

Close with the commands you ran, `Not checked:` (one line, when something mattered and you could not
verify it), and the verdict.

## 6. Submit

`submit_review(verdict, notes)`, with the write-up as notes.

- `approve`: nothing blocking remains. Should-fix and nit items can ride along as notes.
- `changes_requested`: at least one blocking item, or the acceptance command fails. Say which
  numbers must be fixed.

Nothing found: `What this change does:`, then `Looks good.` and one line on what you checked; approve.

Files in this skill

  • SKILL.md5.3 KB
  • references/architecture-audit.md2.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.