From claude-superpowers
Use when you have a spec or requirements for a multi-step task, before touching code
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-superpowers:writing-plansThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**You MUST NOT call `EnterPlanMode` or `ExitPlanMode` at any point during this skill.** This skill operates in normal mode and manages its own completion flow via `AskUserQuestion`. Calling `EnterPlanMode` traps the session in plan mode where Write/Edit are restricted. Calling `ExitPlanMode` breaks the workflow and skips the user's execution choice. If you feel the urge to call either, STOP — f...
You MUST NOT call EnterPlanMode or ExitPlanMode at any point during this skill. This skill operates in normal mode and manages its own completion flow via AskUserQuestion. Calling EnterPlanMode traps the session in plan mode where Write/Edit are restricted. Calling ExitPlanMode breaks the workflow and skips the user's execution choice. If you feel the urge to call either, STOP — follow this skill's instructions instead.
Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
Announce at start: "I'm using the writing-plans skill to create the implementation plan."
Context: This should be run in a dedicated worktree (created by brainstorming skill).
Save plans to: docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md
If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it wasn't, suggest breaking this into separate plans — one per subsystem. Each plan should produce working, testable software on its own.
Before defining tasks, map out which files will be created or modified and what each one is responsible for. This is where decomposition decisions get locked in.
This structure informs the task decomposition. Each task should produce self-contained changes that make sense independently.
Subagents dispatched by subagent-driven-development do not auto-discover skills — see claude-superpowers:subagent-driven-development for the empirical 38/0 finding. To get a subagent to apply stack-specific guidance (React patterns, Expo routing, TypeScript strictness), the skill name must appear in its dispatch prompt.
Decide which skills apply at plan-creation time, per task. You already have the working directory and you know what each task touches — bake the recommendation into the task so the controller doesn't have to re-detect at dispatch time.
Detection: inspect package.json dependencies, file extensions in the files this plan will touch, and language manifests (pyproject.toml, Cargo.toml, go.mod). Cross-reference with the available-skills system reminder to find skills whose description matches the task's stack and intent. Only list skills you can see in the available-skills list — do not invent or assume.
Per-task selection rules:
- plugin:skill-name — one-line reason this applies to this task. Reasons are mandatory; they shape how the subagent applies the guidance.None — proceed without skill loading. Do not pad with marginal matches.claude-superpowers:test-driven-development belongs only on tasks that actually involve a TDD cycle, not on pure refactors or doc tasks.Fill the **Knowledge Skills:** field in each task's structure (see below) and mirror it as knowledgeSkills in the metadata JSON.
BEFORE exploring code or writing the plan, you MUST:
TaskList to check for existing tasks from brainstormingTaskCreate as you write each plan taskDo not proceed to exploration until TaskList has been called.
TaskList
Each task is a coherent unit of work that produces a testable, committable outcome.
See skills/shared/task-format-reference.md for the full granularity guide.
Key principle: TDD cycles happen WITHIN tasks, not as separate tasks. A task is "Implement X with tests" — the red-green-refactor steps are execution detail inside the task, not task boundaries.
Scope test:
Every plan MUST start with this header:
# [Feature Name] Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use claude-superpowers:subagent-driven-development (recommended) or claude-superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** [One sentence describing what this builds]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]
---
### Task N: [Component Name]
**Goal:** [One sentence — what this task produces]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py:123-145`
- Test: `tests/exact/path/to/test.py`
**Acceptance Criteria:**
- [ ] [Concrete, testable criterion]
- [ ] [Another criterion]
**Verify:** `exact test command` → expected output
**Knowledge Skills:**
- plugin:skill-name — one-line reason this applies to this task
- plugin:skill-name — one-line reason this applies to this task
**Steps:**
- [ ] **Step 1: Write the failing test**
```python
def test_specific_behavior():
result = function(input)
assert result == expected
```
- [ ] **Step 2: Run test to verify it fails**
Run: `pytest tests/path/test.py::test_name -v`
Expected: FAIL with "function not defined"
- [ ] **Step 3: Write minimal implementation**
```python
def function(input):
return expected
```
- [ ] **Step 4: Run test to verify it passes**
Run: `pytest tests/path/test.py::test_name -v`
Expected: PASS
- [ ] **Step 5: Commit**
```bash
git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"
```
Every step must contain the actual content an engineer needs. These are plan failures — never write them:
After writing the complete plan, look at the spec with fresh eyes and check the plan against it. This is a checklist you run yourself — not a subagent dispatch.
1. Spec coverage: Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
2. Placeholder scan: Search your plan for red flags — any of the patterns from the "No Placeholders" section above. Fix them.
3. Type consistency: Do the types, method signatures, and property names you used in later tasks match what you defined in earlier tasks? A function called clearLayers() in Task 3 but clearFullLayers() in Task 7 is a bug.
4. Knowledge Skills filled: Does every task have a **Knowledge Skills:** field, either listing relevant skills with reasons or explicitly saying None — proceed without skill loading.? An empty or missing field is a bug — see "Knowledge Skill Recommendations" above. Also confirm knowledgeSkills appears in each task's metadata JSON.
If you find issues, fix them inline. No need to re-review — just fix and move on. If you find a spec requirement with no task, add the task.
Your ONLY permitted next action is calling AskUserQuestion with this EXACT structure:
AskUserQuestion:
question: "Plan complete and saved to docs/superpowers/plans/<filename>.md. How would you like to execute it?"
header: "Execution"
options:
- label: "Subagent-Driven (this session)"
description: "I dispatch fresh subagent per task, review between tasks, fast iteration"
- label: "Parallel Session (separate)"
description: "Open new session in worktree with executing-plans, batch execution with checkpoints"
If you are about to call ExitPlanMode, STOP — call AskUserQuestion instead.
STOP. The user has chosen an execution method. You MUST invoke the corresponding skill using the Skill tool NOW. Do NOT implement tasks yourself — do NOT read files, make edits, or update task statuses. Your ONLY permitted action is invoking the skill below.If Subagent-Driven chosen:
Invoke the Skill tool: claude-superpowers:subagent-driven-development
If Parallel Session chosen:
Guide the user to open a new session in the worktree, then invoke: claude-superpowers:executing-plans
Use Claude Code's native task tools (v2.1.16+) to create structured tasks alongside the plan document.
For each task in the plan, create a corresponding native task. Embed metadata as a json:metadata code fence at the end of the description — this is the only way to ensure metadata survives TaskGet (the metadata parameter on TaskCreate is accepted but not returned by TaskGet).
TaskCreate:
subject: "Task N: [Component Name]"
description: |
**Goal:** [From task's Goal line]
**Files:**
[From task's Files section]
**Acceptance Criteria:**
[From task's Acceptance Criteria]
**Verify:** [From task's Verify line]
**Steps:**
[Key actions from task's Steps — abbreviated]
```json:metadata
{"files": ["path/to/file1.py"], "verifyCommand": "pytest tests/path/ -v", "acceptanceCriteria": ["criterion 1", "criterion 2"], "knowledgeSkills": ["plugin:skill-name — one-line reason this applies to this task"]}
```
activeForm: "Implementing [Component Name]"
The metadata parameter on TaskCreate is accepted but not returned by TaskGet. Embedding it as a json:metadata code fence in the description ensures:
See skills/shared/task-format-reference.md for the full metadata schema.
After all tasks created, set blockedBy relationships:
TaskUpdate:
taskId: [task-id]
addBlockedBy: [prerequisite-task-ids]
Update task status as work progresses:
TaskUpdate:
taskId: [task-id]
status: in_progress # when starting
TaskUpdate:
taskId: [task-id]
status: completed # when done
At plan completion, write the task persistence file in the same directory as the plan document.
If the plan is saved to docs/superpowers/plans/2026-01-15-feature.md, the tasks file MUST be saved to docs/superpowers/plans/2026-01-15-feature.md.tasks.json.
{
"planPath": "docs/superpowers/plans/2026-01-15-feature.md",
"tasks": [
{
"id": 0,
"subject": "Task 0: ...",
"status": "pending",
"description": "**Goal:** ...\n\n**Files:**\n...\n\n```json:metadata\n{\"files\": [\"path/to/file.py\"], \"verifyCommand\": \"pytest tests/ -v\", \"acceptanceCriteria\": [\"criterion 1\"], \"knowledgeSkills\": [\"plugin:skill-name — reason\"]}\n```"
},
{
"id": 1,
"subject": "Task 1: ...",
"status": "pending",
"blockedBy": [0],
"description": "**Goal:** ...\n\n```json:metadata\n{\"files\": [], \"verifyCommand\": \"\", \"acceptanceCriteria\": [], \"knowledgeSkills\": []}\n```"
}
],
"lastUpdated": "<timestamp>"
}
Both the plan .md and .tasks.json must be co-located in docs/superpowers/plans/.
Any new session can resume by running:
/claude-superpowers:executing-plans <plan-path>
The skill reads the .tasks.json file and continues from where it left off.
npx claudepluginhub psprowls/claude-superpowersCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.