Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Unified planning skill - 4-phase planning workflow, plan verification, and interactive replanning. Triggers on "workflow-plan", "workflow-plan-verify", "workflow:replan".
.claude/skills/workflow-plan/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-13 | ✗→✓ | ▲ Improved | — | — |
| case-17 | ✗→✓ | ▲ Improved | — | — |
| case-04 | ✗→✓ | ▲ Improved | — | — |
| case-16 | ✗→✓ | ▲ Improved | — | — |
| case-09 | ✗→✓ | ▲ Improved | — | — |
<purpose> Unified planning skill combining 4-phase planning workflow, plan quality verification, and interactive replanning. Produces IMPL_PLAN.md, task JSONs, verification reports, and manages plan lifecycle through session-level artifact updates. Routes by mode (plan | verify | replan) and acts as a pure orchestrator: executes phases, parses outputs, and passes context. </purpose>
<process>
┌──────────────────────────────────────────────────────────────────┐
│ Workflow Plan Orchestrator (SKILL.md) │
│ → Route by mode: plan | verify | replan │
│ → Pure coordinator: Execute phases, parse outputs, pass context │
└──────────────────────────────────┬───────────────────────────────┘
│
┌───────────────────────┼───────────────────────┐
↓ ↓ ↓
┌───────────┐ ┌───────────┐ ┌───────────┐
│ Plan Mode │ │ Verify │ │ Replan │
│ (default) │ │ Mode │ │ Mode │
│ Phase 1-4 │ │ Phase 5 │ │ Phase 6 │
└─────┬─────┘ └───────────┘ └───────────┘
│
┌───┼───┬───┐
↓ ↓ ↓ ↓
┌───┐┌───┐┌───┐┌───┐
│ 1 ││ 2 ││ 3 ││ 4 │
│Ses││Ctx││Con││Gen│
└───┘└───┘└───┘└─┬─┘
↓
┌───────────┐
│ Confirm │─── Verify ──→ Phase 5
│ (choice) │─── Execute ─→ Skill("workflow-execute")
└───────────┘─── Review ──→ Display session status inlineBefore dispatching to phase execution, collect workflow preferences via AskUserQuestion:
javascript// ★ 统一 auto mode 检测:-y/--yes 从 $ARGUMENTS 或 ccw 传播 const autoYes = /\b(-y|--yes)\b/.test($ARGUMENTS) if (autoYes) { // 自动模式:跳过所有询问,使用默认值 workflowPreferences = { autoYes: true, interactive: false } } else { const prefResponse = AskUserQuestion({ questions: [ { question: "是否跳过所有确认步骤(自动模式)?", header: "Auto Mode", multiSelect: false, options: [ { label: "Interactive (Recommended)", description: "交互模式,包含确认步骤" }, { label: "Auto", description: "跳过所有确认,自动执行" } ] } ] }) workflowPreferences = { autoYes: prefResponse.autoMode === 'Auto' } // For replan mode, also collect interactive preference if (mode === 'replan') { const replanPref = AskUserQuestion({ questions: [ { question: "是否使用交互式澄清模式?", header: "Replan Mode", multiSelect: false, options: [ { label: "Standard (Recommended)", description: "使用安全默认值" }, { label: "Interactive", description: "通过提问交互式澄清修改范围" } ] } ] }) workflowPreferences.interactive = replanPref.replanMode === 'Interactive' } }
workflowPreferences is passed to phase execution as context variable, referenced as workflowPreferences.autoYes, workflowPreferences.interactive within phases.
javascriptconst args = $ARGUMENTS const mode = detectMode(args) function detectMode(args) { // Skill trigger determines mode if (skillName === 'workflow-plan-verify') return 'verify' if (skillName === 'workflow:replan') return 'replan' return 'plan' // default: workflow-plan }
Multi-phase planning (Phase 1-4/5/6) spans long conversations. Uses 双重保险: TodoWrite 跟踪 active phase 保护其不被压缩,sentinel 作为兜底。
> ⚠️ COMPACT DIRECTIVE: Context compression MUST check TodoWrite phase status. > The phase currently marked in_progress is the active execution phase — preserve its FULL content. > Only compress phases marked completed or pending.
Input Parsing:
└─ Convert user input to structured format (GOAL/SCOPE/CONTEXT)
Phase 1: Session Discovery
└─ Ref: Read("phases/01-session-discovery.md")
└─ Output: sessionId (WFS-xxx), planning-notes.md
Phase 2: Context Gathering
└─ Ref: Read("phases/02-context-gathering.md")
├─ Tasks attached: Analyze structure → Identify integration → Generate package
└─ Output: contextPath + conflictRisk
Phase 3: Conflict Resolution (conditional: conflictRisk ≥ medium)
└─ Decision (conflictRisk check):
├─ conflictRisk ≥ medium → Ref: Read("phases/03-conflict-resolution.md")
│ ├─ Tasks attached: Detect conflicts → Present to user → Apply strategies
│ └─ Output: Modified brainstorm artifacts
└─ conflictRisk < medium → Skip to Phase 4
Phase 4: Task Generation
└─ Ref: Read("phases/04-task-generation.md")
└─ Output: IMPL_PLAN.md, task JSONs, TODO_LIST.md
Plan Confirmation (User Decision Gate):
└─ Decision (user choice):
├─ "Verify Plan Quality" (Recommended) → Route to Phase 5 (plan-verify)
├─ "Start Execution" → Skill(skill="workflow-execute")
└─ "Review Status Only" → Display session status inlinePhase 5: Plan Verification
└─ Ref: Read("phases/05-plan-verify.md")
└─ Output: PLAN_VERIFICATION.md with quality gate recommendationPhase 6: Interactive Replan
└─ Ref: Read("phases/06-replan.md")
└─ Output: Updated IMPL_PLAN.md, task JSONs, TODO_LIST.mdPhase Reference Documents (read on-demand when phase executes):
| Phase | Document | Purpose | Mode | Compact | |-------|----------|---------|------|---------| | 1 | phases/01-session-discovery.md | Create or discover workflow session | plan | TodoWrite 驱动 | | 2 | phases/02-context-gathering.md | Gather project context and analyze codebase | plan | TodoWrite 驱动 | | 3 | phases/03-conflict-resolution.md | Detect and resolve conflicts (conditional) | plan | TodoWrite 驱动 | | 4 | phases/04-task-generation.md | Generate implementation plan and task JSONs | plan | TodoWrite 驱动 + 🔄 sentinel | | 5 | phases/05-plan-verify.md | Read-only verification with quality gate | verify | TodoWrite 驱动 | | 6 | phases/06-replan.md | Interactive replanning with boundary clarification | replan | TodoWrite 驱动 |
Compact Rules:
in_progress → 保留完整内容,禁止压缩completed → 可压缩为摘要Read("phases/04-task-generation.md") 恢复Convert User Input to Structured Format:
User: "Build authentication system"
Structured: GOAL: Build authentication system SCOPE: Core authentication features CONTEXT: New implementation
User: "Add JWT authentication with email/password login and token refresh"
Structured: GOAL: Implement JWT-based authentication SCOPE: Email/password login, token generation, token refresh endpoints CONTEXT: JWT token-based security, refresh token rotation
requirements.md) → Read and structure:User Input (task description)
↓
[Convert to Structured Format]
↓ Structured Description:
↓ GOAL: [objective]
↓ SCOPE: [boundaries]
↓ CONTEXT: [background]
↓
Phase 1: session:start --auto "structured-description"
↓ Output: sessionId
↓ Write: planning-notes.md (User Intent section)
↓
Phase 2: context-gather --session sessionId "structured-description"
↓ Input: sessionId + structured description
↓ Output: contextPath (context-package.json) + conflictRisk
↓ Update: planning-notes.md (Context Findings + Consolidated Constraints)
↓
Phase 3: conflict-resolution [conditional: conflictRisk ≥ medium]
↓ Input: sessionId + contextPath + conflictRisk
↓ Output: Modified brainstorm artifacts
↓ Update: planning-notes.md (Conflict Decisions + Consolidated Constraints)
↓ Skip if conflictRisk is none/low → proceed directly to Phase 4
↓
Phase 4: task-generate-agent --session sessionId
↓ Input: sessionId + planning-notes.md + context-package.json + brainstorm artifacts
↓ Output: IMPL_PLAN.md, task JSONs, TODO_LIST.md
↓
Plan Confirmation (User Decision Gate):
├─ "Verify Plan Quality" (Recommended) → Route to Phase 5
├─ "Start Execution" → Skill(skill="workflow-execute")
└─ "Review Status Only" → Display session status inlineSession Memory Flow: Each phase receives session ID, which provides access to:
Input: --session sessionId (or auto-detect)
↓
Phase 5: Load artifacts → Agent-driven verification → Generate report
↓ Output: PLAN_VERIFICATION.md with quality gateInput: [--session sessionId] [task-id] "requirements"
↓
Phase 6: Mode detection → Clarification → Impact analysis → Backup → Apply → Verify
↓ Output: Updated artifacts + change summaryCore Concept: Dynamic task attachment and collapse for real-time visibility into workflow execution.
in_progress, others as pendingLifecycle: Initial pending → Phase executed (tasks ATTACHED) → Sub-tasks executed → Phase completed (tasks COLLAPSED for 2/3, marked completed for 1/4) → Next phase → Repeat
json[ {"content": "Phase 1: Session Discovery", "status": "completed"}, {"content": "Phase 2: Context Gathering", "status": "in_progress"}, {"content": " → Analyze codebase structure", "status": "in_progress"}, {"content": " → Identify integration points", "status": "pending"}, {"content": " → Generate context package", "status": "pending"}, {"content": "Phase 4: Task Generation", "status": "pending"} ]
json[ {"content": "Phase 1: Session Discovery", "status": "completed"}, {"content": "Phase 2: Context Gathering", "status": "completed"}, {"content": "Phase 4: Task Generation", "status": "pending"} ]
json[ {"content": "Phase 1: Session Discovery", "status": "completed"}, {"content": "Phase 2: Context Gathering", "status": "completed"}, {"content": "Phase 3: Conflict Resolution", "status": "in_progress"}, {"content": " → Detect conflicts with CLI analysis", "status": "in_progress"}, {"content": " → Present conflicts to user", "status": "pending"}, {"content": " → Apply resolution strategies", "status": "pending"}, {"content": "Phase 4: Task Generation", "status": "pending"} ]
Note: See individual Phase descriptions for detailed TodoWrite Update examples.
After each phase completes, update planning-notes.md:
compactSee phase files for detailed update code.
in_progress, report error to user, do not proceed to next phasesessionIntegrity from Step 1.2.5; log warnings for incomplete brainstorm artifactsMinimal Structure:
GOAL: [What to achieve]
SCOPE: [What's included]
CONTEXT: [Relevant info]Detailed Structure (optional, when more context available):
GOAL: [Primary objective]
SCOPE: [Included features/components]
CONTEXT: [Existing system, constraints, dependencies]
REQUIREMENTS: [Specific technical requirements]
CONSTRAINTS: [Limitations or boundaries]Prerequisite Skills:
brainstorm skill - Optional: Generate role-based analyses before planningbrainstorm skill - Optional: Refine brainstorm analyses with clarificationsCalled by Plan Mode (4 phases):
/workflow:session:start - Phase 1: Create or discover workflow sessionphases/02-context-gathering.md - Phase 2: Gather project context and analyze codebase (inline)phases/03-conflict-resolution.md - Phase 3: Detect and resolve conflicts (inline, conditional)memory-capture skill - Phase 3: Memory optimization (if context approaching limits)phases/04-task-generation.md - Phase 4: Generate task JSON files (inline)Follow-up Skills:
workflow-plan skill (plan-verify phase) - Verify plan quality (can also invoke via verify mode)Skill(skill="workflow-execute") - Begin implementation of generated tasks (skill: workflow-execute)workflow-plan skill (replan phase) - Modify plan (can also invoke via replan mode)</process>
<auto_mode> When workflowPreferences.autoYes is true (triggered by -y or --yes flag, or user selecting "Auto" mode):
</auto_mode>
<success_criteria>
</success_criteria>
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
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 18 counted toward the lift figure. The other 4 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 +55 percentage points is the difference between those two pass rates over the 18 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.