adaptive-review

Adaptive code review that routes to haiku/sonnet/opus based on diff complexity signals. Use instead of requesting-code-review for cost-efficient reviews.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "adaptive-review" with this command: npx skills add 2233admin/adaptive-review

Adaptive Code Review

Review code changes with model depth proportional to change complexity. No wasted opus tokens on trivial diffs.

Step 1: Collect Signals

Run these commands to gather diff signals:

# Get diff stats (against HEAD~1 or origin/main, whichever makes sense)
BASE=$(git merge-base HEAD origin/main 2>/dev/null || echo "HEAD~1")
git diff --stat $BASE..HEAD
git diff --numstat $BASE..HEAD

Extract:

  • lines_changed: total added + deleted
  • files_changed: number of files
  • dirs_changed: number of unique top-level directories touched (cross-module indicator)

Then scan for high-risk patterns — only in code files (exclude .md/.txt/.json/.yaml from grep):

git diff $BASE..HEAD -- '*.ts' '*.js' '*.py' '*.go' '*.rs' '*.java' '*.c' '*.cpp' '*.rb' '*.sh' | grep -ciE '(password|secret|token|auth|session|cookie|sql|inject|exec\(|eval\(|lock|mutex|semaphore|atomic|concurrent|unsafe)'
  • risk_hits: count of matches (0 if only docs/config changed)

Step 2: Route

ConditionDepthModel
lines_changed < 50 AND files_changed <= 1 AND risk_hits == 0fasthaiku
lines_changed < 200 AND dirs_changed <= 1 AND risk_hits <= 2mediumsonnet
Everything else (>200 lines OR dirs_changed >= 2 OR risk_hits > 2)deepopus

Announce the routing decision:

Review depth: [fast|medium|deep] (N lines, N files, N dirs, N risk hits)

Step 3: Dispatch

Fast (haiku)

Spawn agent with model: "haiku", subagent_type of your code-review agent:

Prompt focus: formatting, naming conventions, obvious bugs, unused imports. Skip architecture analysis. Keep it under 30 seconds.

Medium (sonnet)

Spawn agent with model: "sonnet", subagent_type of your code-review agent:

Standard code review: correctness, error handling, test coverage, code quality.

Deep (opus)

Spawn agent with model: "opus", subagent_type of your code-review agent:

Full review: architecture, security, performance, cross-module impact. If language-specific reviewers exist (python-reviewer, go-reviewer, database-reviewer), spawn them in parallel.

Step 4: Report

Present results with depth label so the user knows what level of review was applied:

## Adaptive Review: [FAST|MEDIUM|DEEP]
Signals: {lines} lines, {files} files, {dirs} dirs, {risk_hits} risk hits

[reviewer output]

If fast review finds anything concerning, suggest upgrading: "Fast review flagged potential issues. Run /adaptive-review --deep for thorough analysis."

Overrides

User can force depth:

  • /adaptive-review --fast — force fast regardless of signals
  • /adaptive-review --deep — force deep regardless of signals
  • /adaptive-review --medium — force medium

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

StitchFlow

Turn briefs, mockups, and product context into Stitch UI screens, design variants, Tailwind-friendly HTML, and screenshots. Use when the user wants to explor...

Registry SourceRecently Updated
2240Profile unavailable
Coding

StitchFlow Legacy Alias

Legacy compatibility alias for StitchFlow. Use when a user explicitly references stitch-design-local, or when older prompts and setups still call that skill...

Registry SourceRecently Updated
2320Profile unavailable
Coding

OMC/OMX 编码任务编排器

异步派发编码任务到 OMC (claude -p) 或 OMX (omx exec)。触发词:"用omc" "用omx" "派任务" "后台编码" "异步任务" "omc跑" "omx跑" "claude跑" "codex跑" "派发OMC" "派发OMX"。

Registry SourceRecently Updated
210Profile unavailable
Coding

Updating OpenRouter Free Models

Use when needing to fetch, test, and update OpenRouter free model lists in Claude Code or OpenClaw configurations

Registry SourceRecently Updated
2680Profile unavailable