agentleFS
catlog22catlog22/Claude-Code-Workflow/.claude/skills/review-cycle/SKILL.md

review-cycle

Skill2.1k starsChanged 7 months agoMITArchived repositoryView on GitHub

Unified multi-dimensional code review with automated fix orchestration. Routes to session-based (git changes), module-based (path patterns), or fix mode. Triggers on \"workflow:review-cycle\", \"workflow:review-session-cycle\", \"workflow:review-module-cycle\", \"workflow:review-cycle-fix\".

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When autoYes is true, skip all interactive confirmations and use defaults throughout the review cycle phases.

    line 37
  2. Very specific:

    Run ccw spec load --category review for review standards, checklists, and approval gates.

    line 103
  3. Distinctive:

    Progressive Loading: Read ONLY the phase doc for the detected mode, not all three

    line 108

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Review Cycle

Unified code review orchestrator with mode-based routing. Detects input type and dispatches to the appropriate execution phase.

Architecture Overview

┌──────────────────────────────────────────────────────────┐
│  Review Cycle Orchestrator (SKILL.md)                     │
│  → Parse input → Detect mode → Read phase doc → Execute   │
└───────────────────────────┬──────────────────────────────┘
                            │
          ┌─────────────────┼─────────────────┐
          ↓                 ↓                 ↓
   ┌─────────────┐  ┌─────────────┐  ┌─────────────┐
   │   session    │  │   module    │  │    fix      │
   │  (git changes│  │(path pattern│  │(export file │
   │   review)    │  │   review)   │  │  auto-fix)  │
   └─────────────┘  └─────────────┘  └─────────────┘
   phases/           phases/           phases/
   review-session.md review-module.md  review-fix.md

Auto Mode Detection

// ★ 统一 auto mode 检测:-y/--yes 从 $ARGUMENTS 或 ccw 传播
const autoYes = /\b(-y|--yes)\b/.test($ARGUMENTS)

When autoYes is true, skip all interactive confirmations and use defaults throughout the review cycle phases.

Mode Detection

function detectMode(args) {
  if (args.includes('--fix')) return 'fix';
  if (args.match(/\*|\.ts|\.js|\.py|\.vue|\.jsx|\.tsx|src\/|lib\//)) return 'module';
  if (args.match(/^WFS-/) || args.trim() === '') return 'session';
  return 'session';  // default
}
Input PatternDetected ModePhase Doc
src/auth/**modulephases/review-module.md
src/auth/**,src/payment/**modulephases/review-module.md
WFS-payment-integrationsessionphases/review-session.md
(empty)sessionphases/review-session.md
--fix .review/fixphases/review-fix.md
--fix --resumefixphases/review-fix.md

Usage

Skill(skill="review-cycle", args="src/auth/**")                                    # Module mode
Skill(skill="review-cycle", args="src/auth/** --dimensions=security,architecture") # Module + custom dims
Skill(skill="review-cycle", args="WFS-payment-integration")                        # Session mode
Skill(skill="review-cycle", args="")                                               # Session: auto-detect
Skill(skill="review-cycle", args="--fix .workflow/active/WFS-123/.review/")        # Fix mode
Skill(skill="review-cycle", args="--fix --resume")                                 # Fix: resume
Skill(skill="review-cycle", args="-y src/auth/**")                                 # Auto mode (skip confirmations)

# Common flags (all modes):
--dimensions=dim1,dim2,...    Custom dimensions (default: all 7)
--max-iterations=N           Max deep-dive iterations (default: 3)

# Fix-only flags:
--fix                        Enter fix pipeline
--resume                     Resume interrupted fix session
--batch-size=N               Findings per planning batch (default: 5)
--max-iterations=N           Max retry per finding (default: 3)

Execution Flow

1. Parse $ARGUMENTS → extract mode + flags
2. Detect mode (session | module | fix)
3. Read corresponding phase doc:
   - session → Read phases/review-session.md → execute
   - module  → Read phases/review-module.md  → execute
   - fix     → Read phases/review-fix.md     → execute
4. Phase doc contains full execution detail (5 phases for review, 4+1 phases for fix)

Phase Reference Documents (read on-demand based on detected mode):

ModeDocumentSourceDescription
sessionphases/review-session.mdreview-session-cycle.mdSession-based review: git changes → 7-dimension parallel analysis → aggregation → deep-dive → completion
modulephases/review-module.mdreview-module-cycle.mdModule-based review: path patterns → 7-dimension parallel analysis → aggregation → deep-dive → completion
fixphases/review-fix.mdreview-cycle-fix.mdAutomated fix: export file → intelligent batching → parallel planning → execution → completion

Project Context

Run ccw spec load --category review for review standards, checklists, and approval gates.

Core Rules

  1. Mode Detection First: Parse input to determine session/module/fix mode before anything else
  2. Progressive Loading: Read ONLY the phase doc for the detected mode, not all three
  3. Full Delegation: Once mode is detected, the phase doc owns the entire execution flow
  4. Auto-Continue: Phase docs contain their own multi-phase execution (Phase 1-5 or Phase 1-4+5)
  5. DO NOT STOP: Continuous execution until all internal phases within the phase doc complete

Error Handling

ErrorAction
Cannot determine mode from inputAskUserQuestion to clarify intent
Phase doc not foundError and exit with file path
Invalid flags for modeWarn and continue with defaults

Related Commands

# View review/fix progress dashboard
ccw view

# Workflow pipeline
# Step 1: Review
Skill(skill="review-cycle", args="src/auth/**")
# Step 2: Fix (after review complete)
Skill(skill="review-cycle", args="--fix .workflow/active/WFS-{session-id}/.review/")

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.