Agent skill

review-loop

Run exactly 4 review-fix iterations using subagents

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/review-loop

SKILL.md

Review Loop Checklist

Execute steps IN ORDER. Do not skip steps.

CRITICAL: Do NOT fix code directly. ALWAYS spawn Task agents for fixes.

Setup

  1. Create session directory and determine target:
    bash
    REVIEW_DIR="/tmp/review-loop-$(date +%s)-$$"
    mkdir -p "$REVIEW_DIR"
    echo "Session dir: $REVIEW_DIR"
    
    # Target branch
    gh pr view --json baseRefName -q .baseRefName 2>/dev/null || \
      git branch -a --contains HEAD^ --no-contains HEAD | head -1 | tr -d ' '
    
    Store REVIEW_DIR and TARGET_BRANCH.

Iteration 1

  1. Task(subagent_type="review-loop:local-reviewer", prompt="OUTPUT FILE: ${REVIEW_DIR}/iter1.md, TARGET BRANCH: ${TARGET_BRANCH}")
  2. Read ${REVIEW_DIR}/iter1.md
  3. For EACH issue, spawn a separate agent (do NOT fix inline):
    Task(subagent_type="general-purpose", description="Fix: <summary>", prompt="Fix <issue> in <file>:<line>")
    

Iteration 2

  1. Task(subagent_type="review-loop:local-reviewer", prompt="OUTPUT FILE: ${REVIEW_DIR}/iter2.md, TARGET BRANCH: ${TARGET_BRANCH}")
  2. Read ${REVIEW_DIR}/iter2.md
  3. For EACH issue, spawn a separate agent (do NOT fix inline):
    Task(subagent_type="general-purpose", description="Fix: <summary>", prompt="Fix <issue> in <file>:<line>")
    

Iteration 3

  1. Task(subagent_type="review-loop:local-reviewer", prompt="OUTPUT FILE: ${REVIEW_DIR}/iter3.md, TARGET BRANCH: ${TARGET_BRANCH}")
  2. Read ${REVIEW_DIR}/iter3.md
  3. For EACH issue, spawn a separate agent (do NOT fix inline):
    Task(subagent_type="general-purpose", description="Fix: <summary>", prompt="Fix <issue> in <file>:<line>")
    

Iteration 4

  1. Task(subagent_type="review-loop:local-reviewer", prompt="OUTPUT FILE: ${REVIEW_DIR}/iter4.md, TARGET BRANCH: ${TARGET_BRANCH}")
  2. Read ${REVIEW_DIR}/iter4.md
  3. For EACH issue, spawn a separate agent (do NOT fix inline):
    Task(subagent_type="general-purpose", description="Fix: <summary>", prompt="Fix <issue> in <file>:<line>")
    

Completion

  1. If critical/major issues remain, continue to iteration 5
  2. Otherwise: git add -A && git commit -m "fix: review issues"
  3. Report summary. Do NOT merge.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results