/claudops:srfrom Claudops
Reviews code before merge: PRs, branches, commit ranges, task paths, or working tree. Supports task/spec-aware review when task docs exist.
Ships in Claudops. 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.
If
.claude/skills/sr/SKILL.md.disabledexists, stop before reading a fallback. Project configuration: If the current project contains.claude/skills/sr/SKILL.md, read and apply it instead of this bundled default. The project copy is the capability source of truth. Repository context: Read../setup/references/task-context.mdwhen resolving a task, project commands, named agent roles, or legacy.claude/resource paths. Use repository evidence and applicable project instructions; a missing local workflow copy does not require setup. Resolve bundled resources from the installed skill, never from the target cwd.
Announcement: Begin with: "I'm using the sr skill for universal code review."
Universal review entrypoint for task paths, PRs, branches, explicit ranges, and local working-tree drafts. Resolve the review target first, then only run checks supported by the evidence you actually have.
Before resolving the target, resolve one task context with ../setup/references/task-context.md. Reuse
the explicit task or linked active task; otherwise create the minimum record in the configured task
root. A PR title/description is review context only and never becomes an invented specification.
Link the review artifact, immutable snapshot, verification results, findings, and one next action
from that record. Existing conversation authorization remains authoritative for writes. If this is a
read-only review, return a proposed path rather than
creating a task file.
/prc/code-analysis/riptaskprrangebranchworking-treebranchRecord these fields before dispatching reviewers:
has_task_dochas_spechas_committed_snapshotcan_run_verificationreview_scopeRules:
task mode may use task docs and spec compliancepr, branch, and range modes do not require task docsworking-tree mode never requires a clean treehas_committed_snapshot = false for working-tree; set it from resolved SHAs for committed modesPrefer base in this order:
mainmasterCompute diff context once and share it with all reviewers:
changed_filesfull_diffreview_modebase_refhead_refhas_specDiff rules:
task, pr, branch, range: use committed diff from the resolved base or explicit rangeworking-tree: use staged plus unstaged local diff, include untracked files in changed_files, set base_ref = HEAD, and set head_ref = working-treeDo NOT force main...HEAD onto every review mode.
Use quick only when ALL are true:
<= 3 changed files<= 50 diff linesOtherwise use full.
Deep (thermo) scope (/sr deep): opt-in structural-quality tier. deep runs everything full
does plus the structural-quality-reviewer (STEP 5.3). It is never auto-selected — only the user
invokes it via /sr deep.
Auto-suggest deep: after resolving scope, if the diff crosses any structural threshold — a changed
file > 1000 lines, > 15 changed files, > 600 changed lines, or a module rename/move — and the user
did not request deep, add a one-line recommendation to the review output (alongside the STEP 10 QA
recommendation): Deep structural review recommended: <trigger>. Run /sr deep. This is a recommendation,
not a blocker — continue with full.
Full-feature scope option (--scope=feature): When reviewing Phase N of a multi-phase task and the task directory contains earlier phases, optionally include the full feature diff (all phases from the earliest base commit to HEAD). Flag files changed in earlier phases but not in the current phase as integration surface — these are where cross-phase bugs hide. Use this when the current phase integrates with prior phases or when the task doc mentions cross-phase dependencies.
deep is a superset of full: apply every full-scope rule below, then add the structural pass (5.3).
Run spec-compliance-reviewer only when has_spec = true.
If no spec exists, write:
Skipped - no task/spec artifact available.
Always run:
security-code-reviewercode-quality-reviewerRun senior-architecture-reviewer when:
full, orIn full scope, also run:
test-coverage-reviewerdocumentation-accuracy-reviewerperformance-reviewerIn deep scope, additionally run structural-quality-reviewer — a whole-module structural audit
(details in its agent file). It writes to <!-- SECTION:structural-quality -->. Never run it in quick
or full.
Orchestrator-owned inline checks (not subagents) plus a sibling-scan procedure. The trigger table and
per-pass checklists — error-path, integration-seams, cross-surface entity — and the pattern-propagation
procedure live in references/review-passes.md. Read it now when the diff matches any trigger, run
the matching pass, and add findings to key-findings.
For every skipped reviewer, write a one-line reason in that section. If the host cannot dispatch the selected reviewers in one batch, run the same selected passes sequentially and preserve their scope; do not silently reduce coverage.
When pattern propagation finds occurrences outside the diff, report them as contextual, non-gating evidence unless the current change amplifies or newly exposes the pattern. Keep changed file findings primary and do not expand the verdict to unrelated pre-existing defects.
Verification is evidence, not a prerequisite for starting review.
task: prefer verification commands from the task doc; otherwise run narrow package checkspr, branch, range: run the smallest repo-appropriate checks for touched packages when safeworking-tree: run only safe local checks; do NOT block review on a dirty treeIf verification is skipped or partial, record it. Missing verification is not passing verification.
There is one review artifact per target, independent of whether the target is a task, PR, branch, range, or working tree. Resolve the path in this order:
<resolved-task-root>/code-review-[target].md, sanitizing / and spaces in the
target. This keeps non-task reviews with the same durable task context instead of creating a
competing .claude/reviews tree.For a read-only review, report the proposed or linked path and skip all artifact writes in this step and later steps. For a writable re-review, retain the prior revision and evidence; append a new revision block or update only the new revision after findings are ready. Do not clear the old review before a replacement exists, and do not create a second file for the same target.
If no writable artifact exists, create it from .claude/docs/templates/code-review-template.md under
the resolved task root.
Pass the common target context to every reviewer and request an inline structured finding/result.
Dispatch all agents selected in STEP 5 in a single turn when the host supports independent
parallel calls; otherwise run the same selected passes sequentially without reducing coverage.
Reviewers return findings; the single orchestrator writes the shared cr_file_path after all results
arrive. Disjoint <!-- SECTION:xxx --> markers are layout, not a concurrency guarantee.
If an agent fails or times out, the orchestrator writes a fallback note into its section:
*Review skipped — [agent-name] did not complete.*
Once every dispatched agent has finished, proceed to STEP 9.
If the request is read-only, return the inline findings, observed verification, and proposed or linked artifact path, then stop. Do not write the review file or task record.
The orchestrator writes the remaining sections that agents do not own:
review-context — fill from STEP 2 capabilitiessummary — synthesize a 2-5 sentence note from agent findingsverdict — one of the verdicts belowkey-findings — consolidate actionable findings from all agents. Include every CRITICAL and MAJOR regardless of confidence. For MINOR/INFO, include items marked confidence: high; drop or collapse confidence: low MINOR/INFO into a single "Other low-confidence notes" bullet. Order by severity, then confidence. Structural [OPPORTUNITY] findings (deep scope) go in a dedicated "Structural Opportunities" sub-block — they surface prominently but do NOT count toward the verdict; route them to /prc or a follow-up task.coverage — record what was reviewed and what was skippedverification — record commands run and resultsmetadata — changed files, diff source, reviewers invokedUse the Edit tool to append the new orchestrator revision or update its own markers in
cr_file_path. Do NOT overwrite the entire file — prior revisions and reviewer results remain
evidence.
After writing the verdict, link the review artifact and observed result from the resolved task record, including the next action. One orchestrator owns the shared review file; reviewer agents return findings and never rely on parallel writes being safe merely because markers are disjoint.
Verdicts:
DRAFT REVIEW: working-tree review or no immutable snapshotAPPROVED: committed snapshot, sufficient coverage, 0 critical, 0 majorAPPROVED WITH NOTES: committed snapshot, 0 critical, 0 major, but verification or coverage is partialNEEDS FIXES: any critical or major finding (including structural CRITICAL/MAJOR from deep scope; [OPPORTUNITY] findings never trigger this)Never return APPROVED for an uncommitted working-tree draft.
After the verdict is written, check whether the diff affects user-facing rendering — any file that produces DOM output, styling, or routing state. Use this list as a seed, not a limit: .svelte, .tsx, .jsx, .vue, .html, .astro, .mdx, CSS/SCSS, component stories, route files. When in doubt, treat it as UI. If it qualifies, append a QA recommendation to the review file:
QA recommended: This review includes UI changes. Static code review cannot catch runtime layout, navigation, or user-flow issues. Consider running browser-based QA (manual or automated) before merging.
This is a recommendation, not a blocker. It surfaces the gap between "code looks correct" and "feature works correctly."
Three gates are worth re-stating because mis-handling them corrupts the review file:
cr_file_path after results arrive (see STEP 8).cr_file_path while preserving all reviewer results (see STEP 9).| Need | Use |
|---|---|
| Address review feedback | /prc |
| Formal tracked implementation | /si |
| Explore code before reviewing | /code-analysis |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
40 skills in this plugin
/analyzeCompare a task's discovery or product requirements with its tech decomposition and report traceability gaps. Use when asked to 'analyze consistency', 'check alignment', 'verify spec matches plan', 'traceability check', 'spec drift', 'are my docs aligned', or after /ct completes to verify the plan covers the requirements. `/ct` may invoke this check when traceability is material; otherwise it remains an explicit read-only command. NOT for code review (use /sr), NOT for code analysis (use /code-analysis), NOT for debugging (use /dbg)./antigravity-cliRun Google Antigravity CLI (agy) for web-grounded research, cross-AI review, or validation when those capabilities are explicitly needed or another skill delegates to agy. One-shot only; do not select it for an ordinary review without an explicit provider choice./npx claudepluginhub alexandrbasis/claudops --plugin claudopsOther plugins' skills for the same job