AgentSkillsCN

writing-plans

当您已针对多步骤任务制定了详细规格或需求说明,但在动手编写代码之前使用。

SKILL.md
--- frontmatter
name: writing-plans
description: Use when you have a spec or requirements for a multi-step task, before touching code

Writing Plans

Adapted from obra/superpowers for Cursor IDE.

Overview

Write comprehensive implementation plans assuming the engineer has zero context for the codebase and questionable taste. Document everything they need: which files to touch, code, testing, docs, how to test. Give them the plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.

Announce at start: "I'm using the writing-plans skill to create the implementation plan."

Save plans to: docs/plans/YYYY-MM-DD-<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:

markdown
# [Feature Name] Implementation Plan

**Goal:** [One sentence describing what this builds]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]

Task Structure

Each task should include:

  • Files: Create/Modify/Test paths
  • Step 1: Write the failing test (with code)
  • Step 2: Run test to verify it fails (with command + expected output)
  • Step 3: Write minimal implementation (with code)
  • Step 4: Run test to verify it passes (with command + expected output)
  • Step 5: Commit (with exact commands)

Remember

  • Exact file paths always
  • Complete code in plan (not "add validation")
  • Exact commands with expected output
  • DRY, YAGNI, TDD, frequent commits

Execution Handoff

After saving the plan, offer execution choice:

1. Subagent-Driven (this session) - Dispatch fresh subagent per task via Cursor's Task tool, review between tasks

2. Batch Execution (this session) - Execute tasks in batches with checkpoints using the executing-plans skill

Which approach?

If Subagent-Driven: Use the subagent-driven-development skill. If Batch Execution: Use the executing-plans skill.