/harness:deep-reviewfrom Harness (обвязка)
Launches parallel agent reviewers per competency (security, performance, architecture, database, concurrency, error-handling, frontend, testing) for deep code review of large diffs. Synthesizes findings with FIX/DEFER/ACCEPT triage.
Ships in Harness (обвязка). 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.
Inspired by Memento workflow engine's parallel review pattern. Philosophy: one focused expert per domain > one generalist checking everything.
BASE=$(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@refs/remotes/origin/@@' || echo "main")
echo "BASE: $BASE"
BASE_REF=$(git rev-parse --verify --quiet "refs/remotes/origin/$BASE" 2>/dev/null || git rev-parse --verify --quiet "$BASE" 2>/dev/null || true)
if [ -z "$BASE_REF" ]; then
echo "No locally available base ref for $BASE; cannot perform a read-only diff." >&2
exit 2
fi
echo "BASE_REF: $BASE_REF"
echo "=== DIFF STATS ==="
git diff "$BASE_REF" --stat
echo "=== CHANGED FILES ==="
git diff "$BASE_REF" --name-only
echo "=== DIFF SIZE ==="
git diff "$BASE_REF" --shortstat
Store the BASE branch name, resolved local base ref, and list of changed files.
Report-only review does not run git fetch, pull, or another command that
updates Git state. If the accepted task explicitly requires a fresh remote base
and permits that preparation mutation, run git fetch origin "$BASE" --quiet
without suppressing failure before resolving BASE_REF; otherwise state that
the review used the locally available ref.
If there is no diff, stop: "Nothing to review — no changes against $BASE."
Based on the changed files, select ONLY the competencies that are relevant. Do NOT run all 8 for a 3-file CSS change.
Default to a review-only task. Enter review-and-fix only when the user clearly authorizes both review and implementation (for example, "review and fix"). In either mode, the review phase remains read-only; review-and-fix continues with the approved remediation in this same task after findings are triaged.
| Competency | Trigger files/patterns |
|---|---|
| security | auth, middleware, routes handling user input, env files, CORS, JWT, crypto, passwords, tokens, API keys |
| performance | database queries, loops over collections, API endpoints, bundle config, image/asset handling, caching |
| architecture | new files/modules, cross-module imports, service boundaries, DI patterns, >5 files changed |
| database | migrations, schema changes, raw SQL, ORM queries, transactions, indexes |
| concurrency | queues, workers, locks, async/await patterns, shared state, cron jobs, webhooks |
| error-handling | try/catch blocks, error responses, validation, external API calls, file I/O |
| frontend | Vue/React components, CSS/Tailwind, composables/hooks, stores, routing, i18n |
| testing | test files changed OR >100 lines of logic changed without test changes |
Select every materially relevant competency and no others. Diff size is a signal to inspect scope, not a reason to add unrelated reviewers. A single competency is valid when the changed risk has one material dimension.
Output the selected competencies with a one-line justification each:
Selected competencies (4 of 8):
✓ security — auth middleware modified
✓ database — new migration + 3 query changes
✓ concurrency — BullMQ worker modified
✓ error-handling — 4 new try/catch blocks in API routes
✗ architecture — no new modules, existing patterns
✗ performance — no hot paths touched
✗ frontend — no UI changes
✗ testing — test files updated alongside logic
git diff "$BASE_REF"
Read the full diff. You need it to construct focused prompts for each competency agent.
Also identify which files are relevant to each selected competency — each agent should receive ONLY the files relevant to its domain, not the entire diff.
For each selected competency, launch an Agent tool call in parallel. Each agent:
CRITICAL: Launch ALL agents in a SINGLE message (parallel tool calls). Do NOT launch them sequentially.
If a reviewer must run tests, give it an isolated writable worktree and a unique
writable scratch directory. Capture git status --porcelain=v1,
git diff --exit-code, and git diff --cached --exit-code before and after the
review. Do not place a test-running reviewer in an OS-level read-only sandbox:
pytest and similar tools legitimately create temporary files. If only a strict
read-only sandbox is available, provide immutable test receipts for inspection
and say that the reviewer did not execute the tests.
For each competency, use this prompt structure (fill in {COMPETENCY}, {CHECKLIST}, {FILES}):
You are a {COMPETENCY} specialist reviewing code changes. Your ONLY job is {COMPETENCY} — ignore everything else.
## Review authority and writable scratch
Repository root: {REPO_ROOT}
Scratch directory: {REVIEW_SCRATCH}
You are a reviewer, not an implementer. Do not create, modify, delete, format,
or install anything in {REPO_ROOT}; do not alter Git or worktree state. If a
review command genuinely needs a file, write only under {REVIEW_SCRATCH}.
Return findings in the required response format; do not create a project report
or patch. If tests cannot run without writing elsewhere, inspect the supplied
immutable test receipts and label execution NOT_RUN.
## Changed files to review
{list each relevant file path}
Read each file listed above using the Read tool. Then apply this checklist:
## Checklist
{CHECKLIST from competency definitions below}
## Output format
For EACH finding, output exactly:
FINDING: {one-line description}
FILE: {path}:{line}
SEVERITY: CRITICAL | HIGH | MEDIUM | LOW
EVIDENCE: {quote the problematic code, max 3 lines}
FIX: {concrete fix suggestion, not vague advice}
CONFIDENCE: HIGH | MEDIUM | LOW
If you find NOTHING — output: "NO_FINDINGS — {COMPETENCY} review clean."
Do NOT pad with compliments. Do NOT report things that are fine. Only problems.
## Admission — screen each candidate BEFORE you publish it
A suspicion is a candidate, not a finding. Put each one through these five before it
reaches the report, and drop it silently if it fails any:
- **Authority** — does a real contract, spec, invariant or accepted requirement say
this is wrong? "I would have written it differently" is not authority.
- **Reachability** — can the bad path actually be reached by a supported input or
state? Show how. Unreachable code is at most a tidiness note.
- **Materiality** — if it happens, what breaks for a user or an operator? If the
answer is "nothing observable", it is not a finding at this severity.
- **Evidence** — can you quote the lines that prove it, without inference? If your
proof is "this pattern is usually a bug", you have a hypothesis.
- **Remedy cost** — is the fix smaller than the harm? A finding whose remedy is a
rewrite needs the harm to justify a rewrite.
Report the count you dropped and why, in one line: "screened out 4: 2 unreachable,
1 no authority, 1 immaterial". That line is the evidence you screened at all.
The failure this prevents is specific and tempting. A candidate that generalises your
finding to a second case makes the report sound weightier, and nobody downstream will
check the second case. Verifying it and dropping it costs you one paragraph; leaving
it in costs the reader their trust in the other findings.
Use the checklist content from the files in competencies/ directory. Read each relevant file before constructing the agent prompt.
If competency files don't exist yet, use the inline checklists below:
security:
performance:
architecture:
database:
concurrency:
error-handling:
frontend:
testing:
After ALL agents complete, collect their findings and synthesize:
Multiple competency reviewers may find the same issue. Group findings by file:line and merge duplicates. When merged, note which competencies flagged it (higher confidence when multiple domains agree).
For each unique finding, assign a triage:
| Triage | Criteria |
|---|---|
| FIX | CRITICAL or HIGH severity, HIGH confidence, clear fix available. Must be resolved before merge; review-and-fix may implement it in this task. |
| DEFER | MEDIUM/LOW severity or LOW confidence. Real issue but can be addressed later. Create backlog item. |
| ACCEPT | Intentional trade-off, or finding is incorrect after cross-checking context. Document why it's acceptable. |
══════════════════════════════════════════════════
DEEP REVIEW: {branch} → {base}
{N} findings across {M} competencies
══════════════════════════════════════════════════
COMPETENCIES REVIEWED: {list with ✓}
DIFF SIZE: {N insertions, M deletions, K files}
── FIX ({count}) ─────────────────────────────────
1. [CRITICAL/security+concurrency] file:line
Problem: {description}
Evidence: {code quote}
Fix: {concrete suggestion}
2. [HIGH/database] file:line
...
── DEFER ({count}) ──────────────────────────────
3. [MEDIUM/performance] file:line
Problem: {description}
Why defer: {rationale}
── ACCEPT ({count}) ─────────────────────────────
4. [LOW/architecture] file:line
Finding: {description}
Why accept: {rationale}
══════════════════════════════════════════════════
VERDICT: {PASS / PASS_WITH_CAVEATS / NEEDS_FIXES}
══════════════════════════════════════════════════
For review-only requests, stop after the synthesis report. Do not edit source, format files, alter Git state, install dependencies, or create a patch; report which FIX findings must be resolved before merge.
For an explicit review-and-fix request, continue in this same task after the read-only synthesis. Preserve the selected scope and verify each remediation with the smallest causal check:
For each FIX finding:
await, add index, add LIMIT, fix typo) — apply it directly. Output: [FIXED] file:line — {what}After all FIX items are resolved, output final status:
DEEP REVIEW COMPLETE:
{N} findings total
{X} auto-fixed
{Y} fixed with user input
{Z} deferred
{W} accepted
/review instead.pytest reports no usable temporary directory or Access is denied before collection: the reviewer was launched with a contradictory execution contract. Relaunch it in an isolated writable worktree with {REVIEW_SCRATCH}, or have it inspect immutable test receipts and report NOT_RUN; never count the failed command as test evidence.git status --porcelain=v1, git diff --exit-code, and git diff --cached --exit-code receipts. Any new tracked/staged change invalidates the review until reconciled.| Scenario | Use |
|---|---|
| Pre-landing quick check | /review |
| Large diff (200+ lines) | /deep-review |
| Security-sensitive changes | /deep-review |
| Before major release | /deep-review |
| Small bugfix | /review |
| New feature with DB+auth+frontend | /deep-review |
| Refactoring within one module | /review |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
parallel-review, code-review, competency-based, diff-review, deep-dive
60 skills in this plugin
/agent-harness-designDesigning agent harnesses and tool systems — risk taxonomy for tools, permission decisions, draft/commit pattern, structured tool results, agent budgets (10 types), context trust labels against prompt injection, plan-artifact, approval records, observability and traces, evals (13 categories), event model, streaming buffering, 3rd-party skill install checklist, agentic RAG, self-improving SOP loops, model policy, reasoning effort, and Programmatic Tool Calling adoption gates. Use when building a new Agent SDK app, custom orchestrator, MCP server, Cloudflare Worker with tool calls, agentic RAG pipeline, model router, or model-tier policy; when designing tools and permissions; when writing an agent loop; or when you need trust labels for external content. Do NOT use for improving or auditing an already-built harness (use harness-audit / harness-design instead), nor for ordinary Claude Code sessions where the harness is already given./agents-best-practicesUse when designing, auditing, refactoring, or explaining an agentic harness for any domain, especially when work must continue from a measured gap to verified completion. Covers provider-neutral loops, tools, permissions, environment adaptation, planning, durable workflow state, context, skills, observability, evals, and safety for OpenAI, Anthropic, and compatible APIs. Not for implementing an ordinary app feature or reviewing one concrete diff./architecture-firstDecide module boundaries before the first file: what modules exist, which way dependencies point, who owns state, and what each module may know. Use when starting a project, service, site, API, or subsystem; adding a feature with no obvious home; resolving a circular import or inverted framework dependency; or writing an ARCHITECTURE.md or ADR. Do not use for a one-file script, throwaway experiment, bug fix inside an established seam, naming/function-shape cleanup (use code-complexity), an existing oversized module (use refactoring-safely), or capacity/data scaling decisions (use system-and-data-design). This defines earned boundaries; it does not license speculative layers.
/architecture-qualityKeep web applications, APIs and services readable as they grow: choose feature or domain seams, assign state ownership, enforce dependency direction, keep adapters thin, and verify file shape. Use when starting or extending a web app, backend, frontend, API or multi-page product; when a change makes a module hard to read; when architecture review finds a god file, cross-feature imports, a circular dependency or a framework-heavy domain. Load architecture-first first for a new system, and refactoring-safely for an existing oversized module. Do not use for a one-file script, throwaway spike or a purely local naming change.
/article-structure-reviewПроверить структуру технической статьи после черновика: задача читателя, жанр,
опора значимых утверждений на доказательства и честные ограничения.
Use after the first draft, before publication. Исправлять структуру, когда это
входит в запрос; не создавать обязательный конвейер из других навыков.
Для локальной языковой редактуры — humanize-english или humanize-russian.
/bug-reproducerFind likely software bugs in a codebase, rank concrete bug candidates, and prove or reject them with focused regression tests before proposing a fix. Also turn bug reports, stack traces, screenshots, failing behavior, support tickets, and regressions into minimal reproducible cases with red-to-green evidence. Use when Codex needs to hunt for unknown bugs, audit code for correctness defects, test suspicious edge cases, reproduce a reported failure, isolate root cause, or verify that an approved fix works without regressions. Honor explicit user authority for the requested fix; use approval gates only for authority that the request did not already grant or when scope materially changes. Do NOT use for ordinary implementation where no bug investigation or reproduction is needed.npx claudepluginhub anastasiyaw/codex-claude-code-config --plugin harnessOther plugins' skills for the same job