Get the FREE Ultimate OpenClaw Setup Guide →

Matrix Code Review

npx machina-cli add skill ojowwalker77/Claude-Matrix/review --openclaw
Files (1)
SKILL.md
4.2 KB

Matrix Code Review

Perform comprehensive, context-aware code review using 5-agent architecture with 95% false positive reduction.

Tip: This skill runs in a forked context for an unbiased perspective - similar to how a human reviewer would approach the code for the first time.

Architecture

ORCHESTRATOR (parses target, routes, aggregates)
     │
     ├── DETECTION AGENT → security, runtime, breaking, logic flaws, hygiene (nuke)
     ├── IMPACT AGENT → blast radius, transitive graph, test coverage
     ├── TRIAGE AGENT → tier assignment, confidence calibration, noise filter
     ├── REMEDIATION AGENT → context-aware fixes, regression checks
     └── VERIFICATION AGENT → build, test, lint validation

Usage

Parse user arguments from the skill invocation (text after the trigger phrase).

Expected format: <target> [mode]

  • target: File path, PR number, or "staged" for staged changes
  • mode (optional): default | lazy (default: from config or default)

Modes

Default Mode (Comprehensive)

Full 5-agent review pipeline with maximum index utilization:

  • Detection: Security vulns, runtime issues, breaking changes, hygiene (nuke scan)
  • Impact: Transitive blast radius (2-3 levels), service boundaries, test coverage
  • Triage: Tier classification, >80% signal ratio target
  • Remediation: Context-aware fixes matching codebase patterns
  • Verification: Run build, test, lint commands automatically

Lazy Mode (Quick)

Detection agent only:

  • Direct code inspection
  • Critical issues only (Tier 1)
  • ~2-3 comments, no blast radius

Review Pipeline

Follow the 5-agent orchestration detailed in references/review-phases.md:

  1. Orchestrator - Parse target, dispatch agents, aggregate results
  2. Detection Agent - Find security, runtime, breaking, logic issues
  3. Impact Agent - Calculate transitive blast radius, test coverage
  4. Triage Agent - Classify tiers, calibrate confidence, filter noise
  5. Remediation Agent - Generate fixes, check regression risk
  6. Verification Agent - Run build, test, lint; report results

Early exit: If Detection finds nothing critical, skip Impact/Triage depth.

Examples

/matrix:review src/utils/auth.ts          # Default mode (comprehensive)
/matrix:review staged                     # Review staged changes
/matrix:review staged lazy                # Quick review of staged changes
/matrix:review 123                        # Review PR #123
/matrix:review 123 lazy                   # Quick review of PR #123

Additional Resources

Reference Files

  • references/review-phases.md - Orchestrator + 5-agent pipeline
  • references/agents/detection.md - Detection patterns and output format
  • references/agents/impact.md - Blast radius algorithm
  • references/agents/triage.md - Tier classification and signal ratio
  • references/agents/remediation.md - Fix generation and regression checks
  • references/agents/verification.md - Build/test/lint command detection and execution

Source

git clone https://github.com/ojowwalker77/Claude-Matrix/blob/main/skills/review/SKILL.mdView on GitHub

Overview

Matrix Code Review performs a comprehensive, context-aware code review using a 5-agent architecture. It operates in a forked context to provide an unbiased perspective, similar to a fresh human review, ensuring thorough analysis of changes, risks, and hygiene.

How This Skill Works

The orchestrator parses the target and mode, then dispatches five coordinated agents (Detection, Impact, Triage, Remediation, Verification). Default mode runs the full pipeline; Lazy mode runs only the Detection agent for quick feedback, with results aggregated for the user.

When to Use It

  • Review a PR for security, runtime issues, breaking changes, and hygiene
  • Review staged changes before committing
  • Analyze transitive blast radius and test coverage of changes
  • Perform a quick, lightweight review of a file or PR (lazy mode)
  • Require a full build/test/lint verification after changes

Quick Start

  1. Step 1: Invoke the skill with a target, e.g. '/matrix:review <target>' or a PR number
  2. Step 2: Review the aggregated outputs from Detection, Impact, Triage, Remediation, and Verification
  3. Step 3: Implement fixes and re-run the verification pipeline

Best Practices

  • Run the review in a forked context to minimize bias
  • Use Default mode for a comprehensive assessment including hygiene scans
  • Leverage the Impact agent to map blast radius and test coverage
  • Review staged changes before merges and pull requests
  • Validate results with build, test, and lint in the Verification stage

Example Use Cases

  • /matrix:review src/utils/auth.ts # Default mode (comprehensive)
  • /matrix:review staged # Review staged changes
  • /matrix:review staged lazy # Quick review of staged changes
  • /matrix:review 123 # Review PR #123
  • /matrix:review 123 lazy # Quick review of PR #123

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers