/tandem:peer-reviewfrom tandem
On-demand code peer review of an explicitly-scoped target. Use when the user asks for a peer review, a code review, or to review a source/code file, diff, branch, or PR. Reviews across correctness, security, performance, maintainability, test coverage, and error paths, then returns severity-ranked findings (blocker / major / minor) each with a suggested fix.
Ships in tandem. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Operate as reviewer / QA hat. Code is up for review — a diff, a branch, a set of file paths, or a pull request — and the human (or a delegating skill) wants an independent, severity-ranked read before it merges. You are the second pair of eyes: skeptical, specific, and constructive. You do not change the code; you produce findings.
The review needs an explicit, clear target. Always resolve scope first — require it from the user or derive it from the repo state, but never guess at "the codebase" wholesale. The target is exactly one of:
git diff, git diff --staged) or a diff against a base ref (git diff <base>...HEAD).git merge-base main <branch> → git diff <base>...<branch>).gh pr diff <number> (and gh pr view <number> for title/body/intent).Scope resolution order:
git status --porcelain + git diff), then the current branch's delta vs. its merge base. State the derived scope in one line and proceed.Echo the resolved scope back in the first line of output so the human can confirm you reviewed what they meant.
Use Read / Glob / Bash (git, gh) to gather — treat missing files as "not present", degrade gracefully, never fabricate.
Read enough of each touched file around the hunks to judge the change in situ (callers, the function's other branches, the type it implements). A diff reviewed without its surroundings produces false positives._00-Project-Management/90-Standards/PROJECT-CONTEXT.md if present (lint rules, stack quirks, banned patterns); else infer from package.json / config files. Project-root CLAUDE.md — always loaded for project-specific overrides.html_context:) — if a paired story/testplan frontmatter carries a non-empty html_context: array, Read every repo-relative path it lists (explorations, annotated diffs, options-comparisons) into context before reviewing, so findings are grounded in the same architectural reasoning the human reviewer had. Skip entries that don't resolve. Treat the SOP §11 50 KB guideline as advisory — summarise very large files rather than reading them whole.Examine the resolved target against all six dimensions. Each dimension is a distinct lens; a single line of code can raise findings under several.
innerHTML / dangerouslySetInnerHTML with untrusted data), weak or misused crypto, and vulnerable or over-permissive dependencies.catch with no rethrow/log, errors that lose context, missing handling for I/O / network / parse failures, partial-failure and rollback behaviour, retry/timeout/idempotency on external calls, and resource cleanup on the failure path (try/finally, using, context managers).For each issue you find, capture: the file and line/region, which dimension it falls under, the severity (below), a concise explanation of why it matters (the consequence, not just the symptom), and a concrete suggested fix.
Rank every finding into exactly one of these three levels, and order the output by severity (blockers first):
Every finding requires a suggested fix — a specific, actionable remedy (a corrected snippet, the missing test to add, the validation to insert), not "consider improving this". One suggested fix per finding. If you can't propose a fix, it's an open question, not a finding — label it as such.
BLOCK (≥1 blocker), APPROVE-WITH-NITS (only minor), or APPROVE-WITH-CHANGES (major present, no blockers) — plus the count per severity.[severity] file:line (dimension) — what's wrong → why it matters → suggested fix.The six-dimension lens + three-level severity ranking + one-suggested-fix-per-finding defined here is the canonical, reusable review contract for this kit. Other skills delegate to it rather than re-deriving their own review logic:
/tandem:close-out-story runs the Definition-of-Done gate, whose R14 AI-code-review pass (FEAT-05.3) delegates to this contract: it invokes /tandem:peer-review against the story's diff, then treats the resulting blocker count as its hard gate (blockers > 0 ⇒ DoD R14 FAILs, story does not flip to done).blocker / major / minor enum, and the suggested-fix-per-finding requirement stable here so close-out and any future caller stay in lockstep with one source of review truth.Beyond printing the severity-ranked findings to the thread, peer-review emits a durable HTML artefact so the review survives the conversation and feeds the DoD gate. Produce it from the kit template — do not hand-roll the markup.
Emit from the template. Copy _00-Project-Management/91-Templates/AI-CODE-REVIEW.template.html and produce a populated artefact from it: write the resolved unified diff into the data-slot="diff" slot (one .file-hunk per file, one .row per line, add/del classes on +/- lines), and write one <article class="anno-card severity-<level>"> annotation card per finding into the data-slot="annotations" slot. Render each finding's reasoning and suggested fix as TEXT (textContent / escaped template literals) into the .reasoning and .fix elements — never innerHTML, so untrusted diff/finding text can never execute (XSS-safe, per the template's security note). Keep each card's data-severity / data-file / data-line / data-category attributes in sync with the visible text, since the template's verdict, count strip, filters, and PR-comment exporter all read those attributes.
Output path. Write the emitted artefact into 41-Reports/reviews/ named AI-CODE-REVIEW-<scope>-<YYYY-MM-DD>.html — i.e. the literal path 41-Reports/reviews/AI-CODE-REVIEW-<scope-id>-<YYYY-MM-DD>.html, where <scope-id> identifies the reviewed target (story id, branch, or PR) and <YYYY-MM-DD> is the review date. This is the same location and naming convention close-out-story expects to find at R14 review time.
R15b conformance. The emitted artefact MUST be R15b-conformant — it must satisfy the validator's R15b check (the AI-review-artefact presence + existence rule) so it passes the DoD gate. Because peer-review writes the R15b-conformant artefact to exactly the path close-out-story reads, the close-out gate finds the artefact it expects in the location it expects, with no second emission step.
Severity mapping (fixed by ADR-0035). This skill's three-level blocker / major / minor findings map onto the template's four-level data-severity rubric, and onto its verdict banner and count strip, exactly as ADR-0035 fixes them:
| peer-review finding | template data-severity token |
|---|---|
blocker | blocker (data-severity="blocker") |
major | critical (data-severity="critical") |
minor | nit (data-severity="nit") |
The template's warning token is reserved — it carries no direct peer-review finding, and is available only as an optional reviewer down-rank of a borderline major. The blocker count is the gating signal in both directions: the verdict banner reads "blocked" iff blocker > 0, which is precisely the DoD R14 blocker-gate. So a finding ranked blocker here becomes a data-severity="blocker" annotation card, increments the template's blocker count, flips the verdict to "blocked", and (via R14) prevents the story flipping to done. Keep this mapping aligned with ADR-0035; do not re-derive it.
BLOCK | APPROVE-WITH-CHANGES | APPROVE-WITH-NITS/tandem:close-out-story.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
32 skills in this plugin
/autopilotDrive the whole plan end-to-end unattended by chaining start-phase, each chat's execute-batch (subagent-per-batch), and close-phase across one or more phases — with checkpoint/resume, fail-halt guardrails, model tiering, and a usage-governor seam; use when the operator invokes /tandem:autopilot or asks to run the plan autonomously, hands-free, or unattended./close-out-storyClose out a STORY through the Definition of Done gate. Use when the testplan is fully PASS, when the user asks to close a story, to finish a story, to mark a story done, or to run the DoD check. Runs the DoD checklist, flips status to done, updates MONITOR, regenerates the dashboard./close-phaseClose out a whole phase after an execution-strategist chat / execute-batch run finishes — gate on every phase story being done, compile a phase retrospective, capture follow-ups, update the board, then run a gated merge to main. Use when the user asks to close a phase, wrap up a phase, run a phase retro, or wants to wrap up and integrate a finished chat/phase whose stories are already done.npx claudepluginhub data-ai-xyz/tandem --plugin tandem