reviewing-code

Installation
SKILL.md

Reviewing code

Give the caller an advisory second opinion it can act on: whether the change does what it is meant to do, what should block it, and the smallest fix for each blocker. The review is the deliverable; do not change the code.

Fix the object under review

Pin exactly what you are reviewing before reading anything else.

  • Current changes, this branch, or the latest change: inspect the diff first, with git diff for the working tree, git diff --cached for staged changes, or git diff <base>...HEAD for a branch, where <base> is the ref the brief names or the default branch. Note the HEAD SHA so a later commit does not shift what you reviewed.
  • The last commit or recent history: start with git show --stat and git show, or a narrow git log.
  • A design or plan rather than code: read the plan, then the code it will touch.

Then state the intent in one line: the user problem, bug, migration, or decision the change serves. Take it from the brief when given; otherwise infer it from the diff, commit messages, and tests, and mark it as inferred. If the intent is unclear, review the most likely intent and say so rather than nitpicking in a vacuum.

What the brief says the change does, how it was tested, and why it was done this way are claims. Check them against the diff before relying on them.

Read before you judge

Do not comment on code you have not read. Read the diff, then enough of the surrounding files to understand each changed call chain: its callers, the types it crosses, the tests that cover it, and the local pattern it should match. Batch independent commands into one shell_command call, such as git diff --stat && git diff -- src/foo.ts && rg "pattern" src. Read further only to settle a specific risk, and stop once you can support each finding.

Installs
1
GitHub Stars
21
First Seen
5 days ago