/claude-swe-workflows:review-repofrom claude-swe-workflows
Performs whole-repository code reviews, producing orientation maps and focused deep reviews on architecture, dead-code, value, and namespace. Routes to other review skills when named.
Ships in claude-swe-workflows. 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.
Read when SKILL.md points to them.
One entry point for repository-wide review. It works in two shapes:
/review-repo [scope] gives the orientation map. This is the strategic pass for when you've inherited a repo, are evaluating a FOSS project, are onboarding a teammate, or are deciding where to invest in your own project. It covers breadth first, with evidence for every claim./review-repo <focus> [scope] gives a focused review, going straight to one deep review:| Focus | Question it answers | Agent |
|---|---|---|
architecture | Where should everything live? | swe-arch-reviewer |
dead-code | What can be deleted, and how sure are we? | swe-dead-code-auditor |
value | Which requirements cost more than they're worth? | swe-value-engineer |
namespace | Can a newcomer find things from the file tree alone? | swe-namespace-reader, swe-namespace-canary |
Several focuses can be named together (/review-repo value architecture); they run in dependency order (§Focused Reviews). A focus naming another review skill (security, test, perf, a11y, release) is routed to that skill.
This skill never changes code. It produces maps, findings, and ticket proposals. Removal and restructuring happen in /implement against the tickets, or in /refactor.
Observation before interpretation. The map follows an OODA cadence (Observe, Orient, Decide, Act) with strict phase gates. Observe collects signals without verdicts, and interpretation begins only after observation is complete. This counters the most common failure of informal review: fixating on the first file opened and building a distorted model from it.
"Good" is relational, not absolute. A 34% test coverage means something different in a research prototype than in an OSS library with external consumers. Calibration is anchored in reference classes (references/classes/). The repo is classified first, and each dimension is evaluated against that class's expectations. The classification is cited and overridable.
Every claim carries evidence. A finding without a file:line citation or a tool-output reference is an assertion. It is dropped or demoted to the Coverage Manifest. This is enforced structurally (§Evidence Discipline).
Named unknowns beat silent unknowns. The Coverage Manifest is first-class output. Tools that couldn't run, signals that couldn't be computed, and questions that couldn't be answered are named with their reasons.
Breadth first, depth on demand. The map is the wide, shallow pass. The focused reviews and sibling skills are the deep, narrow passes. The map decides which deep passes are worth their cost; there is no fixed sequence.
The practitioner traditions behind these: OODA (Boyd), medical differential diagnosis, home inspection (ASHI severity tiers), marine surveying (reference-class calibration), technical due diligence, behavioral code analysis (Tornhill), and value engineering (Miles, GE).
Parse the invocation. A recognized focus word selects §Focused Reviews; anything else is scope. With no focus, run the map.
Elicit the context (map only). Ask one question; do not guess:
What's the context for this review?
- Inheriting a work repository — taking over maintenance or ownership
- Evaluating a FOSS project — for adoption, contribution, or dependency
- Revisiting my own repo — strategic overview of current state
- Onboarding a teammate — generating a map for someone else
- Other — briefly describe
The context is a load-bearing input. It shapes classification and the Decide phase.
Elicit authority (map only) in the same exchange. There are two grants, both defaulting to no:
| Grant | Question | If granted |
|---|---|---|
| Follow-up reviews | May I run the deeper reviews the map calls for? | Phase 5 runs them; without it, Phase 4 only recommends them |
| Tickets | May I create tickets at or above a severity floor? Which floor? | Phase 5 creates them; without it, they're proposed |
Ask the ticket question only if follow-ups are granted. Mention that some follow-ups (notably /review-security) are heavy. The floor defaults to High. Granting tickets is the approval to create them.
The floor across scales: High = CRITICAL/HIGH, ASHI Safety Hazard/Major, release BLOCKER. Architecture, dead-code, and value items are always proposed, never auto-created.
Determine scope. The default is the whole repo. Honor a named directory or module in every phase. If the repo is very large (>100k LOC or >10 top-level subsystems), ask whether to scope down.
Abort if: not a git repository, or no source files in scope. Missing tooling is not a reason to abort; record it in the Coverage Manifest.
Phase 1 OBSERVE signals only, cited, no verdicts; Coverage Manifest
Phase 2 ORIENT classify → rubric per dimension → severity tiers →
cross-cutting synthesis → locate the interest
Phase 3 DECIDE 2-4 engagement options for the context, each cited
Phase 4 ACT top 3-5 next steps; focused reviews / skills to run
Phase 5 FOLLOW UP (with authority) run them, consolidate, ticket
Collect signals. Interpretation is not allowed in this phase. Output is neutral and factual ("X is present / absent / at value Y"). Every signal carries a citation: a file:line, a tool invocation and its output, or an explicit "could not be collected".
Repo shape:
tokei, scc, cloc; fall back to counting file extensions).tree -L 2 -d).Git history:
Change cost (where debt charges interest; see Step 2f):
scc --by-file -f json (its Complexity field), or lizard for per-function CCN. Fall back to code-line count, and record which measure was used.git log --since="12 months ago" --no-merges --name-only --pretty=format: | sort | uniq -c). Exclude generated files, lockfiles, vendored code, CHANGELOGs, and commits touching more than ~25 files.fix, bug, revert, regression, hotfix).Tooling (best effort; record absences):
npm audit, pip-audit, cargo audit, govulncheck, …)..env files, credentials in source, private-key headers).Documentation:
Coverage Manifest entries: what was attempted, why it yielded nothing, and whether the user could supply it.
Output: an Observation Record with referenceable IDs (O1, O2, …).
2a. Classify (differential diagnosis). Load references/classes/. For each candidate class, gather evidence for and against from the Observation Record and the context:
Candidate:
production-serviceFor:O12(Dockerfile with runtime target),O17(CI gates merges),O8(>5 contributors) Against:O4(no deployment artifacts, no on-call docs) Confidence: Low
Pick the best fit and hedge explicitly ("Classified as solo-utility (medium confidence)… override if you see it differently"). For a hybrid repo, apply each class's rubric where they differ and flag the hybrid.
2b–2c. Apply the class rubric. Read references/classes/<class>.md. Place each of the five dimensions (test health, dependency health, CI/automation, documentation, architecture hygiene) at Foundational, Adequate or Strong, with cited evidence and the gap to the next level.
2d. Severity-tier findings. ASHI tiers per references/severity-tiers.md: Safety Hazard / Major / Minor / Cosmetic. Severity is intrinsic to the finding. Lead with Safety; aggregate Cosmetic.
2e. Cross-cutting synthesis. Look for patterns that no single dimension reveals:
These are often the highest-leverage findings in the review.
2f. Locate the interest. A snapshot shows cruft (Fowler); change history prices it as debt (Cunningham's interest, Tornhill's method). Read the change-cost signals as a quadrant:
| Complexity | Change frequency | Reading |
|---|---|---|
| High | High | Debt being paid: every change costs interest. Engage here first |
| High | Low | Dormant cruft: ugly but stable; costs nothing until touched. Usually leave it alone |
| Low | High | Active code: usually healthy; act only if 2e flagged it |
| Low | Low | Settled. Ignore |
architecture focus.2g. Coverage Manifest. Carry it forward and add to it.
Integrity check: every Orient claim cites Observation IDs. An uncitable claim is dropped, demoted to the Coverage Manifest, or flagged "interpretation, no direct evidence".
Generate 2–4 options for the user's context, each citing the Orient findings that support or complicate it. The user picks; the skill does not.
Give the top 3–5 next steps, prioritized by severity × relevance to the context. Each is either a specific action with file:line pointers, or a deeper review with a scoped argument:
| Finding type | Route to | When |
|---|---|---|
| Module boundaries, coupling | /review-repo architecture <scope> | Architecture hygiene at Foundational, cross-cutting coupling |
| Hidden change coupling | /review-repo architecture <scope> | Change-coupled pairs with no static dependency (2f) |
| Dead or unreachable code | /review-repo dead-code <scope> | Dead-code signals in Observe, or before any architecture pass |
| Machinery out of proportion to the product | /review-repo value <scope> | Recommend only; its trades need the product owner |
| Confirmed hotspots (debt being paid) | /refactor <module> | Recommend only; it changes code |
| Test coverage or quality gaps | /review-test <scope> | Test health at Foundational, or specific gaps |
| Security findings | /review-security | Safety-tier security findings |
| Performance-sensitive code | /review-perf | Hot paths with no evidence of their cost |
| Accessibility (web) | /review-a11y | Web UI present |
| Documentation gaps | /tidy-docs | Documentation at Foundational |
| Pre-release readiness | /review-release | The user is preparing to publish |
Route only when the deeper pass does exactly what's needed at the depth warranted. Recommend shallow fixes directly.
Without follow-up authority, stop after Phase 4 and offer to run the recommendations.
With it, run the deeper reviews the map calls for, each scoped to where its findings point. Use judgment, not a checklist: every review that plausibly applied and didn't run gets a one-line reason in the report.
dead-code, architecture, and namespace (audit mode) focuses (run per §Focused Reviews), /review-security, /review-perf, /review-a11y, /review-test, /review-release./review-release runs report-only: stop after its findings presentation. It applies no fixes and makes no commit, so this skill still changes no code./refactor and /implement, because they change code.value focus, unless intent asks for it, because its trades are product decisions.namespace focus in search mode, because it needs the operator. Audit mode may run when the map's findings point at legibility.Tickets. Each deep review with a ticket step ends with a ticket proposal. With ticket authority, approve proposals at or above the floor and decline the rest, recording them, per references/advisory-tickets.md. Without it, decline all of them in-run and propose one consolidated set at the end, ordered by severity, created only on approval. Skills with no ticket step (/review-perf, /review-a11y, /review-release) feed findings straight into the consolidated set; with ticket authority, create those at or above the floor directly.
Consolidate. Dedupe findings that several reviews raised (a confirmation is not a second finding). Reconcile them with the map; where a deeper review contradicts the map, the deeper review wins and the contradiction is reported.
Escalate rather than decide when a fix would need a breaking change, or two reviews contradict each other on the same code. For long runs, keep REVIEW_REPO_STATE.md (gitignored) with the pinned intent and the reviews already run, so the run can resume after compaction.
Each focus runs one fresh agent and follows the same protocol:
references/autonomy.md.references/advisory-tickets.md, creating them through references/trackers.md. Declining is a valid outcome; the analysis stands as a planning artifact.An honest zero is a valid result for every focus. Report it and stop. If the agent fails, retry once and then surface the error. If the tracker is unavailable after approval, show the approved set so the tickets can be created by hand.
Several focuses together run in this order, each receiving the previous one's output:
architecture — target blueprintPrompt swe-arch-reviewer with the scope, the auditability ceiling (the project's stated file-size limit, or 500 lines), any dead-code audit already produced, and the map's hidden-coupling pairs. Ask for a target blueprint that covers every module, existing and proposed.
Present four things:
Iterate until the operator is satisfied. Architectural decisions are consequential, so don't rush this step.
Tickets: one per blueprint item, grouping items when that makes the work cohesive (for example, "dissolve helpers.go" is one ticket, not six). Each ticket has:
/implement for changes within an existing module, /scope then /implement for new modules or cross-module moves.dead-code — calibrated auditPrompt swe-dead-code-auditor with the scope. It surveys dynamic dispatch first, determines the reference roots (an application's entry points, or a library's public API), runs the language tooling that's available, and tiers every finding PROVEN, LIKELY or UNVERIFIABLE with evidence.
Present the calibration first: the dynamic-dispatch survey and the roots determination, because they tell the operator how far to trust everything below. Then the findings by category, each with its tier, evidence, and estimated lines. Show intentionally retained items (suppressions, decision-record-protected code) separately; they are not proposed for removal.
Tickets:
/implement.value — trade menuPrompt swe-value-engineer with the scope and any context worth having: an architecture mechanism audit (its serves: citations are cost attribution already done), or operator suspicions, which are hypotheses to check, not conclusions to confirm. It discovers requirements across provenance tiers (documented, pinned by tests, inferred from behavior), attributes cost to them, and returns a trade menu ranked by leverage.
Present the full menu. For each trade, the operator must be able to see, without asking:
Also present the drift observations: documented requirements the code no longer honors.
The operator rules on each trade. These are product decisions.
Tickets, for approved trades only. The amendment leads.
An approved trade that changes only code is a time bomb: the next agent to read the unamended requirement will faithfully rebuild the machinery.
namespace — measured legibilityRead references/namespace.md and follow it. It holds the instrument: blind probe generation, sighted ground-truth pinning, the reader fleets, the Laws of the Instrument, the finding classes, and search mode. It is kept out of this file because only this focus needs it.
search (/review-repo namespace search) and the operator confirms the cost (millions of tokens) and a round cap. Its calibration checkpoints need the operator, so it never runs unattended.These rules are structural, not stylistic:
file:line or tool-output reference. Drop or demote a claim without one.The map runs in the main instance; OODA synthesis needs one context. Use subagents narrowly:
Do not routinely spawn per-language consultants.
Inline markdown by default.
Map, in order:
Focused review: the presentation described for that focus, then the summary from protocol step 6.
/implement and /bug-fix run the correctness gate. For a diff produced elsewhere, use Claude Code's built-in /code-review./review-security, /review-test, …), which it routes to.references/README.md (opens in a new tab)references/classes/README.md (opens in a new tab)references/classes/oss-library.md (opens in a new tab)references/classes/production-service.md (opens in a new tab)references/classes/prototype.md (opens in a new tab)references/classes/solo-utility.md (opens in a new tab)references/namespace.md (opens in a new tab)references/severity-tiers.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
opus22 skills in this plugin
/bug-fixDiagnosis-first bug fixing with test-driven reproduction, root-cause analysis, and a targeted fix plus regression test. Use when the user wants to fix a bug with thorough investigation./bug-huntProactive bug hunting. Assesses where bugs likely hide, confirms each finding with a reproducing test, and iterates until nothing is found above a severity floor. Advisory by default; creates tickets or fixes via /implement only when authorized./implementImplements a ticket, a batch, or an open-ended goal end to end, choosing agents and reviews by judgment over a fixed floor (concept inventory, practical verification, green tests, correctness review). Autonomous after one planning interaction.npx claudepluginhub chrisallenlane/claude-swe-workflows --plugin claude-swe-workflowsOther plugins' skills for the same job