tddcycle
Use when: running a Red-Green-Refactor cycle with one failing test, minimal implementation, and optional commit boundary on green.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when: running a Red-Green-Refactor cycle with one failing test, minimal implementation, and optional commit boundary on green.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when running workspace tests, choosing a test command, or summarizing results before handoff to debugger.
Use when running workspace tests, choosing a test command, or summarizing results before handoff to debugger.
Use when: running pre-commit or pre-push CI-equivalent checks in any workspace — discovers workflow commands with Cursor tools, filters for local executability, scopes to staged changes, and runs checks cheapest-first.
Use when the user wants to install or customize cursorAssistant in the current project (GitHub install or configure).
Use when: running pre-commit or pre-push CI-equivalent checks in any workspace — discovers workflow commands with Cursor tools, filters for local executability, scopes to staged changes, and runs checks cheapest-first.
Use when: discovering package manifests, assessing dependency health, finding replacements, or confirming import usage before removal — discovery only; mutating installs are handled by the deps agent.
| name | tddCycle |
| description | Use when: running a Red-Green-Refactor cycle with one failing test, minimal implementation, and optional commit boundary on green. |
| type | reference |
| version | 1.0 |
| license | MIT |
Skill metadata: version "1.0"; tags [tdd, red-green-refactor]; recommended tools [].
Use this skill in workspaces with the tdd pack selected.
Apply the Red-Green-Refactor cycle as the fundamental unit of work. Each cycle is complete and verifiable before the next begins.
testArchitectureRed — Write a failing test that captures exactly one new behavior. The test must fail for the right reason (assertion failure on behavior, not a compile or import error). Do not write implementation code during this phase.
Green — Write the minimum code needed to make the failing test pass. Correctness matters; elegance does not. Duplication and hardcoded returns are acceptable at this phase. Do not refactor during this phase.
Refactor — Restructure the code and tests without changing behavior. All tests must remain green throughout. This is the only phase where cleanup is appropriate.
test_returns_zero_for_empty_input, not test_1Treat a complete Red-Green-Refactor cycle as a natural commit boundary, not an automatic commit requirement. Only make a commit when the user asks for one or the repository workflow explicitly requires it. If local instructions route git actions through a specialist workflow or agent, follow that route instead of committing directly. A commit with a failing test is only acceptable if the user explicitly wants a wip: checkpoint and understands the state being recorded.