| name | code-review |
| description | Structured git diff review—defects, quality, security, tests. Triggers: review, pr review, audit, code review, staged changes, diff feedback (not slop-only—see README collision order). |
Code Review
Analyze git diffs and give prioritized, actionable feedback.
Escalations: README — routing and collision order.
Usage
git diff main...HEAD
git diff HEAD~1
git diff --cached
Workflow
- Analyze the diff (modified, added, deleted files).
- Scan using Analysis categories below.
- Prioritize by severity and impact.
- Output using Output format.
Output format
Summary: Status (Approved / Changes requested / Needs discussion), 1–2 sentence overview, top 2–3 concerns, impact (Low/Medium/High), next steps.
Findings: Group by severity (critical/high, then medium, then minor/style). Use code snippets and line references where helpful.
Example summary (shape only):
- **Status:** Changes requested
- **Summary:** Async handling and error paths need hardening before merge.
- **Key concerns:** (1) … (2) …
- **Impact:** Medium
- **Next steps:** …
Analysis categories
- Defects — Bugs, logic errors, broken behavior.
- Quality — Clarity, maintainability, structure.
- Performance — Unnecessary work, hot paths (
ui-performance if deep).
- Security — Unsafe inputs, secrets, exposure.
- Best practices — Conventions,
project-standards, code-structure; comment noise vs useful “why” (code-comments) when reviewing diffs heavy on comments.
- Copy / microcopy — New or changed user-visible strings: clarity, tone, errors (what happened + fix), empty states, buttons (
ui-copywriting).
- GraphQL UI —
fragments, going up the component chain, generated prop types (graphql).
- App component patterns — Menus, dialogs, command menus, list/settings shells: align with
component-patterns (use*Menu, EntityDropdownMenu, defineDialogActions, FloatingProvider, etc.).
- File organization — New or moved feature modules: naming, colocation, barrels per
code-structure.
- Tailwind /
cn() — Large class churn: redundant utilities, merge patterns (tailwind-class-cleanup).
- Testing — Behavior-relevant coverage and edge paths (
testing); flag tests that only lock implementation and will block refactors.