From tdd-plugin
TDD (Test-Driven Development) rules. Defines t-wada style Red-Green-Refactor cycle, triangulation, baby steps, and other practices. Reference when practicing TDD.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tdd-plugin:tddThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A skill that defines t-wada style test-driven development practices.
A skill that defines t-wada style test-driven development practices.
Write a failing test first.
test "can add two numbers"
calculator = new Calculator
assert calculator.add(2, 3) == 5
// → test fails
Compiled languages: Create an empty function/class skeleton first so the code compiles. The test should fail at the assertion level, not at compilation.
Write the minimal code to make the test pass.
class Calculator
function add(a, b)
return 5 // fake implementation
Eliminate duplication and improve the code.
class Calculator
function add(a, b)
return a + b // generalized via triangulation
// First test
test "2 + 3 = 5"
assert calculator.add(2, 3) == 5
// Fake implementation: return 5
// Second test (triangulation)
test "3 + 4 = 7"
assert calculator.add(3, 4) == 7
// → Generalization is required, leading to return a + b
// ❌ Too coarse
test "user management feature" // tests everything
// ✅ Appropriate
test "can create a user"
test "can update a user"
// ❌ Vague
test "user test"
// ✅ Clear
test "can create a user with a valid name"
test "throws an error when creating a user with an empty name"
npx claudepluginhub xorphitus/claude-code-marketplace --plugin tdd-pluginGuides the RED-GREEN-REFACTOR cycle for test-driven development, including AAA pattern, test prioritization, and anti-patterns. Useful when writing tests before code or implementing new features.