test-driven-development
强制执行RED→GREEN→REFACTOR微周期,并保持差异最小化。
📖 中文导读:强制执行RED→GREEN→REFACTOR微周期,并保持差异最小化。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: test-driven-development description: Enforce RED→GREEN→REFACTOR micro-cycles and keep diffs minimal version: 0.1.0 tags: [testing, quality] triggers: - tdd - tests first - failing test
Test-Driven Development
Purpose
Bias implementation to tests-first and small, verifiable changes.
Behavior
- RED: scaffold 1–3 failing tests targeting the smallest slice.
- GREEN: implement the minimum code to pass.
- REFACTOR: improve names/structure with tests green.
- Repeat in tiny increments until task acceptance criteria are met.
Guardrails
- Block large edits unless a failing test exists.
- Prefer small diffs spanning ≤3 files.
- Keep test names explicit and deterministic.
Output Style
bullet-pointsfor steps;markdown-focusedfor code blocks.
Integration
/lazy task-execimplementation phase; Coder/Tester agents.
Example Prompt
Apply TDD to implement input validation for prices.