wf-composer

GitHub

将自然语言工作流描述解析为DAG节点图,自动注入检查点并持久化为可复用JSON模板。支持断点续传和模板编辑,用于复杂任务的流程编排与设计。

.claude/skills/wf-composer/SKILL.md catlog22/Claude-Code-Workflow

Trigger Scenarios

用户需要设计或编排复杂的工作流 输入包含 'wf-composer' 或 '/wf-composer' 使用 --resume 或 --edit 参数恢复或修改工作流

Install

npx skills add catlog22/Claude-Code-Workflow --skill wf-composer -g -y
More Options

Non-standard path

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

Use without installing

npx skills use catlog22/Claude-Code-Workflow@wf-composer

指定 Agent (Claude Code)

npx skills add catlog22/Claude-Code-Workflow --skill wf-composer -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": "wf-composer",
    "description": "Semantic workflow composer — parse natural language workflow description into a DAG of skill\/CLI\/agent nodes, auto-inject checkpoint save nodes, confirm with user, persist as reusable JSON template. Triggers on \"wf-composer \" or \"\/wf-composer\".",
    "allowed-tools": "Agent(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*)",
    "argument-hint": "[workflow description]"
}

Workflow Design

Parse user's semantic workflow description → decompose into nodes → map to executors → auto-inject checkpoints → confirm pipeline → save as reusable workflow-template.json.

Architecture

User describes workflow in natural language
  -> Phase 1: Parse — extract intent steps + variables
  -> Phase 2: Resolve — map each step to executor (skill/cli/agent/command)
  -> Phase 3: Enrich — inject checkpoint nodes, set DAG edges
  -> Phase 4: Confirm — visualize pipeline, user approval/edit
  -> Phase 5: Persist — save .workflow/templates/<name>.json

Shared Constants

Constant Value
Session prefix WFD
Template dir .workflow/templates/
Template ID format wft-<slug>-<date>
Node ID format N-<seq> (e.g. N-001), CP-<seq> for checkpoints
Max nodes 20

Entry Router

Parse $ARGUMENTS.

Detection Condition Handler
Resume design --resume flag or existing WFD session -> Phase 0: Resume
Edit template --edit <template-id> flag -> Phase 0: Load + Edit
New design Default -> Phase 1: Parse

Phase 0: Resume / Edit (optional)

Resume design session:

  1. Scan .workflow/templates/design-drafts/WFD-*.json for in-progress designs
  2. Multiple found → AskUserQuestion for selection
  3. Load draft → skip to last incomplete phase

Edit existing template:

  1. Load template from --edit path
  2. Show current pipeline visualization
  3. AskUserQuestion: which nodes to modify/add/remove
  4. Re-enter at Phase 3 (Enrich) with edits applied

Phase 1: Parse

Read phases/01-parse.md and execute.

Objective: Extract structured semantic steps + context variables from natural language.

Success: design-session/intent.json written with: steps[], variables[], task_type, complexity.


Phase 2: Resolve

Read phases/02-resolve.md and execute.

Objective: Map each intent step to a concrete executor node.

Executor types:

  • skill — invoke via Skill(skill=..., args=...)
  • cli — invoke via ccw cli -p "..." --tool ... --mode ...
  • command — invoke via Skill(skill="<namespace:command>", args=...)
  • agent — invoke via Agent(subagent_type=..., prompt=...)
  • checkpoint — state save + optional user pause

Success: design-session/nodes.json written with resolved executor for each step.


Phase 3: Enrich

Read phases/03-enrich.md and execute.

Objective: Build DAG edges, auto-inject checkpoints at phase boundaries, validate port compatibility.

Checkpoint injection rules:

  • After every skillskill transition that crosses a semantic phase boundary
  • Before any long-running agent spawn
  • After any node that produces a persistent artifact (plan, spec, analysis)
  • At user-defined breakpoints (if any)

Success: design-session/dag.json with nodes[], edges[], checkpoints[], context_schema{}.


Phase 4: Confirm

Read phases/04-confirm.md and execute.

Objective: Visualize the pipeline, present to user, incorporate edits.

Display format:

Pipeline: <template-name>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
N-001 [skill]      workflow-lite-plan       "{goal}"
  |
CP-01 [checkpoint] After Plan               auto-continue
  |
N-002 [skill]      workflow-test-fix        "--session N-001"
  |
CP-02 [checkpoint] After Tests              pause-for-user
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Variables: goal (required)
Checkpoints: 2 (1 auto, 1 pause)

AskUserQuestion:

  • Confirm & Save
  • Edit node (select node ID)
  • Add node after (select position)
  • Remove node (select node ID)
  • Rename template

Success: User confirmed pipeline. Final dag.json ready.


Phase 5: Persist

Read phases/05-persist.md and execute.

Objective: Assemble final template JSON, write to template library, output summary.

Output:

  • .workflow/templates/<slug>.json — the reusable template
  • Console summary with template path + usage command

Success: Template saved. User shown: Skill(skill="wf-player", args="<template-path>")


Specs Reference

Spec Purpose
specs/node-catalog.md Available executors, port definitions, arg templates
specs/template-schema.md Full JSON template schema

Version History

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

Same Skill Collection

.claude/skills/brainstorm/SKILL.md
.claude/skills/ccw-chain/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-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
ee8e863c
Indexed
2026-07-25 09:32

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