From claude-code-config
Launches parallel agent reviewers for competencies (security, perf, arch, db, concurrency, errors, frontend, testing); synthesizes FIX/DEFER/ACCEPT report. For deep reviews of large diffs (200+ lines).
npx claudepluginhub anastasiyaw/claude-code-configThis skill is limited to using the following tools:
Inspired by Memento workflow engine's parallel review pattern.
Reviews and verifies code before merge via triage-first checks (up to 16 parallel agents). Pipeline mode verifies vs plans; general mode for PRs/branches/staged changes. Flags findings only.
Reviews local git changes, PRs/MRs, or branch diffs against coding guidelines using parallel agents for bugs, security, logic errors, simplification, tests, and contracts. Deep mode iteratively auto-fixes.
Dispatches 5 specialized agents for multi-perspective code review on correctness, architecture, security, production readiness, and test quality. Merges findings, auto-fixes Critical/Important issues up to 3 rounds.
Share bugs, ideas, or general feedback.
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"
git fetch origin "$BASE" --quiet 2>/dev/null || true
echo "=== DIFF STATS ==="
git diff "origin/$BASE" --stat
echo "=== CHANGED FILES ==="
git diff "origin/$BASE" --name-only
echo "=== DIFF SIZE ==="
git diff "origin/$BASE" --shortstat
Store the BASE branch name and list of changed files. You'll need them in every subsequent step.
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.
| 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 |
Minimum: always select at least 2 competencies. Maximum: cap at 5 for diffs under 200 lines. All 8 allowed for 200+ lines.
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 "origin/$BASE"
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.
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.
## 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.
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 fix before merge. |
| 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 each FIX finding:
await, add index, add LIMIT, fix typo) — apply it directly. Output: [AUTO-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.| 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 |