archived/writing-plans/SKILL.md
当你有一个规范或多步骤任务的需求时,在接触代码之前使用
npx skillsauth add cruldra/skills writing-plansInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
编写全面的实施计划,假设工程师对我们的代码库一无所知且品味堪忧。记录他们需要知道的一切:每个任务要接触哪些文件、代码、测试、可能需要检查的文档、如何测试。将整个计划分解为小任务。DRY。YAGNI。TDD。
假设他们是一位熟练的开发者,但几乎不了解我们的工具集或问题领域。假设他们不太了解良好的测试设计。
开始时声明: "我正在使用 writing-plans 技能来创建实施计划。"
保存计划到: docs/plans/YYYY-MM-DD-<feature-name>.md
如果规范涵盖多个独立的子系统,它应该在头脑风暴阶段被拆分为子项目规范。如果没有,建议将其拆分为独立的计划——每个子系统一个计划。每个计划都应该独立产出可运行、可测试的软件。
在定义任务之前,先规划将要创建或修改哪些文件,以及每个文件负责什么。这是分解决策被确定的地方。
这个结构指导任务分解。每个任务都应该产生独立的、有意义的自包含变更。
每个步骤是一个动作(2-5 分钟):
每个计划必须以这个头部开始:
# [功能名称] 实施计划
**目标:** [一句话描述构建的内容]
**架构:** [关于方法的 2-3 句话]
**技术栈:** [关键技术/库]
---
### 任务 N: [组件名称]
**文件:**
- 创建: `exact/path/to/file.py`
- 修改: `exact/path/to/existing.py:123-145`
- 测试: `tests/exact/path/to/test.py`
- [ ] **步骤 1: 编写失败的测试**
```python
def test_specific_behavior():
result = function(input)
assert result == expected
```
- [ ] **步骤 2: 运行测试以验证失败**
运行: `pytest tests/path/test.py::test_name -v`
预期: 失败,显示 "function not defined"
- [ ] **步骤 3: 编写最小实现**
```python
def function(input):
return expected
```
- [ ] **步骤 4: 运行测试以验证通过**
运行: `pytest tests/path/test.py::test_name -v`
预期: 通过
完成计划的每个块后:
块边界: 使用 ## Chunk N: <name> 标题来界定块。每个块应 ≤1000 行且逻辑上自包含。
审查循环指导:
保存计划后:
"计划已完成并保存到 docs/plans/<filename>.md。准备执行?"
testing
智能体 UAT 验收测试技能。用于验证智能体在真实场景下的表现是否满足预期。支持任意智能体框架(langchain、langgraph、deepagents、crewai 等)。触发词:测试智能体、验收测试、agent test、UAT
tools
Use when you need to create a Gitea issue, update its spec/plan markers, read or merge an issue's state JSON, or post a PR review comment in a repo that uses the spx CLI (superpowers-vscode workflow).
development
Use when implementing, modifying, refactoring, or reviewing code and the agent must follow explicit coding standards for simplicity, readability, maintainability, testability, project conventions, and minimal safe changes.
development
Use when integrating the deepagents SDK into a Python project — creating agents, configuring backends, adding subagents, middleware, memory, or skills. Also use when debugging deepagents agents or choosing between StateBackend, FilesystemBackend, and LocalShellBackend.