Skip to main content
skill CX Codex

code-review-standards — Claude Code skill

code-review-standards is a Claude Code skill that structures code reviews by severity and ends with an APPROVE, WARN or BLOCK verdict.

Apache-2.0 223 installs ★ 80 updated 2026-07-18

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add bobmatnyc/claude-mpm-skills --skill code-review-standards -a claude-code
Open on GitHub

What code-review-standards does

Four buckets, applied top to bottom. CRITICAL covers hardcoded credentials, SQL injection, code paths through eval or exec, auth that can be bypassed, loops with no exit condition. HIGH adds type hints on public functions, a clean mypy --strict run, passing pytest, at least 90% coverage on new code, bare except clauses, mutable default arguments, blocking I/O inside async def.

MEDIUM and LOW are advisory: function length, timeouts on async calls, SELECT *, dead code, nested switch. Every level gets its own reference file next to criteria-efficiency.md, criteria-transferability.md and verdict-protocol.md.

The verdict opens the report on line one: APPROVE with nothing in CRITICAL or HIGH, WARN when HIGH findings exist without CRITICAL, BLOCK on any CRITICAL. A finding table follows, listing file, line, issue and the fix required. Anything under 80% confidence is meant to be raised as a question rather than a finding, since a clean pass counts as a result too. The checklist leans on Python tooling (mypy, pytest, PEP 8, asyncio), so a project in another language leaves much of HIGH inapplicable. You cannot type the skill name into chat either: it ships with user-invocable: false and is loaded by the code-critic agent.

What it helps with

  • catch a hardcoded key or SQL injection before merge
  • get the same verdict from every review run
  • separate blocking defects from advisory notes
  • self-check a change before asking for review
  • hand the reviewer a fixed report format

Example prompts for the agent

  • Run the code-review-standards checklist over the diff in auth.py and put the verdict on the first line.
  • Self-check this branch against code-review-standards; anything below 80% confidence goes in the questions, not the table.
  • Review the new endpoint with code-review-standards before code-critic sees it.

How to install code-review-standards

1Skills CLI (Vercel)

npx skills add bobmatnyc/claude-mpm-skills --skill code-review-standards -a claude-code

2Manually: put the files in place

~/.claude/skills/code-review-standards/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/code-review-standards/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about code-review-standards

How do I install code-review-standards in Claude Code?

Run npx skills add bobmatnyc/claude-mpm-skills --skill code-review-standards -a claude-code. The skill file lands in ~/.claude/skills/code-review-standards/SKILL.md.

What does code-review-standards do?

It gives a reviewing agent a fixed checklist with CRITICAL, HIGH, MEDIUM and LOW levels and requires the verdict on the first line of the report. CRITICAL and HIGH block delivery; the rest are logged as notes.

What do the APPROVE, WARN and BLOCK verdicts mean?

APPROVE means no CRITICAL or HIGH findings. WARN means HIGH findings but no CRITICAL, so the pipeline continues with the notes recorded. BLOCK means at least one CRITICAL, and the pipeline stops.

Source text

SKILL.md · Apache-2.0
---
name: code-review-standards
description: "Severity-tagged code review checklist (CRITICAL/HIGH/MEDIUM/LOW) used by code-critic agent"
user-invocable: false
disable-model-invocation: true
license: Apache-2.0
compatibility: claude-code
progressive_disclosure:
  entry_point:
    summary: "Severity-tagged checklist for code review. CRITICAL/HIGH block delivery; MEDIUM is flagged; LOW is noted. Critic outputs APPROVE (zero CRITICAL/HIGH), WARN (some HIGH, no CRITICAL), or BLOCK (any CRITICAL). 80% confidence filter — don't manufacture findings."
    when_to_use: "Loaded by code-critic agent to apply structured review criteria. Also loaded by engineers to self-check before requesting review."
    quick_start: "Apply checklist top-to-bottom: CRITICAL first, then HIGH, MEDIUM, LOW. For each finding: cite file+line, explain why it's a problem, provide the fix. Filter to >80% confidence. Output verdict with finding table."
  references:
    - criteria-critical.md
    - criteria-high.md
    - criteria-medium.md
    - criteria-low.md
    - criteria-efficiency.md
    - criteria-transferability.md
    - verdict-protocol.md
---

# Code Review Standards

## Purpose

This skill defines the structured checklist that the `code-critic` agent applies during
Stage 4 of the code production pipeline. The checklist is severity-tagged so that PM
and engineer both know exactly which findings block delivery and which are advisory.
Engineers may load this skill for self-review before requesting a critic pass.

The checklist exists because unstructured code review in multi-agent systems produces
inconsistent signal: one critic dispatch flags naming; another flags security; neither
flags the same things. Severity tagging makes the review deterministic across dispatches.

## The Severity-Tagged Checklist

### CRITICAL (must fix, blocks delivery)

- [ ] No secrets, API keys, or credentials hardcoded
- [ ] No SQL injection vectors (parameterized queries only)
- [ ] No arbitrary code execution paths (no `eval`, `exec`, unrestricted `pickle.loads`)
- [ ] Authentication/authorization not bypassable
- [ ] No infinite loops without escape conditions

### HIGH (must fix, blocks delivery)

- [ ] Type hints on all public functions and classes
- [ ] mypy --strict passes with zero errors
- [ ] pytest passes with zero failures
- [ ] Test coverage >= 90% on new code
- [ ] No bare except clauses
- [ ] No mutable default arguments
- [ ] No global mutable state
- [ ] No synchronous I/O inside async functions
- [ ] No N+1 query patterns
- [ ] Error cases handled explicitly (not silently swallowed)

### MEDIUM (flag, note in report, proceed)

- [ ] Functions <= 20 lines (prefer <= 10)
- [ ] No nested loops where hash map would reduce complexity
- [ ] list.pop(0) replaced with deque.popleft() where relevant
- [ ] asyncio.gather uses return_exceptions=True where appropriate
- [ ] Async operations have explicit timeouts
- [ ] Docstrings on public methods (Google or NumPy style)
- [ ] No Any types in production code paths

**Efficiency** (see [criteria-efficiency.md](references/criteria-efficiency.md)):

- [ ] No nested loops over two collections that should be a hash-map lookup (O(n*m) → O(n+m))
- [ ] No per-iteration I/O (queries/RPCs/fetches inside a loop) — batch outside the loop (HIGH on hot paths; see "No N+1 query patterns")
- [ ] Repeated deep property/selector resolution cached in a local (no greedy data access)
- [ ] String accumulation in loops uses list+join / StringBuilder, not `+=`
- [ ] No `SELECT *` / over-fetching in production query paths

**Transferability** (see [criteria-transferability.md](references/criteria-transferability.md)):

- [ ] No dead/unreachable code (statements after unconditional return/break/raise; uncalled private members)
- [ ] Long `if/else if` chains (3+ branches on one key) replaced by switch/match or dispatch map
- [ ] No nested `switch`/`match` — extract inner switch to a named function
- [ ] No actively misleading names (name contradicts the value it holds)

### LOW (note only)

- [ ] PEP 8 compliance (black + isort handles this automatically)
- [ ] Variable naming is clear and descriptive
- [ ] No commented-out code left in
- [ ] Import ordering is clean
- [ ] Naming consistency across the change (same concept, same name; consistent casing)
- [ ] No file managing too many responsibilities (see 800-line file limit)

## Verdict Format

Critic output MUST begin with the verdict on the first line, followed by the finding
table, followed by a summary paragraph.

**First line format:**
```
VERDICT: APPROVE
```
or
```
VERDICT: WARN
```
or
```
VERDICT: BLOCK
```

**Finding table format:**

| Severity | File | Line | Issue | Required Fix |
|----------|------|------|-------|--------------|
| CRITICAL | auth.py | 47 | Hardcoded API key `sk-...` | Move to env var; add to `.env.example` |
| HIGH | fetcher.py | 23 | `requests.get()` called inside `async def` | Replace with `await httpx.AsyncClient().get()` |
| MEDIUM | parser.py | 88 | Function is 34 lines | Extract `_parse_headers()` helper |

**Verdict definitions:**

| Verdict | Condition | PM Action |
|---------|-----------|-----------|
| APPROVE | Zero CRITICAL, zero HIGH findings | Proceed to Stage 5 (Security) |
| WARN | Zero CRITICAL, one or more HIGH findings | Proceed to Stage 5 with findings logged to docs handoff |
| BLOCK | Any CRITICAL finding (one or more) | Halt pipeline; surface findings to user; await user direction |

**APPROVE** means the implementation is ready for security review. MEDIUM and LOW findings
in an APPROVE review are passed to the Documentation agent as notes — they do not block
delivery but are preserved for future reference.

**WARN** means the implementation has structural issues that should be fixed but do not
represent exploitable defects or correctness failures. PM proceeds to security review
and appends the WARN finding table to the documentation handoff message. PM also logs
the findings (KB entry or todo) so they are not silently dropped.

**BLOCK** means the implementation has at least one defect that, if shipped, creates a
security vulnerability, data loss risk, or silent failure mode. PM halts the pipeline
immediately, presents the critic finding table verbatim to the user, and awaits explicit
direction. PM MUST NOT auto-retry the engineer without user input.

## 80% Confidence Filter

A clean review is a valid review. Do not manufacture findings.

Only report issues with >80% confidence they are real problems. Do not flag:
- Style preferences as HIGH or CRITICAL
- "This could theoretically be an issue in an edge case" without specific evidence
- Patterns that look unusual but may be intentional and correct
- Missing features that were not in scope (check the Stage 1 spec)

When confidence is below 80%, note the concern as a question in the summary paragraph
rather than as a finding in the table. Example: "The `process_batch()` function did not
appear to handle empty input — verify whether the caller guarantees non-empty batches."

This filter prevents the critic from becoming a noise generator that trains PM to
ignore findings. Each finding in the table should be actionable: engineer reads it,
knows exactly what to fix, and can do so without asking for clarification.

## Navigation

For detailed criteria with examples:
- **[CRITICAL Criteria](references/criteria-critical.md)**: Detailed explanations and examples for each CRITICAL item
- **[HIGH Criteria](references/criteria-high.md)**: Detailed explanations and examples for each HIGH item
- **[MEDIUM Criteria](references/criteria-medium.md)**: Detailed explanations and examples for each MEDIUM item
- **[LOW Criteria](references/criteria-low.md)**: Detailed explanations and examples for each LOW item
- **[Efficiency Criteria](references/criteria-efficiency.md)**: Algorithmic/data-access patterns (nested loops, fetch-in-loop, greedy access, loop concatenation, over-fetching)
- **[Transferability Criteria](references/criteria-transferability.md)**: Maintainability patterns (dead code, long if/else-if chains, nested switch, naming hygiene)
- **[Verdict Protocol](references/verdict-protocol.md)**: Full PM behavior for each verdict, failure loop templates

> The Efficiency and Transferability criteria are derived from CAST Highlight code
> quality indicators (https://doc.casthighlight.com/), paraphrased with original
> examples.

© bobmatnyc · Apache-2.0 · bobmatnyc/claude-mpm-skills

Similar skills

All skills for Code review and refactoring →

From the same set143

The whole set →
desktop-applications desktop-applications is a Claude Code skill for building cross-platform Rust desktop apps with Tauri or native GUI frameworks. It covers framework choice, app architecture, and OS integration. CX Codex +1 266installs trpc trpc is a Claude Code skill for building end-to-end type-safe TypeScript APIs with React Query. It activates for tRPC work and related implementation tasks. CX Codex +1 259installs api-review api-review is a Claude Code skill with a security checklist for verifying API routes and endpoints before deployment or PR merges. CX Codex +1 240installs jest Walks an agent through Jest on a TypeScript codebase: ts-jest config, mocks, table tests, coverage. Fits projects that already run Jest. CX Codex +1 234installs prisma Reference patterns for Prisma ORM in TypeScript projects: schema design, migrations, nested queries, and Next.js setup. CX Codex +1 222installs code-quality code-quality reviews Python for exception, comparison, import, constant, and dead-local issues. Use it for pull-request review or a self-check before committing. CX Codex +1 221installs react-core react-core is a Claude Code skill that gives an agent a React fundamentals reference for working with components and JSX, props and state, hooks, composition, lists, and controlled inputs. CX Codex +1 220installs supabase Provides patterns for configuring @supabase/supabase-js, querying Postgres via PostgREST, and setting up auth flows in Next.js, React, or Vue apps. CX Codex +1 219installs

Project sponsors

Companies that keep this analytics open