home / skills / oimiragieo / agent-studio / writing-plans

This skill creates bite-sized implementation plans with complete code, tests, and steps to guide multi-step software tasks.

npx playbooks add skill oimiragieo/agent-studio --skill writing-plans

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
3.9 KB
---
name: writing-plans
description: Create bite-sized task lists with complete code. Use when planning multi-step implementations.
version: 1.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Read, Write]
best_practices:
  - Tasks should be 2-5 minutes each
  - Include exact file paths
  - Provide complete code in plan
  - Assume executor has zero context
error_handling: graceful
streaming: supported
---

# 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 or branch.

**Save plans to:** `.claude/context/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:** REQUIRED SUB-SKILL: Use executing-plans 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

## Related Skills

- [`plan-generator`](../plan-generator/SKILL.md) - Structured plan generation with phases, dependencies, and risks

## Execution Handoff

After saving the plan, offer execution choice:

**"Plan complete and saved to `.claude/context/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:**
- **REQUIRED SUB-SKILL:** Use 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
- **REQUIRED SUB-SKILL:** New session uses executing-plans

## Memory Protocol (MANDATORY)

**Before starting:**
Read `.claude/context/memory/learnings.md`

**After completing:**
- New pattern -> `.claude/context/memory/learnings.md`
- Issue found -> `.claude/context/memory/issues.md`
- Decision made -> `.claude/context/memory/decisions.md`

> ASSUME INTERRUPTION: If it's not in memory, it didn't happen.
```

Overview

This skill generates bite-sized, test-driven implementation plans with complete code and exact file paths. It assumes the engineer has no context about the codebase and produces step-by-step actions suitable for short (2–5 minute) commits. Plans are saved to a dated file under .claude/context/plans for traceability.

How this skill works

I'm using the writing-plans skill to create the implementation plan. The skill produces a document header, an explicit architecture and tech stack note, and a sequence of tasks where each task lists files to create/modify/test, a failing test to write, the command to run it, minimal implementation code, test verification, and an exact git commit. It enforces TDD, frequent commits, exact commands, expected outputs, and memory updates to .claude/context/memory/*.md.

When to use it

  • Planning multi-step implementations that require precise developer handoff
  • When you want TDD-first, minimal implementations with frequent commits
  • Creating worktree- or branch-specific plans for feature development
  • When engineers lack context about the codebase or testing conventions

Best practices

  • Keep each step a single, 2–5 minute action: write a failing test, run it, implement minimal code, run tests, commit
  • Always include exact file paths and full code blocks for implementations and tests
  • Use dedicated branch or worktree for the plan and save the plan to .claude/context/plans/YYYY-MM-DD-<feature-name>.md
  • Update memory files before starting and after finishing: learnings, issues, decisions
  • DRY and YAGNI: implement only what the tests require; avoid speculative changes

Example use cases

  • Add a new API endpoint with full tests and example requests
  • Refactor a module by replacing internal function with a smaller public API and accompanying tests
  • Implement a frontend component with unit tests, story, and integration checks
  • Add validation and error handling for a form input following TDD steps

FAQ

Where is the plan saved?

Plans are saved under .claude/context/plans/YYYY-MM-DD-<feature-name>.md in the worktree or branch where you run the skill.

What does each task look like?

Each task lists files to create/modify/test and five atomic steps: write failing test, run to fail, write minimal implementation, run to pass, commit with exact commands.

How do I hand off execution?

After saving the plan, choose Subagent-Driven (stay in session, per-task subagents) or Parallel Session (new session with executing-plans). The plan includes instructions for both.