在实现前定义 API 和模块之间的输入输出,统一命名、错误格式与输入校验,并考虑现有调用方的兼容性及重试造成的重复处理。
- 设计新的 REST API
- 定义界面与服务器的数据规范
- 在保持兼容的前提下扩展 API
将跨多个文件的功能开发和改造拆成可验证的小步骤,反复进行实现、测试、验证与提交,让系统在每个阶段都保持可运行状态。
Delivers changes incrementally in thin, verifiable slices. Use when implementing any feature or change that touches more than one file, or when picking up the next task from a plan. Use when rolling a change out behind a feature flag, when you're about to write a large amount of code at once, or when a task feels too big to land in one step.
这项技能将功能开发和代码改造拆成可验证的小步骤。每个阶段都进行实现、测试、验证和提交,在保持系统可运行的同时逐步扩大范围。它介绍了多种拆分方式:打通从数据库到界面的一项完整操作,先确定 API 规范,或先验证不确定的部分。技能也涵盖功能开关,用于控制功能是否向用户开放,让尚未完成的功能可以先集成而不展示给用户。
适合涉及多个文件的改动,或无法一次完成的大型任务。从计划中开始下一项任务时,也能限定本次范围,避免混入无关修复。
不适用于范围已经很小的工作,例如只修改单个文件中的一个小函数。验证使用目标项目自身的测试和构建命令,并根据需要执行类型检查和代码规范检查。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。
总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月20日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
Build in thin vertical slices — implement one piece, test it, verify it, then expand. Avoid implementing an entire feature in one pass. Each increment should leave the system in a working, testable state. This is the execution discipline that makes large features manageable.
When NOT to use: Single-file, single-function changes where the scope is already minimal.
┌──────────────────────────────────────┐
│ │
│ Implement ──→ Test ──→ Verify ──┐ │
│ ▲ │ │
│ └───── Commit ◄─────────────┘ │
│ │ │
│ ▼ │
│ Next slice │
│ │
└──────────────────────────────────────┘
For each slice:
git-workflow-and-versioning for atomic commit guidance)Build one complete path through the stack:
Slice 1: Create a task (DB + API + basic UI)
→ Tests pass, user can create a task via the UI
Slice 2: List tasks (query + API + UI)
→ Tests pass, user can see their tasks
Slice 3: Edit a task (update + API + UI)
→ Tests pass, user can modify tasks
Slice 4: Delete a task (delete + API + UI + confirmation)
→ Tests pass, full CRUD complete
Each slice delivers working end-to-end functionality.
When backend and frontend need to develop in parallel:
Slice 0: Define the API contract (types, interfaces, OpenAPI spec)
Slice 1a: Implement backend against the contract + API tests
Slice 1b: Implement frontend against mock data matching the contract
Slice 2: Integrate and test end-to-end
Tackle the riskiest or most uncertain piece first:
Slice 1: Prove the WebSocket connection works (highest risk)
Slice 2: Build real-time task updates on the proven connection
Slice 3: Add offline support and reconnection
If Slice 1 fails, you discover it before investing in Slices 2 and 3.
Before writing any code, ask: "What is the simplest thing that could work?"
After writing code, review it against these checks:
SIMPLICITY CHECK:
✗ Generic EventBus with middleware pipeline for one notification
✓ Simple function call
✗ Abstract factory pattern for two similar components
✓ Two straightforward components with shared utilities
✗ Config-driven form builder for three forms
✓ Three form components
Three similar lines of code is better than a premature abstraction. Implement the naive, obviously-correct version first. Optimize only after correctness is proven with tests.
Touch only what the task requires.
Do NOT:
If you notice something worth improving outside your task scope, note it — don't fix it:
NOTICED BUT NOT TOUCHING:
- src/utils/format.ts has an unused import (unrelated to this task)
- The auth middleware could use better error messages (separate task)
→ Want me to create tasks for these?
Each increment changes one logical thing. Don't mix concerns:
Bad: One commit that adds a new component, refactors an existing one, and updates the build config.
Good: Three separate commits — one for each change.
After each increment, the project must build and existing tests must pass. Don't leave the codebase in a broken state between slices.
If a feature isn't ready for users but you need to merge increments:
// Feature flag for work-in-progress
const ENABLE_TASK_SHARING = process.env.FEATURE_TASK_SHARING === 'true';
if (ENABLE_TASK_SHARING) {
// New sharing UI
}
This lets you merge small increments to the main branch without exposing incomplete work.
New code should default to safe, conservative behavior:
// Safe: disabled by default, opt-in
export function createTask(data: TaskInput, options?: { notify?: boolean }) {
const shouldNotify = options?.notify ?? false;
// ...
}
Each increment should be independently revertable:
When directing an agent to implement incrementally:
"Let's implement Task 3 from the plan.
Start with just the database schema change and the API endpoint.
Don't touch the UI yet — we'll do that in the next increment.
After implementing, run the repository's test and build commands to
verify nothing is broken."
Be explicit about what's in scope and what's NOT in scope for each increment.
After each increment, verify with the repository's own commands (see the test-driven-development skill's Discover the Stack First section):
npm test, ./gradlew test, pytest, ...)npx tsc --noEmit, mypy, ...)Note: Run each verification command after a change that could affect it. After a successful run, don't repeat the same command unless the code has changed since — re-running on unchanged code adds no information.
| Rationalization | Reality |
|---|---|
| "I'll test it all at the end" | Bugs compound. A bug in Slice 1 makes Slices 2-5 wrong. Test each slice. |
| "It's faster to do it all at once" | It feels faster until something breaks and you can't find which of 500 changed lines caused it. |
| "These changes are too small to commit separately" | Small commits are free. Large commits hide bugs and make rollbacks painful. |
| "I'll add the feature flag later" | If the feature isn't complete, it shouldn't be user-visible. Add the flag now. |
| "This refactor is small enough to include" | Refactors mixed with features make both harder to review and debug. Separate them. |
| "Let me run the build command again just to be sure" | After a successful run, repeating the same command adds nothing unless the code has changed since. Run it again after subsequent edits, not as reassurance. |
After completing all increments for a task:
Per-increment verification is the local check. Before declaring a task done, apply the project-wide Definition of Done as the final gate, the standing bar every increment clears regardless of the task. See ../../references/definition-of-done.md.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
在实现前定义 API 和模块之间的输入输出,统一命名、错误格式与输入校验,并考虑现有调用方的兼容性及重试造成的重复处理。
在真实浏览器中验证页面显示与操作,检查错误、网络通信和加载速度,并比较修复前后的截图、确认无障碍支持。
自动执行代码变更后的测试、类型检查和构建,建立发布前的质量检查流程。涵盖GitHub Actions配置、分阶段发布和回滚步骤,也介绍失败排查与运行提速。
在合并前从正确性、可读性、架构、安全和性能五个维度审查代码变更,检查测试是否恰当,区分必须修复的问题与可选建议,并提出具体改进方法。
在保持行为不变的前提下,整理深层条件分支、长函数、重复逻辑和含糊命名。先检查现有规范与测试,再以可读性为标准逐步修改。
将项目质量标准及其数值、理由和检查方法写入文档,并从差异中检查跳过测试、抑制警告或降低门槛的改动,维持智能体开发质量。