test-driven-development

Enforces red-green-refactor test-first workflow for features, bugfixes, and refactoring.

2|Updated Jul 25, 2026
One-click install
npx skills add https://github.com/ankaboot-source/boucle --skill test-driven-development-ankaboot-source
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/ankaboot-source/boucle/tree/main/.jcode/skills/test-driven-development
Command: npx skills add https://github.com/ankaboot-source/boucle --skill test-driven-development-ankaboot-source

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code written before tests often ships with unverified behavior, hidden bugs, and tests that pass immediately without proving anything. This Skill enforces a strict test-first discipline so every line of production code is backed by a test that was watched failing first. ## Core Features & Use Cases - Red-Green-Refactor Cycle: Guides writing one minimal failing test, verifying it fails for the right reason, implementing minimal code to pass, then refactoring while staying green. - Anti-Rationalization Guardrails: Provides explicit rebuttals to common excuses like "I'll test after" or "deleting code is wasteful", plus red flags that signal when to delete code and start over. - Testing Anti-Pattern Reference: Covers testing mock behavior, test-only methods in production classes, mocking without understanding dependencies, and incomplete mocks. - Use Case: When fixing a bug where empty emails are accepted, write a failing test asserting the rejection error, watch it fail, add the minimal validation check, and confirm the full suite passes. ## Quick Start Use the test-driven-development skill to implement this feature by writing a failing test first, then the minimal code to make it pass.

Frequently Asked Questions about test-driven-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I practice test-driven development on a new feature?

Write one minimal failing test describing the desired behavior, run it to confirm it fails for the right reason, then write the simplest code that passes. Refactor only while tests stay green, then repeat the cycle for the next behavior.

How do I fix a bug using TDD?

Write a failing test that reproduces the bug first, then implement the minimal fix that makes it pass. The test proves the fix works and prevents the bug from regressing later.

Why should tests be written before implementation code?

Tests written after code pass immediately, which proves nothing about whether they test the right behavior. Watching a test fail first confirms it actually exercises the missing feature rather than a typo or existing behavior.

When is it acceptable to skip test-driven development?

Exceptions are limited to throwaway prototypes, generated code, and configuration files, and only with explicit approval from your human partner. Exploratory code is fine, but it should be discarded and rewritten test-first.

Why does my test pass when I remove the mock?

This signals you may be testing mock behavior instead of real component behavior. Unmock the component or assert on real outputs, and mock only at the lowest level after understanding the dependency's side effects.