test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
Target: Software development & testing. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original English text
Topics in the source
- Test-Driven Development (TDD)
- Overview
- When to Use
- The Iron Law
- Red-Green-Refactor
- RED - Write Failing Test
- Verify RED - Watch It Fail
- GREEN - Minimal Code
Write the test first. Watch it fail. Write minimal code to pass. Core principle: If you didn't watch the test fail, you don't know if it tests the right thing. Violating the letter of the rules is violating the spirit of the rules. Always: New features Bug fixes Refactoring Behavior changes Exceptions (ask your human partner): Throwaway prototypes Generated code Configuration files Thinking "skip TDD just this once"? Stop. That's rationalization. Write code before the test? Delete it. Start over. No exceptions: Don't keep it as "reference" Don't "adapt" it while writing tests Don't look at it Delete means delete Implement fresh from tests. Period. Write one minimal test showing what should happen. Clear name, tests real behavior, one thing Vague name, tests mock not code Requirements: One behavior Clear name Real code (no mocks unless unavoidable) MANDATORY. Never skip. Confirm: Test fails (not errors) Failure message is expected Fails because feature missing (not typos) Test passes? You're testing existing behavior. Fix test. Test errors? Fix error, re-run until it fails correctly. Write simplest code to pass the test. Just enough to pass Over-engineered Don't add features, refact
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- obra/superpowers
- Source file
- skills/test-driven-development/SKILL.md
- Fixed revision
- 22f0b463e7a5e579904dd6211a520321035526f7
Requirements
- Only the author’s Skill metadata is included. Read the full instructions to check dependencies, licensing and conditions of use.
A small first task
先阅读原作者说明,再决定是否在自己的 AI 工具中使用。
Instructions for your AI tool
- Claude Desktop: resource-specific guide not available yet
- Claude Code: resource-specific guide not available yet
- Cursor: resource-specific guide not available yet
- Codex: resource-specific guide not available yet
Author documentation is not live verification by this site. Without evidence, we do not mark a resource as compatible, safe or free.
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: obra/superpowers · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T17:01:01.766Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.