---
id: gh-writing-plans
name: "Writing Plans"
url: https://skills.yangsir.net/skill/gh-writing-plans
author: obra
domain: ai-project-management-collaboration
tags: ["implementation-planning", "task-management", "software-development", "engineering-workflow"]
install_count: 520
rating: 4.20 (120 reviews)
github: https://github.com/obra/superpowers-skills/tree/main/skills/collaboration/writing-plans
---

# Writing Plans

> 此技能能为工程师生成详细、分步的实现计划，即使他们对代码库一无所知。它将复杂任务拆解为可执行的微小步骤，包含具体文件路径、代码示例和测试指导，显著提升开发效率和代码质量，确保项目顺利推进。

**Stats**: 520 installs · 4.2/5 (120 reviews)

## Before / After 对比

### 提升开发规划效率

**Before**:

用户或团队在为新功能手动制定详细的实现计划时，需要投入大量时间理解上下文、拆解任务并编写具体步骤，这通常耗时且容易遗漏关键细节，导致开发延误和返工。

**After**:

此技能能够快速生成结构清晰、步骤详尽的实现计划，将复杂任务分解为可执行的微小单元，显著减少了规划时间，并确保了任务的准确性和一致性，加速了开发进程。

| Metric | Before | After | Change |
|---|---|---|---|
| 规划时间 | 240分钟 | 30分钟 | -88% |

## Readme

# Writing Plans

## Overview

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/plans/YYYY-MM-DD-<feature-name>.md`

## Bite-Sized Task Granularity

**Each step is one action (2-5 minutes):**
- "Write the failing test" - step
- "Run it to make sure it fails" - step
- "Implement the minimal code to make the test pass" - step
- "Run the tests and make sure they pass" - step
- "Commit" - step

## Plan Document Header

**Every plan MUST start with this header:**

```markdown
# [Feature Name] Implementation Plan

> **For Claude:** Use `${SUPERPOWERS_SKILLS_ROOT}/skills/collaboration/executing-plans/SKILL.md` to implement this plan task-by-task.

**Goal:** [One sentence describing what this builds]

**Architecture:** [2-3 sentences about approach]

**Tech Stack:** [Key technologies/libraries]

---
```

## Task Structure

```markdown
### Task N: [Component Name]

**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py:123-145`
- Test: `tests/exact/path/to/test.py`

**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"
```
```

## Remember
- Exact file paths always
- Complete code in plan (not "add validation")
- Exact commands with expected output
- Reference relevant skills with @ syntax
- DRY, YAGNI, TDD, frequent commits

## Execution Handoff

After saving the plan, offer execution choice:

**"Plan complete and saved to `docs/plans/<filename>.md`. Two execution options:**

**1. Subagent-Driven (this session)** - I dispatch fresh subagent per task, review between tasks, fast iteration

**2. Parallel Session (separate)** - Open new session with executing-plans, batch execution with checkpoints

**Which approach?"**

**If Subagent-Driven chosen:**
- Use skills/collaboration/subagent-driven-development
- Stay in this session
- Fresh subagent per task + code review

**If Parallel Session chosen:**
- Guide them to open new session in worktree
- New session uses skills/collaboration/executing-plans


---
*Source: https://skills.yangsir.net/skill/gh-writing-plans*
*Markdown mirror: https://skills.yangsir.net/api/skill/gh-writing-plans/markdown*