en un clic
code-review
Code Review Protocol
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Code Review Protocol
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Generate and curate Claude-oriented bash-policy project rules. Use to run bash-policy export/report, review .bash-policy-candidates.yaml from Claude settings, update .bash-policy.yaml, normalize command-shape identities, or validate bash-policy configuration.
Assess whether an input document is ready for a specific §BRAND_NAME_TITLE§ MAS entry point. Use when a user asks whether a goal, functional spec, detailed spec, technical spec, PRD, story bundle, architecture plan, or other source document is solid enough to run through §BRAND_BINARY_NAME§ with `--entry-point general-objective`, `functional-spec`, `detailed-spec`, or `technical-spec`; when deciding which entry point fits a document; or before `§BRAND_BINARY_NAME§ init --spec`.
Coordinate Pairing-mode doer/reviewer sessions through a Markdown blackboard. Use when the user invokes /adversarial-pairing with role and blackboard-path arguments or asks multiple pairing agents to coordinate plan review, implementation, staged code review, and follow-up review rounds without §BRAND_NAME_TITLE§ multi-agent mode.
Define component boundaries, interfaces, and structural decisions for a change
Summarize artifacts produced by §BRAND_BINARY_NAME§ agents for human checkpoint review
Pre-commit Clean Code refactoring
| name | code-review |
| description | Code Review Protocol |
Code review is risk mitigation, not gatekeeping. The goal is catching issues the author couldn't see — and occasionally sharing a better pattern when it genuinely helps.
Before reviewing, establish context:
git diff --cached --name-only, then git diff --cached --stat, then targeted path diffs). For PRs or commits, inspect changed files and stats before reading targeted hunks. Only broaden if explicitly asked.[question].[blocker] or [concern].| Mode | Scope | When |
|---|---|---|
| Sanity | Skim diff, obvious issues | Trivial changes, config, docs, low-risk |
| Standard | Full change set via targeted diffs, P0-P3 checklist, spot-check tests | Most changes — balanced cost/coverage |
| Deep | Targeted diffs + source context, all priorities, trace data flow | Security-sensitive, core architecture, unfamiliar domain |
Announce mode: "Reviewing in [mode] because [reason]. Adjust?"
Default to Standard. Escalate to Deep if review surfaces unexpected complexity.
Start high level, work down: Focus on design and structure first. Defer naming, comments, and style until high-level issues are resolved — low-level notes often become moot after refactoring.
Review in this order. Stop and flag blockers immediately.
| Priority | Category | Focus |
|---|---|---|
| P0 | Security | Injection, auth bypass, secrets exposure, unsafe deserialization |
| P1 | Correctness | Does it do what it claims? Edge cases? Error paths? |
| P2 | Data integrity | Validation, transactions, idempotency, race conditions |
| P3 | Architecture & Operability | Coupling, contracts, backward compat, observability, rollback |
| P4 | Performance | Only if measurable impact — N+1, unbounded growth, hot paths |
| P5 | Maintainability | Readability, naming, complexity, test quality |
| P6 | Style | Only if egregious or violates established conventions |
Attention budget: P0-P2 (70%) catch most production incidents — prioritize these. P3-P4 (20%) architectural and performance. P5-P6 (10%) only when egregious.
Not exhaustive — a mental sweep, not a checkbox exercise.
Security (P0):
Correctness (P1):
Data (P2):
Architecture & Operability (P3):
Performance (P4):
Maintainability (P5):
Severity tags:
| Tag | Meaning | Blocking? |
|---|---|---|
[blocker] | Must fix before merge — security, correctness, data integrity | Yes |
[concern] | Should address — architecture, significant maintainability | Discuss |
[suggestion] | Consider — minor improvements, alternatives | No |
[question] | Clarify — reviewer may be missing context | No |
[nit] | Take or leave — style, naming preference | No |
[appraisal] | Acknowledge — good pattern, notable improvement | No |
Structure:
[tag] file:line — Brief issue
Why it matters: [impact if not addressed]
Suggestion: [concrete alternative, if any]
For [nit] and trivial [suggestion]: one-liner is fine.
Tone: Avoid "you" — focus on code, not coder. Use "we" or omit the subject. "You forgot to close the handle" → "File handle left open" or "Can we close the handle here?"
Example:
[blocker] auth/login.py:47 — SQL injection via username parameter
Why it matters: Allows auth bypass and data exfiltration
Suggestion: Use parameterized query: cursor.execute("SELECT ... WHERE user = %s", (username,))
Repeated patterns: Flag 2-3 occurrences, then ask the author to fix the pattern throughout.
Don't:
Do:
[suggestion] with risk assessment (likelihood, impact, failure mode) — don't suppress legitimate findings; document the tradeoffApprove when:
TECH_DEBT.md)[suggestion]/[nit] don't block — unblock progress while noting improvementsRequest changes when:
Comment without blocking when:
Iterative reviews converge by narrowing scope. A re-review after fixes is not a fresh review.
Re-review scope:
For round 2 after fixes, review only:
[blocker] / [concern] findings were fixed at root causeDo not broaden into unrelated code, re-derive the whole diff, or escalate methodology to match a prior reviewer. Review mode cannot exceed the original review mode unless the fix itself introduced new complexity or risk.
Convergence rule:
Stop when:
[blocker] remains[concern] items are fixed, accepted as tech debt, or explicitly deferred with rationaleAt that point, approve or comment. Remaining [suggestion], [nit], and low-risk [question] items do not justify another broad pass.
Blast-radius proportionality:
Review depth scales with blast radius, not with prior review depth.
Anti-pattern:
Methodological arms race: matching or exceeding a prior review's rigor to appear credible rather than because the change warrants it. This creates non-converging review loops. Prefer a smaller, evidence-focused re-review over a broader, more impressive one.
Ask questions to surface risks — do not assume intent or invent scenarios. Before finalizing, ask:
If unsure, raise as [question] or [concern], not [blocker].
Compact (Approve/Comment, zero blockers/concerns, ≤3 suggestions, ≤3 files, high confidence):
Review: [mode] — Approve
Full (everything else):
Review: [mode] — [verdict: Approve / Request Changes / Comment]
Blockers: [count or "None"]
Concerns: [count or "None"]
Suggestions: [count]
Overall: [1-2 sentence assessment]
Blast Radius: [Low: internal refactor | Medium: logic change | High: migration/public API]
Confidence: [high: thorough | medium: focused on key areas | low: quick pass]
Next step: [e.g., "Merge after minor suggestions" | "Ready for another look"]
Pairing (default): All prompts apply. "Adjust?" allows human to override review mode.
§BRAND_NAME_TITLE§ (multi-agent): No interactive prompts.
| Pairing Prompt | §BRAND_NAME_TITLE§ Behavior |
|---|---|
| Mode announcement ("Adjust?") | Announce mode, no prompt |
| "Ask the author" / "Clarify" | Check task spec and blackboard; if still unclear, note as [question] |
| "Consider suggesting a split" | Note as [concern] — do not block review |