一键导入
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when you have a spec or requirements for a multi-step task, before touching code
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | writing-plans |
| description | Use when you have a spec or requirements for a multi-step task, before touching code |
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
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.
Each step is one action (2-5 minutes):
Every plan MUST start with this header:
# [Feature Name] Implementation Plan
> **For Claude:** REQUIRED: Use superpowers:subagent-driven-development (if subagents available) or superpowers:executing-plans to implement this plan. 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]
**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"
```
After completing each chunk of the plan:
Chunk boundaries: Use ## Chunk N: <name> headings to delimit chunks. Each chunk should be ≤1000 lines and logically self-contained.
Review loop guidance:
After saving the plan:
"Plan complete and saved to docs/plans/<filename>.md. Ready to execute?"
Execution path depends on harness capabilities:
If harness has subagents (Claude Code, etc.):
If harness does NOT have subagents:
完整開發流程編排器。使用者說「幫我做 X 功能」時觸發,自動依序驅動所有 agent 直到 PR 建立,只在關鍵決策點暫停確認。 也可用既有 GitHub issue id 直接進入 STAGE 1(跳過 STAGE 0a/0b 規劃),例如「開發 issue #42」「處理 #54」。 PR 實際合併後,可另外觸發 STAGE 6 清理該 PR 對應的 worktree(branch 一律保留不刪除)。 小修正可走 quick 模式(單暫停點、不建 worktree),例如「快速修正 <描述>」「/gen-dev-workflow quick #54」。 觸發條件:dev workflow, 開始開發, 新功能開發, 幫我做 X 功能, 繼續, 繼續上次, 繼續開發, /gen-dev-workflow, 開發 issue #<id>, 處理 #<id>, 快速修正, quick fix, PR #<id> 合併了 清理 worktree
分析 unstaged/staged 的 git 變更,依功能相關性將檔案分組,並建立多個語意化的單元 commit。當使用者說 "commit"、"gen-commit"、"依功能 commit"、"幫我 commit"、"進行功能單元 commit",或任何要求智慧分組並 commit 目前變更的變體時使用。也適用於使用者想把變更檔案以有意義、結構良好、依功能領域組織的訊息 commit 時。
當使用者要為已合入 main 的變更發布新版本——更新版號(pubspec.yaml / README.md)、把使用者可見的新功能同步進 README、補上 CHANGELOG、並打 git tag 推上去時使用。觸發語如「更新版本資訊」、「bump 版號」、「調整版號為 vX.Y.Z 下 tag push」、「release vX.Y.Z」、「gen-update-publish-info vX.Y.Z」。
讀取 GitHub PR 的 review inline comments,自行判斷每則意見是否需要修復——技術正確且合理者修復後 commit、push 並回覆附 commit SHA;不需修復者直接以中文回覆技術理由。觸發時機:使用者說「回覆 PR comment」、「針對 review 回覆修正」、「gen-pr-reply PR {number}」,或要針對 code review 的每個 inline comment 回覆修正 commit。
當使用者提供 GitHub issue id 連同已解析的 issue brief,並希望 Codex 從安全的 base 建立新的 git branch 與 worktree、沿用既有命名規則、且不依賴當前 branch 名稱即完成最小開發設定時,使用此 skill。
用於安全地關閉、移除、清理 git worktree 的收尾流程。檢查 worktree 狀態,乾淨且無殘留變更時直接移除、 不需再詢問是否刪除;不觸碰任何 issue 或 ticket 的 State;只移除 worktree,對應 branch 一律保留不刪除。 觸發條件:關閉 worktree, 移除 worktree, 清理 worktree, worktree 收尾, close worktree, remove worktree