/claude-kit:tdd-rulesfrom Claude Kit
Enforces Test-Driven Development (Red-Green-Refactor cycle) for any language. Automatically loaded by /coder to make TDD the default implementation cycle. Per-language test idioms via tdd-shapes.
Ships in Claude Kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
/coder loads this skill unconditionally at startup (alongside coder-rules, spec-check, and the LANGUAGE-resolved tdd-shapes/<LANGUAGE>.md). RGR is the default Phase 2 cycle for every implementation run — no plan-level marker required. Plans MAY still include a ## TDD heading for human-reader emphasis, but the heading is NOT a load predicate (deprecated as a contract; tolerated as prose).
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Wrote code before the test? Delete it. Implement fresh from a failing test run.
For EACH unit of behaviour:
{TEST_CMD}). MUST FAIL. If it passes, the test does not exercise new behaviour — revise.Return to RED for the next behaviour.
Concrete syntax for each step lives in tdd-shapes/<LANGUAGE>.md:
| LANGUAGE | File | Idiom |
|---|---|---|
| go | tdd-shapes/go.md | *testing.T, table-driven t.Run, testify |
| python | tdd-shapes/python.md | pytest, @pytest.mark.parametrize, fixtures |
| typescript | tdd-shapes/typescript.md | Jest/Vitest describe/it, it.each |
| rust | tdd-shapes/rust.md | #[test], assert_eq!, rstest |
| java | tdd-shapes/java.md | JUnit 5 @Test, assertEquals, @ParameterizedTest |
| any other / unset | tdd-shapes/_default.md | pseudocode (no language commitment) |
Selector lives in examples.md (reference_shapes block, mirrors planner-rules/examples.md).
Resolution order — highest precedence first:
PROJECT-KNOWLEDGE.md → LANGUAGE matches one of {go, python, typescript, rust, java} → load matching tdd-shapes/<LANGUAGE>.md.LANGUAGE slot is unset/empty (PROJECT-KNOWLEDGE.md missing OR slot empty) → fall back to CLAUDE.md Language Profile (kit-default = Go) → load tdd-shapes/go.md. Kit-dogfood C5 constraint preserved.LANGUAGE is set but does NOT match the 5-language enum (e.g., ruby, kotlin, kit's own "config-as-code") → load tdd-shapes/_default.md silently AND emit a consolidated NIT in coder handoff deviations_from_plan array (mirrors CG1 SKIP idiom)./coder startup step "Load TDD skill (unconditional)" duplicates this cascade — the two narratives MUST stay in sync (T3.6 single source of truth).
/coder implements each Part with interleaved tests by default — RED → GREEN → REFACTOR per behaviour. Tests are NOT a separate final Part; they are woven into each Part. Layer-dependency order from the plan is preserved either way.
Plans that still ship a Part N: Tests block (e.g. legacy plans authored before TDD-always-on, or plans following the documentation pattern in .claude/templates/plan-template.md L92-124) are tolerated — /coder will absorb the listed test cases into the per-Part RGR cycles rather than batching them into a final separate Part.
test1 / TestFooSee tdd-shapes/<LANGUAGE>.md + tdd-shapes/INVARIANTS.md for patterns; references/coder-integration.md for rationalisations + red flags.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tdd, red-green-refactor, test-driven-development, workflow, testing
9 skills in this plugin
/cavemanProject-local terse-output mode for /workflow pipeline. Cuts Messages token cost via concise prose. Loaded only at SessionStart by .claude/scripts/caveman-activate.sh — not auto-invoked on user prompts.
/code-review-rulesReview standards for code-reviewer agent. Loaded by explicit Read in the code-reviewer STARTUP step (disable-model-invocation blocks subagent preload). Covers: severity classification (BLOCKER/MAJOR/MINOR/NIT), decision matrix (APPROVED/APPROVED_WITH_COMMENTS/CHANGES_REQUESTED), auto-escalation rules, grep search patterns for automated checks./coder-rulesImplementation rules and patterns for /coder command. Load at /coder startup (step 0) or when /workflow enters Phase 3. Covers: 6 CRITICAL rules (plan-only, import matrix, clean domain, no log+return, tests pass, comment quality), the comment policy for source files, evaluate protocol (PROCEED/REVISE/RETURN), dependency-ordered implementation.npx claudepluginhub hex0xdeadbeef/claude-kit --plugin claude-kitOther plugins' skills for the same job