From tdd
Enforces TDD cycle (Red: failing test, Green: minimal code, Refactor) for new functions, features, bug fixes, refactoring. Includes Elixir backend and TypeScript frontend test patterns.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tdd:test-driven-developmentThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Red → Green → Refactor cycle for all code changes.
Red → Green → Refactor cycle for all code changes.
✅ Always use TDD for:
❌ Skip TDD for:
# Start with test
test "calculates total with tax" do
result = Calculator.calculate_total([100, 200])
assert Money.equal?(result, Money.new(:USD, 324))
end
# Run test - should FAIL
mix test
# Just enough to pass
def calculate_total(prices) do
prices |> Enum.sum() |> Kernel.*(1.08) |> Money.new(:USD)
end
Extract constants, improve naming, etc.
test/path/module_test.exsapps/api/test/your_app/task/task_test.exsComponentName.test.tsxmobile/libraries/atorasu/atoms/Button/Button.test.tsx# Backend
mix test path/to/test.exs
# Frontend
yarn test path/to/test.tsx
npx claudepluginhub thebushidocollective/han --plugin tddEnforces strict TDD for features and bugfixes: RED (write minimal failing test), GREEN (minimal passing code), REFACTOR. No production code without failing test first.
Guides implementation of features and bug fixes using the red-green-refactor TDD cycle: write failing test first, minimal code to pass, then refactor.
Enforces strict TDD: write failing test first for features, bugfixes, refactors; verify red, implement green minimally, refactor. Prevents production code before tests.