Use before finishing any development branch — dispatches parallel security, architecture, DX, and production-readiness reviewers, then synthesizes findings and iterates until all critical issues are resolved
설치
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Use before finishing any development branch — dispatches parallel security, architecture, DX, and production-readiness reviewers, then synthesizes findings and iterates until all critical issues are resolved
Multi-Role Review
Dispatch parallel reviewers covering Security, Architecture, Developer Experience, and Production Readiness. Synthesize findings, fix all critical issues, and iterate until clean.
Announce at start: "I'm using the multi-role-review skill."
Core principle: Four independent reviewers in parallel → synthesize → fix → repeat until zero critical issues.
When to Use
Required: Before finishing-a-development-branch on any non-trivial feature
Required: Before any npm/PyPI/crates publish
Optional: After a large refactor or security-sensitive change
Called by:subagent-driven-development (Step 6, before finishing)
The Process
Round N
├── Dispatch 4 reviewer subagents IN PARALLEL
│ ├── Security Reviewer
│ ├── Architecture Reviewer
│ ├── Developer Experience Reviewer
│ └── Production Readiness Reviewer
├── Synthesize all findings
│ ├── CRITICAL — must fix before proceeding
│ ├── IMPORTANT — fix now unless strong reason not to
│ └── MINOR — log, skip for now
├── Any CRITICAL or IMPORTANT issues?
│ ├── yes → dispatch implementer, fix, re-run Round N+1
│ └── no → ✅ Done, proceed to finishing-a-development-branch
└── Max 5 rounds → escalate to human if still failing
Reviewer Roles
Role 1: Security Reviewer
Focus exclusively on security attack surfaces. Do NOT comment on architecture or DX.
Checklist (always cover all):
Input validation
Are all user/external inputs validated before use?
Are numeric boundaries tested (zero, negative, overflow, sub-minimum)?
Can any input cause silent wrong-result (e.g. Math.round(0.5) = 1, not 0)?
JS/TS: NaN, Infinity, -Infinity are NOT caught by x < 0 — is !isFinite(x) used for all numeric validation?
Are regex patterns anchored? (re.fullmatch in Python; /^...$/.test() in JS — partial match allows bypass)
JS/TS: no user-controlled keys in Object.assign, spread, or dynamic property access (prototype pollution)
Cryptographic / key handling
Are private keys decoded with a library that throws on invalid input (not silent fallback)?
Are secrets never logged or included in error messages?
Are HMAC/signature verifications constant-time (no early return on first mismatch — timing oracle)?
Are new signing keys at least 32 bytes of entropy?
Financial / transactional logic
Is every "success" response from an external SDK verified (e.g. confirmTransaction().value.err)?
Can a transaction succeed externally but fail internally, causing deduction with no value delivered?
Is zero-value transfer possible (sends nothing but costs fees)?
Is self-transfer possible (src == dst)?
After any irreversible operation (payment broadcast, DB write, file commit): do ALL downstream paths — including catch/finally — handle partial state safely? No exception may leave the system inconsistent after money/data has moved.
Is the operation idempotent? Can it be safely retried if the response is lost?
Network / SSRF
Are network failures handled without leaving state inconsistent?
Are RPC/API success responses checked for application-level errors (not just HTTP 200)?
Do outbound HTTP/socket calls block private IPs (10.x, 172.16.x, 192.168.x), localhost, metadata endpoints (169.254.x), and non-HTTPS schemes? (SSRF)
Configuration misuse
Can a valid-looking config silently target the wrong environment (e.g. mainnet RPC + testnet token, prod key + staging endpoint)?
Are misconfiguration errors detected at startup (constructor/init), not at first runtime use?
Are secrets passed via env vars or files, not CLI arguments (visible in ps aux)?
Concurrency
No TOCTOU (check-then-act) races at trust boundaries?
Multi-step DB operations use transactions or atomic operations (INSERT OR IGNORE)?
Shared mutable state is protected (lock, queue, atomic)?
Output safety
Can any output value flow into HTTP headers, SQL, shell commands, file paths, or log lines without escaping?
Does getAddress() / equivalent strip control characters (\r, \n, ", ')?
Supply chain
All new dependencies audited (npm audit / pip-audit / cargo audit)?
No new dep with known CVEs?
Versions pinned or range-constrained (not * or latest)?
No new dep whose name is suspiciously close to a well-known package (typosquatting)?
Verdict format:
SECURITY REVIEW — Round N
CRITICAL (must fix):
- [issue]: [exact code location] — [attack scenario]
IMPORTANT (fix now):
- [issue]: [exact code location] — [risk]
MINOR (optional):
- [issue]
VERDICT: ❌ CRITICAL ISSUES / ⚠️ IMPORTANT ONLY / ✅ CLEAN
Role 2: Architecture Reviewer
Focus on design quality, boundaries, and maintainability. Do NOT comment on security or DX.
Checklist:
Boundaries and responsibilities
Does each module/class have one clear responsibility?
Are public interfaces minimal — only what callers need?
Are internals hidden (private fields, unexported functions)?
Error handling
Do errors surface at the right level (not swallowed, not over-propagated)?
Are error messages actionable (include what went wrong AND what to do)?
Are all error paths tested?
State management
Is mutable state minimised? Are there race conditions?
Is state consistent after partial failures?
Abstraction quality
Are there premature abstractions (one-use utilities, over-engineered factories)?
Are there missing abstractions (repeated logic that belongs together)?
YAGNI: is everything present actually needed now?
Testability
Can units be tested in isolation (no hidden global state, injectable deps)?
Are side effects (network, filesystem, time) isolated or mockable?
In subagent-driven-development: After all tasks complete and final code reviewer approves, invoke multi-role-review before finishing-a-development-branch.
Red Flags
Never:
Run reviewers sequentially (wastes time — they're independent)
Let one reviewer comment on another's domain (dilutes focus)
Skip a review role ("probably fine" is how bugs ship)
Mark CRITICAL issues as MINOR to move faster
Proceed to finishing-a-development-branch with open CRITICAL or IMPORTANT issues
Count the same issue twice across roles in synthesis
Always:
Provide exact file paths and line numbers in findings
Include the attack scenario / risk description (not just "this is bad")
Run the full test suite after fixing issues before re-reviewing