一键导入
test-driven-development
Use when implementing any new feature, fixing a bug, or refactoring existing code. Enforces red-green-refactor discipline throughout.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when implementing any new feature, fixing a bug, or refactoring existing code. Enforces red-green-refactor discipline throughout.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Summarize the most recent commit or pending changes — what they do, how they fit into the existing code, and a diagram if the change is structural.
Orchestrates the full roadmap-to-committed-code flow. Iterates through milestones — implementing, testing, reviewing, and committing each — with human approval gates.
Use at the start of a session when there is a roadmap or milestone document and you want to pick up the next item. Orients from a cold start, locates the roadmap, identifies the next unfinished item, and proceeds to implementation.
Use when you have a large feature, project, or initiative to plan. Breaks it into discrete, sequenced milestones and writes them to a ROADMAP.md that milestone can consume.
Use before claiming any work is complete, fixed, or passing. Use before every "done", "fixed", "tests pass", or "it's working" statement.
Generate a GitHub pull request description from the current branch. Produces a high-level, markdown-formatted summary and copies it to the clipboard. Pass a base branch if it's not main/master.
| name | test-driven-development |
| description | Use when implementing any new feature, fixing a bug, or refactoring existing code. Enforces red-green-refactor discipline throughout. |
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST.
Write the test. Watch it fail for the right reason. Write the minimum code to make it pass. Refactor. Repeat.
This is not a guideline. If code exists before its test, delete the code and start over.
Repeat for the next behavior.
| Rationalization | Response |
|---|---|
| "This code is too simple to need a test" | Simple code has simple tests. Write it. |
| "I'll add tests once the API stabilizes" | The tests help stabilize the API. Write them first. |
| "There's no time for TDD right now" | TDD is faster than debugging untested code later. |
| "It's already written, I'll just test it now" | Delete it. Rewrite it after the test. |
| "I need to see it working before I can write a test" | Write the test for how it should work. That's the point. |