with one click
writing-plans
// Use when you have a spec or requirements for a multi-step task, before touching code
// Use when you have a spec or requirements for a multi-step task, before touching code
当用户明确要求"初始化项目"、"创建项目指令文件"或"生成 AGENTS.md"时使用。完全自动化:自动检测操作系统默认语言,分析项目目录结构(支持 Python/Web/Rust/Go/Java/数据科学/文档项目等),推断项目类型和用途,一键生成规范的项目指令文档。生成结果包括:AGENTS.md(跨平台通用项目指令,Single Source of Truth)、CLAUDE.md(Claude Code 特定适配,通过 @./AGENTS.md 引用)、README.md(项目介绍与使用方法)、CHANGELOG.md(项目变更记录)、.gitignore(Git 忽略规则,安全优先),并在完整初始化时自动补齐 `docs/` 与 `docs/plans/`。
当需要把本仓库 pipelines/skills 下的所有 skills 安装到系统级(默认同时安装到 Codex: ~/.codex/skills 和 Claude Code: ~/.claude/skills),以便在任意项目/对话中可被发现与调用时使用。使用 MD5 哈希进行版本控制,仅安装有更新的 skills;支持 --skill 指定单个或少量技能安装/更新、强制覆盖安装、指定单一目标安装和远程安装模式(--remote --check/--auto)。
当用户明确要求"测试代码"、"运行代码审查"或"进行代码自检"时使用。通过多轮 A 轮批判性代码审查 + B 轮代码质量原则检查,系统化发现、记录、修复程序代码中的问题,并将计划/过程/结果统一沉淀到目标代码根目录的 `tmp/run_{timestamp}/tests/` 隔离工作区。⚠️ 不适用:用户只是想优化功能(应直接修改)、只是询问代码问题(应直接回答)、没有明确"测试代码"意图。
当用户明确要求"使用 awesome-code / 多代理协作 / 并行协调开发"时使用。通过脚本收集可用 Agent 摘要、配置约束与 `dispatch_gate`,再由 AI 自主判断 single-pass / focused-agent / parallel / sequential 策略并选择子代理;当配置中的 required route agent 缺失时必须阻塞继续执行。⚠️ 不适用:用户仅需单一角色的简单修改或咨询、用户未明确表达多代理协作意图、用户只是了解技能概念。
Use when completing tasks, implementing major features, or before merging to verify work meets requirements - reviews implementation against plan or requirements with severity分级(Critical/Important/Minor). NO MERGE WITHOUT CODE REVIEW FIRST.
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes - four-phase framework (root cause investigation, pattern analysis, hypothesis testing, implementation). NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.
| name | writing-plans |
| description | Use when you have a spec or requirements for a multi-step task, before touching code |
| metadata | {"author":"Bensz Conan","keywords":["writing-plans"]} |
bensz-collect-bugs 规范记录到 ~/.bensz-skills/bugs/,不要直接修改用户本地已安装的 skill 源码;若有 workaround,先记 bug,再继续完成任务。gh 上传新增 bug 到 huangwb8/bensz-bugs;不要 pull / clone 整个仓库。Write implementation plans sized to the task risk. Small, localized work should get a short closed-loop plan; complex or high-risk work should get the full task tree with explicit tests, affected files, dependencies, and rollback/verification notes. 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
Each step is one action (2-5 minutes):
Do not inflate a small task into a large plan just because the planning skill is active.
Every plan MUST start with this header:
# [Feature Name] Implementation Plan
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers: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]
**Minimal Change Scope:** [Allowed paths and explicit avoid list]
**Success Criteria:** [Observable checks that prove completion]
**Verification Plan:** [Exact commands or manual checks]
---
### 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
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
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:**
- **REQUIRED SUB-SKILL:** Use superpowers: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 superpowers:executing-plans