review-loop

작성자: 2dmurali

반복적인 작업자-검토자 주기로, 비평가 하위 에이전트를 생성하여 작업을 1-10점으로 평가하고 실행 가능한 피드백을 제공한 후, 품질 기준을 충족할 때까지 수정합니다. 기능 구현, 사양 작성, 기존 코드 검토, 또는 속도보다 품질이 더 중요한 작업을 완료할 때 사용하세요. 트리거 문구: "use review-loop", "polish this", "iterate on this", "/review-loop", "review with feedback loop".

npx skills add https://github.com/2dmurali/review-loop-skill --skill review-loop

Review Loop

Iterative worker-reviewer cycle within a single session. You do the work, spawn a reviewer subagent to critique it, revise based on feedback, repeat until quality gate is met.

Core principle: First drafts are never final. Iterative critique produces better output than a single pass.

Platform note: This skill works best with agents that support subagent spawning. On platforms without that capability, simulate the reviewer step by opening a fresh chat context, pasting only the work product (no prior reasoning), and asking it to score 1-10 with specific feedback.

Quick Start

  1. Say: "implement X, use review-loop" or "run review-loop on the file I just wrote"
  2. The agent does the work (or reads existing work)
  3. A separate critic subagent scores it 1-10 with specific feedback
  4. The agent revises and repeats until score >= 8 (default quality gate)
  5. A loop summary is delivered with the final output

When to Use

  • User says "use review-loop", "polish this", "iterate on this", "/review-loop"
  • Complex implementations where quality matters more than speed
  • Design docs, specs, or technical writing
  • Code that needs to be robust (security, data pipelines, financial logic)
  • When user wants adversarial critique baked into the process

When NOT to Use

  • Simple fixes, quick edits, one-liner changes
  • Tasks where tests are the quality gate (use TDD + CI instead)
  • When the user just wants it done fast
  • Exploratory/spike work where the goal is learning, not shipping
  • Tasks with no clear acceptance criteria — define those first, then use review-loop

Defaults

SettingDefault
Min loops2
Max loops4
Quality gate8/10
Worker model(your current model)
Reviewer model(your current model or fast/balanced alternative)

Model Selection

The reviewer task evaluates logic and constraints. The worker task writes and modifies code. Pick subagent capabilities accordingly.

CRITICAL RULE: The Reviewer must always be EQUAL TO or MORE POWERFUL than the Worker. If the reviewer is weaker than the worker, it cannot properly critique complex logic or catch subtle regressions.

Task ComplexityWorker CapabilityReviewer CapabilityRationale
Simple/mechanical (CRUD, formatting, boilerplate)Fast / LightweightBalancedLightweight worker is fast, balanced reviewer easily catches issues
Standard (features, refactors, docs)BalancedBalancedGood mix of cost, speed, and quality
Complex (multi-file, integration, design)BalancedAdvanced / ReasoningAdvanced reviewer catches subtle architecture issues, balanced worker can implement them
Very complex (security, quant, distributed systems)Advanced / ReasoningAdvanced / ReasoningBoth need full context and reasoning power. Reviewer MUST match worker power.

The golden rule: The worker must be smart enough to ACT on the reviewer's feedback. If the reviewer says "fix the race condition with a channel-based semaphore" and the worker can't reason about concurrency, the loop won't converge.

Escalation signal: If score doesn't improve after 2 consecutive loops with the same feedback, the worker model is too weak. Escalate:

  • Option A: Ask the user to switch to a more capable model
  • Option B: Lower the quality gate temporarily and note the gap to the user
  • Option C: Break the task into smaller sub-tasks and run review-loop on each

Default behavior: Since you (the main agent) ARE the worker, spawn a reviewer subagent that matches or exceeds your current capability based on the task:

  • Most tasks → Standard/Balanced reviewer
  • Specialized/hard tasks → Advanced/Reasoning reviewer
  • Quick checks → Fast/Lightweight reviewer (only if you are also acting as a lightweight worker)

User Overrides

Users can override any default inline with their request. Parse these naturally:

"implement X with review-loop, quality gate 9, use advanced model for review, max 5 loops"
"polish this, 2 loops minimum, gate at 8"
"run review-loop with fast reviewer, max 2 loops"
"use review-loop, reasoning reviewer, quality gate 9, min 3 max 6"

Parsing rules:

  • "quality gate N" or "gate N" → quality_gate = N
  • "[model] reviewer" or "review with [model]" → reviewer model override
  • "max N loops" → max_loops = N
  • "min N loops" → min_loops = N
  • If user doesn't specify, use defaults
  • If user says "thorough" or "strict" → interpret as quality_gate 8, min_loops 2
  • If user says "quick" or "fast" → interpret as max_loops 2, quality_gate 6

The Process

flowchart TD
    A[Do the work] --> B[Spawn reviewer subagent]
    B --> C{Min loops met?}
    C -- no, always continue --> E[Revise based on feedback]
    C -- yes --> D{Score >= quality gate?}
    D -- yes --> F[Final polish pass]
    D -- no --> G{Max loops reached?}
    G -- yes, stop anyway --> F
    G -- no --> E
    E --> B
    F --> H([Done])

Step-by-Step

Step 1: Do the Work

Complete the task as you normally would. Write the code, create the spec, implement the feature. Don't hold back — produce your best first attempt.

Step 2: Spawn Reviewer Subagent

Use the Agent tool to dispatch a reviewer. The reviewer must:

  • Be a separate subagent (fresh context, no anchoring to your reasoning)
  • Receive only the work product (files, diffs) — not your thought process
  • Score 1-10 with specific, actionable feedback
  • Use a balanced/standard model by default (or an advanced reasoning model for complex/specialized tasks)

Reviewer prompt template:

You are a critical reviewer. Score the following work 1-10 and provide specific, actionable feedback.

## What was done
{brief description of the task}

## Review criteria
{task-specific criteria — what matters for THIS task}

Examples of well-written criteria:
  For a REST API endpoint:
    - Correct HTTP status codes used
    - Input validation present on all parameters
    - Auth enforced; no unauthenticated access
    - No N+1 query patterns

  For a design doc:
    - Problem statement is unambiguous
    - Alternatives considered with trade-offs
    - No hand-waving on implementation complexity
    - Success metrics are measurable

  For a data pipeline:
    - Idempotent — safe to re-run
    - Schema changes handled gracefully
    - Failure modes documented
    - PII handling addressed

## Instructions
1. Read the work carefully
2. Score 1-10 where:
   - 1-3: Fundamentally broken or missing major requirements
   - 4-6: Works but has significant issues
   - 7-8: Good, minor issues only
   - 9-10: Excellent, ready to ship
3. List specific issues with file:line references where applicable
4. For each issue, explain WHY it matters and WHAT to fix
5. Do NOT be polite — be honest and direct
6. State your score clearly as "Score: N/10"

## Files to review
{paste file contents or list file paths with relevant excerpts}

Step 3: Parse Feedback

From the reviewer response, extract:

  • Score (the number)
  • Issues (categorized as Critical / Important / Minor)
  • Specific fixes (what to change)

Report to the user:

Loop {N}/{max}: Score {X}/10
- {summary of key feedback points}

Step 4: Check Stop Conditions

In this order:

  1. If loops completed < min_loops → continue (always)
  2. If score >= quality_gate → stop, go to final polish
  3. If loops completed >= max_loops → stop, go to final polish
  4. Otherwise → revise and loop

Step 5: Revise

Address the reviewer's feedback. Fix Critical and Important issues. Minor issues are optional. Then go back to Step 2.

Important: Each revision should be targeted. Don't rewrite everything — fix what the reviewer flagged. Maintain a mental list of ALL prior feedback to avoid regressions.

Step 6: Final Polish

Once the loop exits (quality gate met or max loops hit):

  • Address any remaining minor issues if trivial
  • Verify the final output is coherent (no artifacts from revision cycles)
  • Report final score and loop count to user

Adapting Reviewer Criteria by Task Type

Task TypeReviewer Should Focus On
CodeCorrectness, edge cases, error handling, readability, no security issues
Spec/DesignCompleteness, feasibility, no hand-waving, implementability
RefactorNo behavior changes, no regressions, cleaner than before
WritingClarity, structure, audience-appropriate, no fluff
Bug fixRoot cause addressed, regression test exists, no side effects
Infrastructure / IaCIdempotency, least privilege, no hardcoded secrets, destroy safety
Database migrationReversibility, index strategy, data loss risk, performance at scale
API designBackward compatibility, auth, versioning, error contract
Test suiteEdge case coverage, no test interdependency, meaningful assertions

Two Modes of Operation

Mode A: "Do and Review" (full cycle)

User gives a task + says to use review-loop. You do the work AND run the review loop.

User: "Implement the caching layer. Use review-loop, quality gate 8."

You:
1. Implement caching layer
2. Spawn reviewer → Score 6, feedback: missing eviction, no TTL
3. Revise: add eviction + TTL
4. Spawn reviewer → Score 8, feedback: minor naming nit
5. Final polish, done

Mode B: "Review Existing" (review only)

User already did work or you already did work. Just run the review loop on what exists.

User: "Run review-loop on the auth module I just wrote"

You:
1. Read the auth module
2. Spawn reviewer → Score 5, feedback: SQL injection, no rate limiting
3. Fix: parameterize queries, add rate limiter
4. Spawn reviewer → Score 8, approved
5. Done

Red Flags

Never:

  • Self-review instead of spawning a subagent (anchoring bias)
  • Skip a revision cycle because "the feedback is wrong" without justification
  • Inflate your own score ("I think this is actually a 9")
  • Continue past max_loops without user consent
  • Spawn the reviewer with your full reasoning/history (they must review the WORK, not your intent)

If reviewer is wrong:

  • Push back with evidence (show code/tests that disprove the feedback)
  • Skip that specific point in revision
  • Note it in your report to the user
  • Do NOT lower the quality bar to compensate

Example Report Format

--- Review Loop: {task name} ---

Loop 1/4: Score 6/10
  Reviewer: Missing input validation, no error handling for network timeout,
            function too long (80 lines).
  Action: Fixing all three issues.

Loop 2/4: Score 8/10
  Reviewer: Clean. Minor: variable name `d` could be more descriptive.
  Action: Quality gate met (8 >= 8). Final polish.

Result: 8/10 in 2 loops. Done.

Known Limitations

  • The reviewer subagent has no memory of prior loops — include prior feedback context explicitly in each reviewer prompt to avoid repeating resolved issues
  • Score inflation is possible if the reviewer prompt criteria are too vague — invest time in writing specific, measurable criteria
  • This skill does not replace human code review for security-critical or compliance-sensitive code; treat the output as a strong first pass
  • Loop convergence is not guaranteed if the task is underspecified — define clear acceptance criteria before starting

Cost and Speed

  • Each loop = 1 reviewer subagent call
  • Budget roughly 1–2x the time of a single implementation pass for a full 3-loop cycle
  • This is cheap compared to shipping buggy code, vague specs, or triggering a late-stage review cycle
  • Use your default/standard model for most reviews; only upgrade to advanced reasoning models for specialized domains (security audits, distributed systems, quant finance)

License

MIT — free to use, adapt, and redistribute with any AI tool or platform. Attribution appreciated. Contributions welcome.

관련 스킬

agent-pulse
jane-o-o-o-o
Agent Pulse를 사용하여 Hermes, Claude Code, Codex, DeepSeek, OpenClaw, Copilot, Aider, Qwen, OpenCode, Goose, Cursor, Antigravity, Amp 로그에서 로컬 AI 에이전트 활동을 검사하세요. 사용자가 AI 에이전트 세션, 토큰, 도구/검색 호출, 모델 사용량, 예상 비용, 예산, 예측, 상태 점검, 보고서, 설정 진단, 웹/API/메트릭스 내보내기 또는 MCP 통합에 대해 질문할 때 사용하세요.
developmentdata-analysisresearch
test-driven-investigation
cloudflare
버그, 크래시, 어서션 또는 예상치 못한 동작을 조사할 때 사용합니다 — 소스 코드를 과도하게 분석하는 대신 초기에 재현 테스트를 작성해야 합니다;…
sanity-config-reducers
sanity-io
루트 구성과 플러그인에서 축소되는 Sanity 구성 속성을 추가하고 검토합니다. 베타 플래그, 기능 구성, 작업 공간/소스 옵션을 추가할 때 사용합니다.
clerk
clerk
인증 작업을 프레임워크와 사용 사례에 따라 특화된 Clerk 스킬로 라우팅하는 지능형 라우터입니다. 설정, 커스텀 UI, Next.js 패턴, 조직, 웹훅, 테스트, 네이티브 iOS/Android, 백엔드 API를 다루는 8개의 특화 스킬로 라우팅합니다. package.json에서 Clerk SDK 버전(Core 2 LTS vs. 현재)을 감지하여 올바른 패턴과 API를 적용합니다. 웹 프레임워크(Next.js, React, Expo, React Router, TanStack Start)와 네이티브 플랫폼(Swift/iOS, Kotlin/Android)을 다룹니다...
google-agents-cli-adk-code
google
이 스킬은 사용자가 "에이전트 코드 작성", "ADK로 에이전트 구축", "도구 추가", "콜백 생성", "에이전트 정의", "상태 관리 사용"을 원하거나 ADK(Agent Development Kit) Python API 패턴 및 코드 예제가 필요할 때 사용해야 합니다. Google ADK 스킬 제품군의 일부입니다. 에이전트 유형, 도구 정의, 오케스트레이션 패턴, 콜백 및 상태 관리에 대한 빠른 참조를 제공합니다. 새 프로젝트 생성(google-agents-cli-scaffold 사용) 또는 배포에는 사용하지 마십시오...
developmentapicode-review
kotlin-tooling-java-to-kotlin
kotlin
Java 소스 파일을 체계적인 4단계 변환 방법론을 사용하여 관용적인 Kotlin으로 변환하며, 각 단계에서 5가지 불변 조건을 확인합니다. 애노테이션 사이트 대상, 라이브러리 관용구, API 보존을 처리하는 프레임워크 인식 변환을 지원합니다.
apify-influencer-brand-collabs
apify
인스타그램 브랜드-크리에이터 파트너십을 Apify 액터를 연결하여 발견하세요. 사용자가 브랜드와 협업하는 사람, 크리에이터가 유료로 진행한 브랜드 등을 물을 때 사용하세요.
flutter-testing-apps
flutter
Flutter 앱의 단위, 위젯, 통합 테스트 계층을 아우르는 포괄적인 테스트 프레임워크입니다. 세 가지 테스트 범주를 다룹니다: 격리된 로직을 위한 단위 테스트, UI 컴포넌트를 위한 위젯 테스트, 실제 기기나 에뮬레이터에서의 종단 간 흐름을 위한 통합 테스트. ViewModel, Repository, Service, View에 대한 아키텍처 테스트 패턴을 제공하며, 더 깔끔한 테스트 설계를 위해 모의 객체보다 Fake 구현을 강조합니다. Dart 테스트와 네이티브 테스트를 결합한 플러그인 테스트 가이드라인을 포함합니다.