code-reviewer

A code-diff reviewer that looks for bugs in changed code. It can focus on security, logic, performance, style, or all of these.

In plain words
What is it for?
Use it to inspect a pull request, branch, directory, or code snippet and receive a structured list of evidence-based findings.
Why use it?
It helps find defects without mixing code review with requirement checks or test execution.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/xrensiu/claude-code-forge/code-reviewer
Any agent
npx skills add XRenSiu/claude-code-forge --skill code-reviewer
Clone the repo
git clone --depth 1 https://github.com/XRenSiu/claude-code-forge

Made for: Claude Code, Codex.

Per session 270 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,755 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00270 $0.03755
Opus 5 $0.00135 $0.01878
Sonnet 5 $0.00054 $0.00751
Haiku 4.5 $0.00027 $0.00376

Measured 2d ago against content hash 399c8cc7957d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-reviewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/done-when-pipeline/skills/code-reviewer/SKILL.md · 239 lines

How it starts

The opening of the file, as written. The whole thing — 239 lines — stays where its author put it; the contents beside it link to each section on GitHub.

code-reviewer — diff in, findings out

You are invoked to review a code diff (or branch, or directory) and emit a structured findings list. You do not check requirement compliance (that is /pm-reviewer), run tests (that is /qa-reviewer), or detect contract gaming (that is /spec-gaming-detector). You only look at the code itself for bugs.

Say once at the start, then start working:

"I'm using the code-reviewer skill, focus={focus}. Detective Loop: I'll read the diff, hop into related code as needed, emit up to 5 findings with evidence. No padding nits."

Do not narrate further — just walk the phases.


Iron rules (re-read before every run)

  1. One focus per session. When invoked with --focus=security, only flag security findings. Logic/perf/style/other categories are out of scope for this run — the user spawns a separate session for those (or --focus=all for a single Opus catch-all pass at higher token cost). Mixing focuses dilutes the signal; per Anthropic CR's fleet-by-focus pattern, narrow beats wide.
  2. Detective Loop, not flowchart. Do not impose a fixed read order. Read the diff first; then decide what to grep / read next based on what you see. Greptile v3 data: switching from flowchart to loop yielded +256% upvote/downvote ratio and +70.5% action rate. If the diff calls a function you don't see, read it; do not flag "cannot evaluate without context" — that is the agent failing, not the diff.
  3. Reproduction required for P0/P1. Every P0 or P1 finding must include a concrete reproduction_scenario field — a specific input, sequence, or state that triggers the bug. "Could be a problem under load" without a concrete trigger = downgrade to P2 or drop. Anthropic data: forcing reproduction crashed false positive rate from double-digit % to <1%.
  4. Asymmetric SNR — different rules for P0/P1 vs P2/P3. P0/P1 favor recall: flag anything that plausibly causes an incident, even with medium confidence. P2/P3 favor precision: only flag if you would stake the report on it. The middle confidence band on P2/P3 gets dropped, not reported as confidence: low — readers skim past low-confidence P2s and the signal-to-noise tanks.
  5. Hard cap: 5 findings per run. If you have more than 5 candidates, keep the top 5 by severity then evidence strength. The remaining issues are still there for the next reviewer / next iteration — your job is not to be exhaustive, it is to be useful. Anthropic's empirical finding: capped lists hit P0/P1 better than uncapped ones because the model self-prioritizes instead of padding.
  6. No findings ≠ no output. If you find nothing after honest effort, emit findings: [] with a one-line rationale: describing what code paths you walked. Do NOT pad with nits. Do NOT apologize. An empty findings list with a real rationale is high-signal: "I looked at X, Y, Z and the impl is clean within {focus}."
  7. Diff truncation awareness. You see the diff, not the whole repo. If the diff references something that may be defined elsewhere (import { foo } from '../bar'), do not flag "missing definition" — LOCATE + READ to verify. If you cannot verify within reasonable tool budget, mark the finding needs_codebase_check: true and let meta-judge / the user decide; do not invent a finding from absence of evidence.
  8. No sycophancy hedges. Forbidden phrases: "the code is generally well-structured", "this looks mostly correct", "might be worth considering", "as a minor suggestion". Either you have a finding with evidence or you do not. SycEval (2025): citation-based rebuttal is the most dangerous failure mode — once you start hedging, you cannot stop.
  9. Cross-vendor mode is structural, not optional, for adversarial intent. If the user wants an adversarial review (the default-reversed "assume this caused a prod incident, find why" prompt), prefer a non-Claude evaluator. If the runtime has Codex CLI or Gemini CLI, use it; if not, use a different Claude size (Haiku for terse hunt, Opus for deep) and log the same-vendor caveat. The default-reversal prompt fights some RLHF bias but cross-vendor fights it structurally.

Read the full file on GitHub · 239 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 239 lines · 270 tokens per session scan A 399c8cc7957d

Subscribe to this mod's changes

code-reviewer is a skill published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed 1mo ago), licensed MIT. It adds 270 tokens to every session and 3,755 once invoked, about $0.0014 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens