Agent skill
test-driven-development
Use when implementing non-trivial code changes that should follow TDD (write a failing test first, make the smallest passing change, then refactor safely).
Install this agent skill to your Project
npx add-skill https://github.com/narumiruna/agent-skills/tree/main/skills/test-driven-development
SKILL.md
TDD Policy
- Non-trivial changes SHOULD begin with a test.
- A test SHOULD fail before implementation begins whenever practical (red → green → refactor).
- Implementation SHOULD follow the red → green → refactor cycle.
- Implement the smallest change required to make the test pass.
- Refactoring MUST happen only after tests pass and MUST NOT change behavior.
- Tests MUST act as executable specifications of behavior, not merely coverage.
- Tests MUST assert observable behavior, not implementation details.
- Bug fixes SHOULD include a regression test when feasible.
- Code changes SHOULD include corresponding test updates when behavior changes.
- Tests MUST be deterministic and isolated from uncontrolled inputs (for example network, time, or randomness).
- Tests SHOULD avoid reliance on external systems unless explicitly intended.
- External dependencies SHOULD be controlled appropriately.
- Tests SHOULD target the lowest meaningful level.
- Integration and end-to-end tests SHOULD complement lower-level tests where needed.
- Tests MUST NOT be weakened or removed to satisfy incorrect implementations.
- Tests SHOULD fail for a single clear reason.
- When tests cannot be added, this MUST be rare and explicitly justified, including:
- why testing is not feasible
- what risk remains
- how the change was validated
- Skipping TDD for non-trivial changes REQUIRES explicit justification.
Scope
-
Non-trivial changes include:
- Bug fixes
- New features
- Behavior changes
- Data transformations
- Business logic or query changes
-
Excluded:
- Pure formatting changes
- Renames without behavior change
- Comment or documentation updates
Exceptions
- TDD MAY be relaxed for:
- Rapid prototyping or spike solutions
- Exploratory coding where requirements are unclear
- Pure UI layout or styling changes
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
slide-creator
Use when creating slide decks with Marp/Marpit Markdown (marp), including authoring slide content, designing slide color schemes, and building SVG diagrams or illustrations for the deck.
slide-color-design
Use when you only need slide color systems, palette selection, or palette generation workflows and want direct pointers to the color design references.
mermaid-creator
Use when creating or converting Mermaid diagrams (for example flowcharts, sequence diagrams, ER diagrams, and Gantt charts), including exporting to SVG for docs or slides.
svg-illustration
Use when you need SVG diagram rules, layout patterns, or embedding guidance for slide decks and want the minimal SVG-focused reading path.
python-cli-typer
Use when building or structuring Python CLI commands with Typer, including commands, options, and multi-command apps.
imrad-recomposer
Use when transforming non-IMRaD material into a clean IMRaD output with strict section boundaries and explicit assumption labeling.
Didn't find tool you were looking for?