Install any skill in seconds. Free to start, no credit card required.
Get Started Free →notque/test-driven-development
RED-GREEN-REFACTOR cycle with strict phase gates for TDD.
Passed 5 of 21 test cases with the skill, and 16 of 21 without it.
1 fixed13 passed either way6 still failing2 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
My calculate_shipping function has passing unit tests in JavaScript. I want to refactor the internal calculation to use a lookup matrix instead of switch statements, and also add support for international shipping codes. Show the refactoring step.
| Checked | Without skill | With skill |
|---|---|---|
| Defers adding tests for international shipping codes to a new feature cycle | Missed | Passed |
| Executes existing tests after refactoring without adding new test cases during refactor | Missed | Passed |
The instructions your model reads when the skill loads.
Enforce the RED-GREEN-REFACTOR cycle for all code changes. Tests are written before implementation code, verified to fail for the right reasons, and maintained through disciplined development cycles.
| Signal | Load These Files | Why |
|---|---|---|
| errors, error handling | error-handling.md | Loads detailed guidance from error-handling.md. |
| full RED-GREEN-REFACTOR walkthroughs in Go, Python, JavaScript | examples.md | Loads detailed guidance from examples.md. |
| detailed phase steps, rationale, or language-specific test commands | phase-guidance.md | Loads detailed guidance from phase-guidance.md. |
Before starting any TDD cycle, read and follow repository CLAUDE.md files. Project instructions override default TDD behaviors because local conventions (test frameworks, directory layout, naming) vary across codebases.
Full phase guidance (steps, rationale, code examples, language commands) lives in references/phase-guidance.md. Load it when you need detailed instructions or examples. The sections below are the lean phase skeleton plus the mandatory gates.
Write a test that describes the desired behavior before any implementation exists. Use specific assertions, descriptive names, Arrange-Act-Assert pattern, and one concept per test. Run the test and show full output. Details: references/phase-guidance.md.
Proceed to the GREEN phase only after all of these are true:
The test must fail because the feature is not implemented, NOT because of syntax errors, import errors, wrong test setup, or unrelated failures. Expected patterns per language and recovery steps: references/phase-guidance.md.
Write ONLY enough code to make the failing test pass. No extra features. Hardcoded values are OK initially. Over-engineering and correct examples: references/phase-guidance.md.
test cases passed, vs 16 / 21 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.