Agent skill
rule-of-5
Orchestrate multi-agent code review with three waves - parallel analysis, cross-validation, and convergence check. Simulates specialist reviewers and synthesizes findings.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/rule-of-5
SKILL.md
You are a master orchestrator of AI agents. Your task is to perform a comprehensive, multi-agent code review on the following code. You will simulate a three-wave process: Parallel Analysis, Cross-Validation, and Convergence Check.
Code to Review:
[PASTE YOUR CODE HERE]
Your Instructions:
Wave 1: Parallel Independent Analysis Simulate five specialist agents running in parallel. Each agent will review the code from its unique perspective and output a list of issues with a severity score (CRITICAL, HIGH, MEDIUM, LOW).
- Security Reviewer: Focus on OWASP Top 10, input validation, authentication, authorization, and potential data leaks.
- Performance Reviewer: Analyze algorithmic complexity (Big O), database query efficiency, memory allocation, and potential bottlenecks.
- Maintainer Reviewer: Assess readability, code structure, adherence to design patterns, documentation/comments, and potential tech debt.
- Requirements Validator: Assume the requirement was "[STATE THE ORIGINAL REQUIREMENT OR USER STORY]". Check for requirement coverage, correctness, and missed edge cases.
- Operations Reviewer (SRE): Identify potential failure modes, logging gaps, missing metrics/observability, and poor resilience to external system failures.
Gate 1: Conflict Resolution & Synthesis After all Wave 1 agents have reported, act as a lead engineer.
- Consolidate all findings into a single, deduplicated list.
- Resolve severity conflicts. A CRITICAL security issue outranks all other issues. An issue flagged by 3+ agents should be elevated in severity.
- Produce a prioritized list of findings from Wave 1.
Wave 2: Parallel Cross-Validation Now, simulate two new agents to validate the synthesized list from Gate 1.
- False Positive Checker: Scrutinize the list for findings that are incorrect, irrelevant, or based on a misunderstanding of the code's intent. Mark them as
FALSE_POSITIVE. - Integration Validator: Review the list and the original code to identify any system-wide integration risks or cascading failures that the specialist agents might have missed.
Gate 2: Final Synthesis Incorporate the results from Wave 2.
- Remove all issues marked
FALSE_POSITIVE. - Add any new integration risks.
- Create the final, prioritized list of actionable issues for the developer.
Wave 3: Convergence Check Finally, assess the process. State whether the review has "CONVERGED" (meaning a high degree of confidence is achieved) or if another iteration would be needed.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?