/security-review is the focused sibling of /review. Same input — your branch's pending changes — but a different lens: threat surfaces, secrets, input validation, auth checks. The things general review skims over because it has so many other things to look at.
Security problems in code share a property that makes them especially hard to catch in normal review: they don't look wrong. The unsafe SQL string concatenation parses fine. The unauthenticated endpoint compiles and tests pass. The hardcoded API key works in production until it leaks. The reviewer who knows what to look for finds these; the reviewer who's tired, on PR seven of the morning, and reading for general correctness reads past them.
A general-purpose review prompt averages across all those things. It catches some security issues but not consistently. A focused security review prompts the model to scan with a specific lens — "where does external input enter this code, and is it validated?" — and that single shift changes what gets found. The same agent, the same diff, the same code. Different findings.
The /security-review skill is exactly that prompt. It runs against your branch's pending changes (everything not yet on the base branch), categorizes findings by severity, and tells you which ones to fix before shipping versus which ones are "should we open a ticket" material. Use it before merging anything that touches a public surface, handles secrets, or moves data across trust boundaries.
/security-review looks forCheck out the branch you want reviewed. In the chat panel:
/security-review
The agent diffs against the base branch (usually main), reads every changed file plus enough surrounding context to understand the change, and runs through a security-focused checklist. The output is a structured findings list, ordered by severity.
Unlike /review, this one specifically ignores style and most general bug-hunting — it's looking at your changes through one lens, not all lenses.
The review walks (roughly) these categories:
Math.random() where CSPRNG is needed.Findings are flagged by severity:
Don't dismiss "medium" findings just because they aren't "high." Most real incidents start as mediums that compounded with other mediums.
For each finding, the next prompt is usually some variant of:
The last one is high-value. A vulnerability fixed without a test will eventually regress. A test attached to the fix prevents that.
Static security review always has false positives. The agent sees a SQL query that looks like concatenation but is actually using a parameterized API in a wrapper it doesn't recognize. Or it flags a "missing auth check" on an endpoint that's already protected by middleware higher up.
When you disagree, say so: "This is fine because queryWithBind is parameterized — see db/helpers.ts." The agent will revise its assessment. If the false positive is structural (the codebase has a pattern the agent keeps misreading), add a note to CLAUDE.md: "We use queryWithBind for safe parameterized queries — it's not concatenation."
/security-review catches a useful subset of issues — the kind that show up in code, in this diff, that a careful reader with security training would also catch. What it doesn't do:
/security-review assumes general threats; for high-stakes systems, you need a model.For systems where security failure is expensive (payments, identity, infrastructure), pair /security-review with periodic human audits. The agent is the floor; humans are the ceiling.