Token导航 LogoToken导航

Agent Skill · AI 工具

ccw-loop(逆时针循环)

ccw-loop 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

ccw-loop 是AI 工具类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证为 MIT,第三方扫描已通过,按安装量在AI 工具类的 2,536 个 Skill 里排第 2,178。

总安装 297周安装 12GitHub Stars 1,863下载 93核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ccw-loop(逆时针循环)
来源仓库:https://github.com/catlog22/claude-code-workflow
仓库路径:skills/ccw-loop
安装命令:
npx skills add https://github.com/catlog22/claude-code-workflow --skill ccw-loop
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/catlog22/claude-code-workflow --skill ccw-loop

这个 Skill 是做什么的

AI 工具类 Skill 用来扩展助手本身的能力,例如接模型、接检索、接外部服务。

ccw-loop 实现无状态迭代开发循环,通过 send_input 接口实现 develop→debug→validate→complete 全流程自动化。适用于单一 Agent 深度交互场景,利用文件状态跟踪与 Dashboard 集成管理任务生命周期。

每个循环周期独立运行,断点续接依赖磁盘持久化,建议定期清理中间文件以节省空间。Dashboard 提供创建、暂停、恢复与停止控制按钮,可通过 REST 接口与外部系统集成。本模式适合长期专注型任务,如重构或算法优化,但不适用于需多人协作或多技能并发的复杂项目。

来源仓库内路径:skills/ccw-loop

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/catlog22/claude-code-workflow --skill ccw-loop;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

ccw-loop 怎么安装?

在终端执行 npx skills add https://github.com/catlog22/claude-code-workflow --skill ccw-loop。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

ccw-loop 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

ccw-loop 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/catlog22/claude-code-workflow --skill ccw-loop;npx skills add catlog22/claude-code-workflow --skill "ccw-loop" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

ccw-loop 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

ccw-loop 用的人多吗?

公开数据是累计安装 297 次,近一周安装 12 次,下载 93 次,GitHub 1,863 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

ccw-loop 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理AI 工具类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

AI 工具类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
executing-plans

执行计划 · Codex、Claude

1,515,336173,110只读MIT通过
verification-before-completion

完成前的验证 · Codex、Claude

1,319,472173,121权限未标注MIT通过
subagent-driven-development

子 Agent 驱动开发 · Codex、Claude

1,312,416173,138只读MIT通过
copy-editing

复制编辑 · Codex、Claude

1,209,57625,632只读MIT通过
paywall-upgrade-cro

付费专区升级 cro · Codex、Claude

1,030,17625,617只读MIT通过
ccw-loop

逆时针循环 · 本页

2971,863执行命令MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

CCW Loop - Stateless Iterative Development Workflow

Stateless iterative development loop using Codex single-agent deep interaction pattern. One agent handles all phases (develop → debug → validate → complete) via send_input, with file-based state tracking and Dashboard integration.

Architecture Overview

+-------------------------------------------------------------+
|                     Dashboard (UI)                           |
|  [Create] [Start] [Pause] [Resume] [Stop] [View Progress]  |
+-------------------------------------------------------------+
                              |
                              v
+-------------------------------------------------------------+
|              loop-v2-routes.ts (Control Plane)               |
|                                                              |
|  State: {projectRoot}/.workflow/.loop/{loopId}.json (MASTER)  |
|  Tasks: {projectRoot}/.workflow/.loop/{loopId}.tasks.jsonl   |
|                                                              |
|  /start  -> Trigger ccw-loop skill with --loop-id           |
|  /pause  -> Set status='paused' (skill checks before action) |
|  /stop   -> Set status='failed' (skill terminates)          |
|  /resume -> Set status='running' (skill continues)          |
+-------------------------------------------------------------+
                              |
                              v
+-------------------------------------------------------------+
|               ccw-loop Skill (Execution Plane)               |
|                                                              |
|  Single Agent Deep Interaction:                              |
|    spawn_agent -> wait -> send_input -> ... -> close_agent   |
|                                                              |
|  Actions: INIT -> DEVELOP -> DEBUG -> VALIDATE -> COMPLETE   |
+-------------------------------------------------------------+

Key Design Principles

  1. Single Agent Deep Interaction: One agent handles entire loop lifecycle via send_input (no multi-agent overhead)
  2. Unified State: API and Skill share {projectRoot}/.workflow/.loop/{loopId}.json state file
  3. Control Signals: Skill checks status field before each action (paused/stopped → graceful exit)
  4. File-Driven Progress: All progress documented in {projectRoot}/.workflow/.loop/{loopId}.progress/
  5. Resumable: Continue any loop with --loop-id
  6. Dual Trigger: Supports API trigger (--loop-id) and direct call (task description)

Arguments

ArgRequiredDescription
TASKOne of TASK or --loop-idTask description (for new loop)
--loop-idOne of TASK or --loop-idExisting loop ID to continue
--autoNoAuto-cycle mode (develop → debug → validate → complete)

Execution Modes

Mode 1: Interactive

User manually selects each action via menu.

User -> MENU -> Select action -> Execute -> View results -> MENU -> ...

Mode 2: Auto-Loop

Automatic execution using selectNextAction logic.

INIT -> DEVELOP -> ... -> VALIDATE -> (if fail) -> DEBUG -> VALIDATE -> COMPLETE

Execution Flow

Input Parsing:
   └─ Parse arguments (TASK | --loop-id + --auto)
   └─ Convert to structured context (loopId, state, progressDir)

Phase 1: Session Initialization
   └─ Ref: phases/01-session-init.md
      ├─ Create new loop OR resume existing loop
      ├─ Initialize state file and directory structure
      └─ Output: loopId, state, progressDir

Phase 2: Orchestration Loop
   └─ Ref: phases/02-orchestration-loop.md
      ├─ Spawn single executor agent
      ├─ Main while loop: wait → parse → dispatch → send_input
      ├─ Handle: COMPLETED / PAUSED / STOPPED / WAITING_INPUT / next action
      ├─ Update iteration count per cycle
      └─ close_agent on exit

Phase Reference Documents (read on-demand when phase executes):

PhaseDocumentPurpose
1phases/01-session-init.mdArgument parsing, state creation/resume, directory init
2phases/02-orchestration-loop.mdAgent spawn, main loop, result parsing, send_input dispatch

Data Flow

User Input (TASK | --loop-id + --auto)
    ↓
[Parse Arguments]
    ↓ loopId, state, progressDir

Phase 1: Session Initialization
    ↓ loopId, state (initialized/resumed), progressDir

Phase 2: Orchestration Loop
    ↓ spawn agent → [INIT] → wait → parse
    ↓
    ┌─── Main Loop (while iteration < max) ──────────┐
    │ wait() → parseActionResult(output)               │
    │   ├─ COMPLETED → close_agent, return             │
    │   ├─ PAUSED → close_agent, return                │
    │   ├─ STOPPED → close_agent, return               │
    │   ├─ WAITING_INPUT → collect input → send_input  │
    │   └─ next_action → send_input(continue)          │
    │ Update iteration in state file                   │
    └──────────────────────────────────────────────────┘
    ↓
close_agent → return finalState

Session Structure

{projectRoot}/.workflow/.loop/
├── {loopId}.json              # Master state file (API + Skill shared)
├── {loopId}.tasks.jsonl       # Task list (API managed)
└── {loopId}.progress/         # Skill progress files
    ├── develop.md             # Development progress timeline
    ├── debug.md               # Understanding evolution document
    ├── validate.md            # Validation report
    ├── changes.log            # Code changes log (NDJSON)
    ├── debug.log              # Debug log (NDJSON)
    ├── hypotheses.json        # Debug hypotheses tracking
    ├── test-results.json      # Test execution results
    ├── coverage.json          # Coverage data
    └── summary.md             # Completion summary

State Management

Master state file: {projectRoot}/.workflow/.loop/{loopId}.json

{
  "loop_id": "loop-v2-20260122T100000-abc123",
  "title": "Task title",
  "description": "Full task description",
  "max_iterations": 10,
  "status": "created | running | paused | completed | failed | user_exit",
  "current_iteration": 0,
  "created_at": "ISO8601",
  "updated_at": "ISO8601",
  "completed_at": "ISO8601 (optional)",
  "failure_reason": "string (optional)",

  "skill_state": {
    "current_action": "init | develop | debug | validate | complete | null",
    "last_action": "string | null",
    "completed_actions": [],
    "mode": "interactive | auto",

    "develop": {
      "total": 0, "completed": 0, "current_task": null,
      "tasks": [{ "id": "task-001", "description": "...", "tool": "gemini", "mode": "write", "status": "pending", "files_changed": [], "created_at": "ISO8601", "completed_at": null }],
      "last_progress_at": null
    },

    "debug": {
      "active_bug": null, "hypotheses_count": 0,
      "hypotheses": [{ "id": "H1", "description": "...", "testable_condition": "...", "logging_point": "file:func:line", "evidence_criteria": { "confirm": "...", "reject": "..." }, "likelihood": 1, "status": "pending", "evidence": null, "verdict_reason": null }],
      "confirmed_hypothesis": null, "iteration": 0, "last_analysis_at": null
    },

    "validate": {
      "pass_rate": 0, "coverage": 0,
      "test_results": [{ "test_name": "...", "suite": "...", "status": "passed | failed | skipped", "duration_ms": 0, "error_message": null, "stack_trace": null }],
      "passed": false, "failed_tests": [], "last_run_at": null
    },

    "errors": [{ "action": "...", "message": "...", "timestamp": "ISO8601" }],

    "summary": { "duration": 0, "iterations": 0, "develop": {}, "debug": {}, "validate": {} }
  }
}

Control Signal Checking: Agent checks state.status before every action:

  • running → continue
  • paused → exit gracefully, wait for resume
  • failed → terminate
  • Other → stop

Recovery: If state corrupted, rebuild skill_state from {projectRoot}/.workflow/.loop/{loopId}.progress/ markdown files and logs.

Action Catalog

ActionPurposePreconditionsOutput FilesTrigger
INITInitialize sessionstatus=running, skill_state=nulldevelop.md, state.jsonFirst run
DEVELOPExecute dev taskpending tasks > 0develop.md, changes.logHas pending tasks
DEBUGHypothesis debugneeds debuggingdebug.md, debug.logTest failures
VALIDATERun testsneeds validationvalidate.md, test-results.jsonAfter develop/debug
COMPLETEFinish loopall donesummary.mdAll tasks done
MENUDisplay menuinteractive mode-Interactive mode

Action Flow

spawn_agent (ccw-loop-executor)
       |
       v
   +-------+
   |  INIT |  (if skill_state is null)
   +-------+
       |
       v
   +-------+    send_input
   |  MENU | <------------- (user selection in interactive mode)
   +-------+
       |
   +---+---+---+---+
   |   |   |   |   |
   v   v   v   v   v
 DEV DBG VAL CMP EXIT
       |
       v
   wait() -> get result
       |
       v
   [Loop continues via send_input]
       |
       v
  close_agent()

Action Dependencies

ActionDepends OnLeads To
INIT-MENU or DEVELOP
MENUINITUser selection
DEVELOPINITDEVELOP, DEBUG, VALIDATE
DEBUGINITDEVELOP, VALIDATE
VALIDATEDEVELOP or DEBUGCOMPLETE, DEBUG, DEVELOP
COMPLETE-Terminal

Action Sequences

Happy Path (Auto):  INIT → DEVELOP → DEVELOP → VALIDATE (pass) → COMPLETE
Debug Iteration:    INIT → DEVELOP → VALIDATE (fail) → DEBUG → VALIDATE (pass) → COMPLETE
Interactive Path:   INIT → MENU → DEVELOP → MENU → VALIDATE → MENU → COMPLETE

Auto Mode Selection Logic

function selectNextAction(state) {
  const skillState = state.skill_state

  // 1. Terminal conditions
  if (state.status === 'completed') return null
  if (state.status === 'failed') return null
  if (state.current_iteration >= state.max_iterations) return 'COMPLETE'

  // 2. Initialization check
  if (!skillState) return 'INIT'

  // 3. Auto selection based on state
  const hasPendingDevelop = skillState.develop.tasks.some(t => t.status === 'pending')

  if (hasPendingDevelop) return 'DEVELOP'

  if (skillState.last_action === 'DEVELOP') {
    if (skillState.develop.completed < skillState.develop.total) return 'DEBUG'
  }

  if (skillState.last_action === 'DEBUG' || skillState.debug.confirmed_hypothesis) {
    return 'VALIDATE'
  }

  if (skillState.last_action === 'VALIDATE') {
    if (!skillState.validate.passed) return 'DEVELOP'
  }

  if (skillState.validate.passed && !hasPendingDevelop) return 'COMPLETE'

  return 'DEVELOP'
}

Coordination Protocol

Agent → Orchestrator (ACTION_RESULT)

Every action MUST output:

ACTION_RESULT:
- action: {ACTION_NAME}
- status: success | failed | needs_input
- message: {user-facing message}
- state_updates: { ... }

FILES_UPDATED:
- {file_path}: {description}

NEXT_ACTION_NEEDED: {ACTION_NAME} | WAITING_INPUT | COMPLETED | PAUSED

Orchestrator → Agent (send_input)

Auto mode continuation:

## CONTINUE EXECUTION

Previous action completed: {action}
Result: {status}

## EXECUTE NEXT ACTION

Continue with: {next_action}
Read action instructions and execute.
Output ACTION_RESULT when complete.

Interactive mode user input:

## USER INPUT RECEIVED

Action selected: {action}

## EXECUTE SELECTED ACTION

Read action instructions and execute: {action}
Update state and progress files accordingly.
Output ACTION_RESULT when complete.

Codex Subagent API

APIPurpose
spawn_agent({message})Create subagent, returns agent_id
wait({ids, timeout_ms})Wait for results (only way to get output)
send_input({id, message})Continue interaction / follow-up
close_agent({id})Close and reclaim (irreversible)

Rules: Single agent for entire loop. send_input for multi-phase. close_agent only after confirming no more interaction needed.

TodoWrite Pattern

Phase-Level Tracking (Attached)

[
  {"content": "Phase 1: Session Initialization", "status": "completed"},
  {"content": "Phase 2: Orchestration Loop", "status": "in_progress"},
  {"content": "  → Action: INIT", "status": "completed"},
  {"content": "  → Action: DEVELOP (task 1/3)", "status": "in_progress"},
  {"content": "  → Action: VALIDATE", "status": "pending"},
  {"content": "  → Action: COMPLETE", "status": "pending"}
]

Iteration Tracking (Collapsed)

[
  {"content": "Phase 1: Session Initialization", "status": "completed"},
  {"content": "Iteration 1: DEVELOP x3 + VALIDATE (pass)", "status": "completed"},
  {"content": "Phase 2: COMPLETE", "status": "in_progress"}
]

Core Rules

  1. Start Immediately: First action is TodoWrite initialization, then Phase 1 execution
  2. Progressive Phase Loading: Read phase docs ONLY when that phase is about to execute
  3. Parse Every Output: Extract ACTION_RESULT from agent output for next decision
  4. Auto-Continue: After each action, execute next pending action automatically (auto mode)
  5. Track Progress: Update TodoWrite dynamically with attachment/collapse pattern
  6. Single Writer: Orchestrator updates master state file; agent writes to progress files
  7. File References: Pass file paths between orchestrator and agent, not content
  8. DO NOT STOP: Continuous execution until COMPLETED, PAUSED, STOPPED, or max iterations

Error Handling

Error TypeRecovery
Agent timeoutsend_input requesting convergence, then retry
State corruptedRebuild from progress markdown files and logs
Agent closed unexpectedlyRe-spawn with previous output in message
Action failedLog error, continue or prompt user
Tests failLoop back to DEVELOP or DEBUG
Max iterations reachedGenerate summary with remaining issues documented
Session not foundCreate new session

Coordinator Checklist

Before Each Phase

  • Read phase reference document
  • Check current state for dependencies
  • Update TodoWrite with phase tasks

After Each Phase

  • Parse agent outputs (ACTION_RESULT)
  • Update master state file (iteration count, updated_at)
  • Collapse TodoWrite sub-tasks
  • Determine next action (continue / iterate / complete)

Reference Documents

DocumentPurpose
actions/Action definitions (INIT, DEVELOP, DEBUG, VALIDATE, COMPLETE, MENU)

Usage

# Start new loop (direct call)
/ccw-loop TASK="Implement user authentication"

# Auto-cycle mode
/ccw-loop --auto TASK="Fix login bug and add tests"

# Continue existing loop
/ccw-loop --loop-id=loop-v2-20260122-abc123

# API triggered auto-cycle
/ccw-loop --loop-id=loop-v2-20260122-abc123 --auto

平台分布

Claude Code

30.56%
按下载量换算28

Cursor

22.07%
按下载量换算21

windsurf

19.53%
按下载量换算18

OpenCode

13.4%
按下载量换算12

Codex

7.67%
按下载量换算7

Antigravity

3.64%
按下载量换算3

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/catlog22/claude-code-workflow --skill ccw-loop;npx skills add catlog22/claude-code-workflow --skill "ccw-loop" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills