skills/code-review/SKILL.md
Structured code review with P0-P3 findings, confidence scores, and criteria-based analysis. Use for reviewing code changes, PRs, or specific files.
npx skillsauth add preetamnath/agent-skills code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze code changes for correctness, security, edge cases, and quality. Return structured findings in the Finding schema v1.
For full two-pass review with adversarial verification, use /two-pass-review instead.
Determine what to review:
git diff <range>git status and git diff to see current changesFor modified files, review the diff. For untracked files, read the full content. For deleted files, check for broken references.
If related files are needed for context (types, interfaces, callers), read them too.
If the scope is ambiguous (no files specified, no diff range, or the diff spans many unrelated files), use the AskUserQuestion tool to confirm what to review before proceeding. Present the detected files/changes and ask whether to review all or narrow to a subset.
If the project supports it:
package.json to check available scriptslint script exists, run ittsconfig.json exists, run npx tsc --noEmitReview the code for:
Do NOT flag: style preferences, naming opinions, theoretical risks without evidence, or things you'd do differently but aren't wrong.
Return a ReviewOutput envelope conforming to the Output Schema below.
verdict and evidence to null on all findingsconfidence scores — 1.0 means certain, below 0.5 means you're guessingchecks_run with what you evaluated (files, criteria, lint/typecheck results)Finding {
id: sequential number starting from 1,
severity: "P0" | "P1" | "P2" | "P3",
title: short title,
body: detailed explanation with evidence,
file: file path or null for global issues,
line_start: number or null,
line_end: number or null,
confidence: 0.0-1.0,
criterion: what was violated,
verdict: "confirmed" | "demoted" | "rejected" | null,
evidence: reasoning for verdict | null
}
Findings are wrapped in a ReviewOutput envelope:
ReviewOutput {
schema_version: "v1",
findings: Finding[],
checks_run: string[]
}
confidence — 1.0 means certain, below 0.5 means you're guessing. Be honest.criterion — required for P0/P1 findings. Name the specific criterion violated.verdict — populated by the verifier in two-pass review. Set to null when producing findings directly.evidence — verifier's reasoning for the verdict. Set to null when producing findings directly.checks_run — list every criterion evaluated, file path checked, or acceptance criterion verified. For ACs, use AC-N: PASS — [evidence] or AC-N: FAIL — [reason].documentation
Collapse a multi-clause instruction into one positive line of trigger + action. TRIGGER when: user says 'tighten this rule', 'make this leaner', 'make this simpler' in a skill, CLAUDE.md, agent prompt, or style guide.
documentation
File-level tightening pass on an instruction file (CLAUDE.md, skill, agent prompt, style guide) using `tighten-instruction` as the lens. TRIGGER when: user says 'tighten/simplify this file/skill/CLAUDE.md', 'cut this down'; user points at a verbose instruction file and wants it leaner.
testing
Anchored second-opinion on one concrete proposal: dispatch a subagent to rate the fix, generate ranked alternatives, and flag blind spots, then synthesize back. TRIGGER when: user says 'second opinion', 'rate my fix', 'weigh in on my approach', 'what alternatives am I missing', or wants their candidate edit/decision evaluated against alternatives. SKIP when: multiple decisions on a larger artifact — use `panel-review`.
development
Multi-reviewer panel on N focused questions about a near-final artifact (plan, design, code, prose). R0 (you) plus two parallel reviewer subagents, per-question table with disagreement preserved, walk decisions one at a time. TRIGGER when: user says 'panel review', 'multi-agent review'; user has a mostly-done artifact and focused micro-decisions to validate. SKIP when: only one proposal under review — use `second-opinion`.