review-code
Review Code
Review a target and report findings. Each finding is rated by severity (how bad if it happens), likelihood (how often the bad path actually runs), and a worth-fixing verdict derived from both — plus a high-level fix when worth fixing. This skill reports only; it never edits code unless the user explicitly asks afterward.
Resolve the target
Pick the target from the argument, ignoring any flags. Default to diff when no target is given.
diff(default) — local work on the current branch: uncommitted edits, unpushed commits, and already-pushed commits, reviewed together. Anchor on the base-branch fork point, not the branch's own remote — otherwise commits drop out of the diff once they are pushed. Include untracked files, which a plain diff omits.pr <number>(or a PR URL) — review a GitHub PR: its diff plus enough PR context (title, description, base branch) to judge intent. If the GitHub CLI is unavailable, say so and fall back todiff.all/codebase— review the whole repository. State the scope you can realistically cover and prioritize entry points, core logic, and recently changed files. Note anything skipped.<path>— a file or directory argument scopes the review to that path.
For a diff/PR, review the changed lines plus enough surrounding context to judge them (callers, related functions). A bug is in scope even if the changed line only exposes it.
Where to run the review
Default is inline. With --sub, run the whole review in a subagent and relay its report verbatim — use it for all/codebase or a large diff, where reading the files would bloat the session. Never re-review or paste back what the subagent returns. If the harness has no subagents, say so and review inline.