ccw-chain

GitHub

基于链式加载的工作流编排器,通过意图分析与决策路由执行技能流水线。支持渐进式节点加载、自动模式处理、上下文变量传递及可视化进度展示。

.claude/skills/ccw-chain/SKILL.md catlog22/Claude-Code-Workflow

Trigger Scenarios

ccw chain chain ccw workflow chain

Install

npx skills add catlog22/Claude-Code-Workflow --skill ccw-chain -g -y
More Options

Non-standard path

npx skills add https://github.com/catlog22/Claude-Code-Workflow/tree/main/.claude/skills/ccw-chain -g -y

Use without installing

npx skills use catlog22/Claude-Code-Workflow@ccw-chain

指定 Agent (Claude Code)

npx skills add catlog22/Claude-Code-Workflow --skill ccw-chain -a claude-code -g -y

安装 repo 全部 skill

npx skills add catlog22/Claude-Code-Workflow --all -g -y

预览 repo 内 skill

npx skills add catlog22/Claude-Code-Workflow --list

SKILL.md

Frontmatter
{
    "name": "ccw-chain",
    "description": "Chain-based CCW workflow orchestrator. Intent analysis, workflow routing, and Skill pipeline execution via progressive chain loading. Triggers on \"ccw chain\", \"chain ccw\", \"workflow chain\".",
    "allowed-tools": "Skill(*), TodoWrite(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*)"
}

CCW Chain Orchestrator

Chain-based workflow orchestrator using chain_loader for progressive step loading and LLM-driven decision routing.

Discovery

  1. chain_loader list — list all chains with triggers, entries, and descriptions
  2. Match user intent to chain triggers.task_types / triggers.keywords
  3. chain_loader inspect — preview chain node graph and available entries
  4. chain_loader start — begin from default entry, named entry (entry_name), or any node (node)

Execution Protocol

When chain_loader delivers a step node with a skill/command doc:

  1. Read the loaded doc content to understand the skill's purpose and interface
  2. Assemble the Skill call: Skill(skill_name, args)
    • First step: args = "${analysis.goal}"
    • Subsequent steps: args = "" (auto-receives session context)
    • Special args noted in step name (e.g., --bugfix, --hotfix, --plan-only)
  3. Propagate -y: If auto mode active, append -y to args
  4. Execute: Skill(skill_name, args) — blocking, wait for completion
  5. Advance: chain_loader done to proceed to next step
const autoYes = /\b(-y|--yes)\b/.test($ARGUMENTS);

function assembleCommand(skillName, args, previousResult) {
  if (!args && previousResult?.session_id) {
    args = `--session="${previousResult.session_id}"`;
  }
  if (autoYes && !args.includes('-y') && !args.includes('--yes')) {
    args = args ? `${args} -y` : '-y';
  }
  return { skill: skillName, args };
}

Auto Mode (-y / --yes)

  • D1 Clarity Check: always choose "Clear" (skip clarification)
  • Confirmation: skip, execute directly
  • Error handling: auto-skip failed steps, continue pipeline
  • Propagation: -y injected into every downstream Skill call

Delegation Protocol

When chain_loader returns delegate_depth > 0:

  1. Continue normal execution (read content, assemble Skill, execute)
  2. On returned_from_delegate: true, resume parent chain context
  3. Variables received from child chain are available for subsequent steps

Preloaded Context

When chain_loader start returns preloaded_keys:

  1. Preloaded content is available via chain_loader content for the entire session
  2. Reference preloaded context when assembling Skill calls
  3. Use preloaded memory/project context to inform all downstream steps

Progress Visualization

After each chain_loader done, call chain_loader visualize to show progress. Display the visualization in execution log for user awareness.

Variable Propagation

Intent analysis results (task_type, goal, auto_yes) are stored as chain variables. assembleCommand() reads variables from chain_loader status for Skill args. Variables automatically flow through delegation via pass_variables/receive_variables.

Phase-Level Execution (Skill Chain Delegation)

When the current chain is a skill-level chain (entered via delegation from a category chain):

  1. Each step delivers phase doc content directly (not SKILL.md)
  2. Execute phase instructions inline — do NOT wrap in Skill() call
  3. Reference preloaded skill-context for orchestration patterns (TodoWrite, data flow, error handling)
  4. Phase execution produces artifacts (files, session state) consumed by the next phase
  5. The chain system controls phase progression — no need for internal phase orchestration

Architecture: Chain Definition Layers

  • Category chains (8): ccw-chain/chains/ — routing and orchestration (ccw-main, ccw-standard, etc.)
  • Workflow skill chains (7): .claude/workflow-skills/*/chains/ — skill-level chains with phase content
  • Phase content: .claude/skills/*/phases/ — original phase files, referenced via @skills/ prefix
  • Category chains delegate to workflow skill chains via findChainAcrossSkills() fallback
  • Content refs: @phases/ = skill-relative, @skills/ = project .claude/skills/ relative

Version History

  • 07491b0 Current 2026-07-25 09:30

Same Skill Collection

.claude/skills/brainstorm/SKILL.md
.claude/skills/ccw-help/SKILL.md
.claude/skills/delegation-check/SKILL.md
.claude/skills/investigate/SKILL.md
.claude/skills/issue-manage/SKILL.md
.claude/skills/memory-capture/SKILL.md
.claude/skills/memory-manage/SKILL.md
.claude/skills/prompt-generator/SKILL.md
.claude/skills/review-code/SKILL.md
.claude/skills/review-cycle/SKILL.md
.claude/skills/security-audit/SKILL.md
.claude/skills/ship/SKILL.md
.claude/skills/skill-generator/SKILL.md
.claude/skills/skill-iter-tune/SKILL.md
.claude/skills/skill-simplify/SKILL.md
.claude/skills/skill-tuning/SKILL.md
.claude/skills/spec-generator/SKILL.md
.claude/skills/team-arch-opt/SKILL.md
.claude/skills/team-brainstorm/SKILL.md
.claude/skills/team-coordinate/SKILL.md
.claude/skills/team-designer/SKILL.md
.claude/skills/team-executor/SKILL.md
.claude/skills/team-frontend-debug/SKILL.md
.claude/skills/team-frontend/SKILL.md
.claude/skills/team-interactive-craft/SKILL.md
.claude/skills/team-issue/SKILL.md
.claude/skills/team-lifecycle-v4/SKILL.md
.claude/skills/team-motion-design/SKILL.md
.claude/skills/team-perf-opt/SKILL.md
.claude/skills/team-planex/SKILL.md
.claude/skills/team-quality-assurance/SKILL.md
.claude/skills/team-review/SKILL.md
.claude/skills/team-roadmap-dev/SKILL.md
.claude/skills/team-tech-debt/SKILL.md
.claude/skills/team-testing/SKILL.md
.claude/skills/team-ui-polish/SKILL.md
.claude/skills/team-uidesign/SKILL.md
.claude/skills/team-ultra-analyze/SKILL.md
.claude/skills/team-ux-improve/SKILL.md
.claude/skills/team-visual-a11y/SKILL.md
.claude/skills/wf-composer/SKILL.md
.claude/skills/wf-player/SKILL.md
.claude/skills/workflow-execute/SKILL.md
.claude/skills/workflow-lite-execute/SKILL.md
.claude/skills/workflow-lite-plan/SKILL.md
.claude/skills/workflow-lite-test-review/SKILL.md
.claude/skills/workflow-multi-cli-plan/SKILL.md
.claude/skills/workflow-plan/SKILL.md
.claude/skills/workflow-skill-designer/SKILL.md

Metadata

Files
0
Version
07491b0
Hash
750c43ea
Indexed
2026-07-25 09:30

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 06:56
浙ICP备14020137号-1 $방문자$