Review (Audit & Refine)
Analyze code for correctness, safety, and efficiency. This skill supports two modes: Report (analysis only) and Refine (apply improvements).
Core Mandates
- Evidence-First: Establish a baseline by running tests BEFORE the review.
- Single-Pass: Evaluate all categories (Correctness, Complexity, Quality, Efficiency, Cleanliness) in one pass.
- Standards: Strictly follow the
Code Standardstable inCLAUDE.md. - Mode Selection:
- Report: Output a categorized report (
ERROR,WARN,NIT). End withVerdict: LGTM,LGTM with nits, orNeeds work. - Refine: Apply targeted, behavior-preserving changes to improve clarity and reduce technical debt.
- Report: Output a categorized report (
Execution Workflow
- Scope: Detect modified files, feature branch diffs, or staged changes.
- Baseline: Run
buildandtestto establish a "Green" starting state. - Analyze: Apply the
Code Standards(referencingCLAUDE.md). - Action:
- Report Mode: Generate findings formatted as
[SEVERITY] file:line - Issue -> Fix. - Refine Mode: Edit files surgically. Use language-expert skills (
rust-expert, etc.) for idiomatic patterns.
- Report Mode: Generate findings formatted as
- Verify: Run tests/linter after refinement to ensure behavior is unchanged.
Anti-Rationalization
| Excuse | Reality |
|---|---|
| "Tests passed, so it's fine." | Reviews catch architectural flaws and security risks that tests miss. |
| "Refining might break it." | Small, behavior-preserving edits with Red-Green verification are safe and essential. |
| "Subagents are always better." | For small or local changes, the main agent is more efficient. Use subagents for context isolation. |
Converted and distributed by TomeVault — claim your Tome and manage your conversions.