Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Meta-skill for designing orchestrator+phases structured workflow skills. Creates SKILL.md coordinator with progressive phase loading, TodoWrite patterns, and data flow. Triggers on "design workflow skill", "create workflow skill", "workflow skill designer".
.claude/skills/catlog22-workflow-skill-designer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 80% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 244% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 308% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 207% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 174% | 0% |
> Plan tracking: codex 无 TaskCreate/TaskUpdate/TodoWrite 任务板。进度清单用 update_plan({ explanation?, plan: [{ step, status }] }) 维护(整体提交步骤数组,status: pending | in_progress | completed),权威状态始终在 session 工件中;依赖/认领(addBlockedBy/owner)是工件字段,不是工具参数。
Meta-skill for creating structured workflow skills following the orchestrator + phases pattern. Generates complete skill packages with SKILL.md as coordinator and phases/ folder for execution details.
┌─────────────────────────────────────────────────────────────────┐
│ Workflow Skill Designer │
│ → Analyze requirements → Design orchestrator → Generate phases │
└───────────────┬─────────────────────────────────────────────────┘
│
┌───────────┼───────────┬───────────┐
↓ ↓ ↓ ↓
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ Phase 1 │ │ Phase 2 │ │ Phase 3 │ │ Phase 4 │
│ Require │ │ Orch │ │ Phases │ │ Valid │
│ Analysis│ │ Design │ │ Design │ │ & Integ │
└─────────┘ └─────────┘ └─────────┘ └─────────┘
↓ ↓ ↓ ↓
workflow SKILL.md phases/ Complete
config generated 0N-*.md skill pkgThe skill this meta-skill produces follows this structure:
.claude/skills/{skill-name}/
├── SKILL.md # Orchestrator: coordination, data flow, update_plan
├── phases/
│ ├── 01-{phase-name}.md # Phase execution detail (full content)
│ ├── 02-{phase-name}.md
│ ├── ...
│ └── 0N-{phase-name}.md
├── specs/ # [Optional] Domain specifications
└── templates/ # [Optional] Reusable templatesPatterns extracted from successful workflow skill implementations (workflow-plan, project-analyze, etc.):
SKILL.md = Pure coordinator. Contains:
Ref: phases/0N-xxx.md markersPhase files = Full execution detail. Contains:
Key Rule: SKILL.md references phase docs via Ref: markers. Phase docs are read only when that phase executes, not all at once.
Phase starts:
→ Sub-tasks ATTACHED to update_plan (in_progress + pending)
→ Orchestrator executes sub-tasks sequentially
Phase ends:
→ Sub-tasks COLLAPSED back to high-level summary (completed)
→ Next phase beginsPhase N output → stored in memory/variable → Phase N+1 input
└─ or written to session file for persistenceEach phase receives outputs from prior phases via:
Phase N output contains condition flag
├─ condition met → Execute Phase N+1
└─ condition not met → Skip to Phase N+2User input (free text) → Structured format before Phase 1:
GOAL: [objective]
SCOPE: [boundaries]
CONTEXT: [background/constraints]Workflow preferences (auto mode, force explore, etc.) MUST be collected via request_user_input in SKILL.md before dispatching to phases. Phases reference these as workflowPreferences.{key} context variables.
Anti-Pattern: Command-line flags (--yes, -e, --explore) parsed within phase files via $ARGUMENTS.includes(...).
javascript// CORRECT: In SKILL.md (before phase dispatch) const prefResponse = request_user_input({ questions: [ { question: "是否跳过确认?", header: "Auto Mode", options: [ { label: "Interactive (Recommended)", description: "交互模式" }, { label: "Auto", description: "跳过所有确认" } ]} ] }) workflowPreferences = { autoYes: prefResponse.autoMode === 'Auto' } // CORRECT: In phase files (reference only) const autoYes = workflowPreferences.autoYes // WRONG: In phase files (flag parsing) const autoYes = $ARGUMENTS.includes('--yes') || $ARGUMENTS.includes('-y')
When one phase needs to invoke another phase within the same skill, read and execute the phase document directly. Do NOT use Skill() routing back through SKILL.md.
javascript// CORRECT: Direct handoff (executionContext already set) Read("phases/02-lite-execute.md") // Execute with executionContext (Mode 1) // WRONG: Skill routing (unnecessary round-trip) spawn_agent({ task_name: "workflow_lite_plan", message: "Execute skill workflow-lite-plan, args: --in-memory" })
Phase files are internal execution documents. They MUST NOT contain:
| Prohibited | Reason | Correct Location | |------------|--------|------------------| | Flag parsing ($ARGUMENTS.includes(...)) | Preferences collected in SKILL.md | SKILL.md via request_user_input | | Invocation syntax (/skill-name "...") | Not user-facing docs | Removed or SKILL.md only | | Conversion provenance (Source: Converted from...) | Implementation detail | Removed | | Skill routing for inter-phase (spawn_agent({ task_name: "...", message: "Execute skill ..." })) | Use direct phase read | Direct Read("phases/...") |
Multi-phase workflows span long conversations. Context compression (compact) will naturally summarize earlier phase documents. The strategy uses 双重保险: update_plan 跟踪 active phase 保护其不被压缩,sentinel 作为兜底在压缩发生时触发恢复。
Design principle: update_plan in_progress = active phase → protect from compact | Sentinel = re-read fallback if protection fails.
Double insurance mechanism:
| Layer | Role | Mechanism | |-------|------|-----------| | 1. Active Phase Protection | 预防 | update_plan in_progress 标记当前 phase → compact 时保留该 phase 完整内容,不压缩 | | 2. Sentinel Re-read | 恢复 | Phase 文件嵌入标识符 → 若仍被压缩,检测到 sentinel-only 状态时立即 re-read |
When to apply: 任何通过 direct handoff (Pattern 7) 跨 phase 执行的场景,尤其是后续 phase 包含复杂执行协议(多 Step、agent 调度、CLI 编排)时。
update_plan 已经跟踪每个 phase 的执行状态。利用此信息驱动 compact 策略:
update_plan status → Compact behavior:
┌─ completed → ✅ 可压缩(已完成,不再需要完整内容)
├─ in_progress → 🛡️ 禁止压缩(正在执行,必须保留完整协议)
└─ pending → ✅ 可压缩(尚未加载,无内容)SKILL.md Execution Flow 中标注 compact 联动:
markdown## Execution Flow > **⚠️ COMPACT DIRECTIVE**: Context compression MUST check update_plan phase status. > The phase currently marked `in_progress` is the active execution phase — preserve its FULL content. > Only compress phases marked `completed` or `pending`. Phase 1: Requirements Analysis ← update_plan tracks status └─ Ref: phases/01-xxx.md Phase 2: Execution Engine ← update_plan tracks status └─ Ref: phases/02-xxx.md ...
update_plan 状态转换 时自动更新 compact 保护范围:
Phase 1: in_progress 🛡️ → completed ✅ (compact 可压缩 Phase 1)
Phase 2: pending ✅ → in_progress 🛡️ (compact 保护 Phase 2)即使有 Layer 1 保护,compact 仍可能在极端场景(超长上下文、多轮 agent 调度)下压缩 active phase。Sentinel 确保恢复能力:
Phase 文件顶部嵌入 sentinel:
markdown> **📌 COMPACT SENTINEL [Phase N: {phase-name}]** > This phase contains {M} execution steps (Step N.1 — N.{M}). > If you can read this sentinel but cannot find the full Step protocol below, context has been compressed. > Recovery: `Read("phases/0N-xxx.md")`
Sentinel 设计特点:
markdown| Phase | Document | Purpose | Compact | |-------|----------|---------|---------| | 1 | phases/01-xxx.md | Planning | update_plan 驱动 | | 2 | phases/02-xxx.md | Execution | update_plan 驱动 + 🔄 sentinel | **Compact Rules**: 1. **update_plan `in_progress`** → 保留完整内容,禁止压缩 2. **update_plan `completed`** → 可压缩为摘要 3. **🔄 sentinel fallback** → 带此标记的 phase 包含 compact sentinel;若 compact 后仅存 sentinel 而无完整 Step 协议,**必须立即 `Read("phases/0N-xxx.md")` 恢复后再继续**
markdown> **⚠️ CHECKPOINT**: Before proceeding, verify: > 1. This phase is update_plan `in_progress` (active phase protection) > 2. Full protocol (Step N.X — N.{M}) is in active memory, not just sentinel > If only sentinel remains → `Read("phases/0N-xxx.md")` now.
javascript// Phase N is tracked by update_plan — active phase protection applies. // Sentinel fallback: if compressed despite protection, re-read triggers automatically. Read("phases/0N-xxx.md")
Phase 1: Requirements Analysis
└─ Ref: phases/01-requirements-analysis.md
├─ Input source: commands, descriptions, user interaction
└─ Output: workflowConfig (phases, data flow, agents, conditions)
Phase 2: Orchestrator Design (SKILL.md)
└─ Ref: phases/02-orchestrator-design.md
├─ Input: workflowConfig
└─ Output: .claude/skills/{name}/SKILL.md
Phase 3: Phase Files Design
└─ Ref: phases/03-phase-design.md
├─ Input: workflowConfig + source content
└─ Output: .claude/skills/{name}/phases/0N-*.md
Phase 4: Validation & Integration
└─ Ref: phases/04-validation.md
└─ Output: Validated skill packagePhase Reference Documents (read on-demand):
| Phase | Document | Purpose | |-------|----------|---------| | 1 | phases/01-requirements-analysis.md | Analyze workflow requirements from various sources | | 2 | phases/02-orchestrator-design.md | Generate SKILL.md with orchestration patterns | | 3 | phases/03-phase-design.md | Generate phase files preserving full execution detail | | 4 | phases/04-validation.md | Validate structure, references, and integration |
This meta-skill accepts workflow definitions from multiple sources:
| Source | Description | Example | |--------|-------------|---------| | Existing commands | Convert .claude/commands/ orchestrator + sub-commands | plan.md + session/start.md + tools/*.md | | Text description | User describes workflow in natural language | "Create a 3-phase code review workflow" | | Requirements doc | Structured requirements file | requirements.md with phases/agents/outputs | | Existing skill | Refactor/redesign an existing skill | Restructure a flat skill into phases |
When converting from command format to skill format:
| Command Field | Skill Field | Transformation | |---------------|-------------|----------------| | name | name | Prefix with group: plan → workflow-plan | | description | description | Append trigger phrase: Triggers on "xxx" | | argument-hint | _(removed)_ | Arguments handled in Input Processing section | | examples | _(removed)_ | Examples moved to inline documentation | | allowed-tools | allowed-tools | Expand wildcards: Skill(*) → Skill, add commonly needed tools | | group | _(removed)_ | Embedded in name prefix | | _(none)_ | session-mode | Add: run if the skill creates a Run / writes {run_dir} artifacts, else none. When run, also add the run-mode.md <required_reading> block. |
What goes into SKILL.md vs what goes into phase files:
| Section | Content | Source | |---------|---------|--------| | Frontmatter | name, description, allowed-tools | Command frontmatter (converted) | | Architecture Overview | ASCII diagram of phase flow | Derived from execution structure | | Key Design Principles | Coordination rules | Extracted from command coordinator role | | Execution Flow | Phase sequence with Ref: markers + Phase Reference table | Command execution process | | Core Rules | Orchestration constraints | Command core rules | | Input Processing | Structured format conversion | Command input processing | | Data Flow | Inter-phase data passing | Command data flow | | update_plan Pattern | Attachment/collapse lifecycle | Command update_plan sections | | Post-Phase Updates | Planning notes / state updates between phases | Command inter-phase update code | | Error Handling | Failure recovery | Command error handling | | Coordinator Checklist | Pre/post phase actions | Command coordinator checklist | | Related Commands | Prerequisites and follow-ups | Command related commands |
| Content | Rule | |---------|------| | Full agent prompts | Preserve verbatim from source command | | Bash command blocks | Preserve verbatim | | Code implementations | Preserve verbatim | | Validation checklists | Preserve verbatim | | Error handling details | Preserve verbatim | | Input/Output spec | Add if not present in source | | Phase header | Add # Phase N: {Name} | | Objective section | Add ## Objective with bullet points | | Next Phase link | Add ## Next Phase with link to next |
Critical Rule: Phase files must be content-faithful to their source. Do NOT summarize, abbreviate, or simplify. The phase file IS the execution instruction - every bash command, every agent prompt, every validation step must be preserved.
markdown--- name: {skill-name} description: {description}. Triggers on "{trigger1}", "{trigger2}". allowed-tools: {tools} session-mode: {run|none} --- <!-- Include only when session-mode: run --> <required_reading> @~/.maestro/workflows/run-mode.md </required_reading> # {Title} {One-paragraph description of what this skill does and what it produces.} ## Architecture Overview {ASCII diagram showing phases and data flow} ## Key Design Principles 1. **{Principle}**: {Description} ... ## Interactive Preference Collection Collect workflow preferences via request_user_input before dispatching to phases: {request_user_input code with preference derivation → workflowPreferences} ## Auto Mode Defaults When `workflowPreferences.autoYes === true`: {auto-mode behavior}. ## Execution Flow {Phase sequence with Ref: markers} **Phase Reference Documents** (read on-demand when phase executes): | Phase | Document | Purpose | Compact | |-------|----------|---------|---------| | 1 | [phases/01-xxx.md](phases/01-xxx.md) | ... | update_plan 驱动 | | N | [phases/0N-xxx.md](phases/0N-xxx.md) | ... | update_plan 驱动 + 🔄 sentinel | ... **Compact Rules**: 1. **update_plan `in_progress`** → 保留完整内容,禁止压缩 2. **update_plan `completed`** → 可压缩为摘要 3. **🔄 sentinel fallback** → 带此标记的 phase 包含 compact sentinel;若 compact 后仅存 sentinel 而无完整 Step 协议,必须立即 `Read()` 恢复 ## Core Rules 1. {Rule} ... ## Input Processing {How user input is converted to structured format} ## Data Flow {Inter-phase data passing diagram} ## update_plan Pattern {Attachment/collapse lifecycle description with examples} ## Post-Phase Updates {State updates between phases} ## Error Handling {Failure recovery rules} ## Coordinator Checklist {Pre/post phase action list} ## Related Commands {Prerequisites and follow-ups}
markdown# Phase N: {Phase Name} > **📌 COMPACT SENTINEL [Phase N: {phase-name}]** > This phase contains {M} execution steps (Step N.1 — N.{M}). > If you can read this sentinel but cannot find the full Step protocol below, context has been compressed. > Recovery: `Read("phases/0N-xxx.md")` > _(Include for phases marked 🔄 in SKILL.md Phase Reference table — see Pattern 9)_ {One-sentence description of this phase's goal.} ## Objective - {Goal 1} - {Goal 2} ## Execution ### Step N.1: {Step Name} {Full execution detail: commands, agent prompts, code} ### Step N.2: {Step Name} > **⚠️ CHECKPOINT**: Before proceeding, verify: > 1. This phase is update_plan `in_progress` (active phase protection) > 2. Full protocol (Step N.X — N.{M}) is in active memory, not just sentinel > If only sentinel remains → `Read("phases/0N-xxx.md")` now. > _(Add checkpoints before critical execution steps: agent dispatch, CLI launch, review — see Pattern 9)_ {Full execution detail} ## Output - **Variable**: `{variableName}` (e.g., `sessionId`) - **File**: `{run_dir}/outputs/{artifact}` — formal artifacts go under `{run_dir}/outputs/`; synthesis to `{run_dir}/report.md`, scratch to `{run_dir}/work/` (session-mode: run only). See run-mode.md. - **update_plan**: Mark Phase N completed, Phase N+1 in_progress ## Next Phase Return to orchestrator, then auto-continue to [Phase N+1: xxx](0N+1-xxx.md).
When designing a new workflow skill, answer these questions:
| Question | Impact | Example | |----------|--------|---------| | How many phases? | Directory structure | 3-7 phases typical | | Which phases are conditional? | Orchestrator logic | "Phase 3 only if conflict_risk >= medium" | | What data flows between phases? | Data Flow section | sessionId, contextPath, configFlags | | Which phases use agents? | Phase file complexity | Agent prompts need verbatim preservation | | What's the update_plan granularity? | update_plan Pattern | Some phases have sub-tasks, others are atomic | | Is there a planning notes pattern? | Post-Phase Updates | Accumulated state document across phases | | What's the error recovery? | Error Handling | Retry once then report, vs rollback | | Does it need preference collection? | Interactive Preference Collection | Collect via request_user_input in SKILL.md, pass as workflowPreferences | | Does phase N hand off to phase M? | Direct Phase Handoff (Pattern 7) | Read phase doc directly, not Skill() routing | | Will later phases run after long context? | Compact Recovery (Pattern 9) | Add sentinel + checkpoints, mark 🔄 in Phase Reference table |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-16 | pass→pass | 13,220 | 11,542 | -13% | 1 | 1 | 0% | 2,006 | 6,852 | +242% | 0 | 0 | — |
case-15 | pass→pass | 12,894 | 5,177 | -60% | 1 | 1 | 0% | 1,749 | 5,853 | +235% | 0 | 0 | — |
case-01 | fail→fail | 34,234 | 8,343 | -76% | 1 | 1 | 0% | 6,238 | 5,585 | -10% | 0 | 0 | — |
case-02 | fail→pass | 32,580 | 33,759 | +4% | 1 | 1 | 0% | 6,219 | 11,205 | +80% | 0 | 0 | — |
case-03 | fail→fail | 24,105 | 7,956 | -67% | 1 | 1 | 0% | 4,213 | 5,394 | +28% | 0 | 0 | — |
case-04 | pass→pass | 11,090 | 9,848 | -11% | 1 | 1 | 0% | 1,634 | 6,422 | +293% | 0 | 0 | — |
case-05 | pass→pass | 10,470 | 6,196 | -41% | 1 | 1 | 0% | 1,544 | 5,959 | +286% | 0 | 0 | — |
case-06 | pass→pass | 13,005 | 7,025 | -46% | 1 | 1 | 0% | 2,005 | 5,969 | +198% | 0 | 0 | — |
case-07 | fail→pass | 11,194 | 6,502 | -42% | 1 | 1 | 0% | 1,814 | 6,247 | +244% | 0 | 0 | — |
case-08 | pass→pass | 13,729 | 7,906 | -42% | 1 | 1 | 0% | 2,030 | 6,280 | +209% | 0 | 0 | — |
case-09 | fail→pass | 9,106 | 5,504 | -40% | 1 | 1 | 0% | 1,457 | 5,945 | +308% | 0 | 0 | — |
case-10 | pass→pass | 15,429 | 9,390 | -39% | 1 | 1 | 0% | 2,221 | 6,565 | +196% | 0 | 0 | — |
case-11 | pass→pass | 9,246 | 3,148 | -66% | 1 | 1 | 0% | 1,478 | 5,424 | +267% | 0 | 0 | — |
case-12 | fail→pass | 11,752 | 3,060 | -74% | 1 | 1 | 0% | 1,786 | 5,491 | +207% | 0 | 0 | — |
case-13 | fail→pass | 16,053 | 10,499 | -35% | 1 | 1 | 0% | 2,479 | 6,788 | +174% | 0 | 0 | — |
case-14 | pass→pass | 14,663 | 4,239 | -71% | 1 | 1 | 0% | 2,221 | 5,672 | +155% | 0 | 0 | — |
case-17 | fail→fail | 14,268 | 10,462 | -27% | 1 | 1 | 0% | 2,212 | 6,772 | +206% | 0 | 0 | — |
case-18 | fail→pass | 14,660 | 5,298 | -64% | 1 | 1 | 0% | 2,286 | 5,774 | +153% | 0 | 0 | — |
case-19 | pass→pass | 13,733 | 6,809 | -50% | 1 | 1 | 0% | 2,042 | 6,039 | +196% | 0 | 0 | — |
case-20 | pass→pass | 16,104 | 10,454 | -35% | 1 | 1 | 0% | 2,409 | 6,734 | +180% | 0 | 0 | — |
case-21 | pass→pass | 17,275 | 13,809 | -20% | 1 | 1 | 0% | 2,727 | 7,022 | +157% | 0 | 0 | — |
case-22 | fail→fail | 13,048 | 5,908 | -55% | 1 | 1 | 0% | 1,949 | 5,914 | +203% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +27 percentage points is the difference between those two pass rates over the 20 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.