cyberneticlibrary

Guide test-driven development

tddcommandsetup L1227
borghei/Claude-Skills
What it does

Guide Red-Green-Refactor test-driven development workflow

Best for

Tasks requiring disciplined test-first development with explicit Red-Green-Refactor cycles and framework-agnostic guidance.

Inputs
  • · Current task description
  • · Existing codebase or framework detection
Outputs
  • · Failing test case (Red phase)
  • · Minimum passing implementation (Green phase)
  • · Refactored clean code (Refactor phase)
Requires
  • · jest / vitest / pytest / rspec (test framework)
  • · Bash for running tests
Preconditions
  • · Test framework detected (jest.config, pytest.ini, etc.)
  • · Clear behavioral requirement specified
Failure modes
  • · No test framework found → unclear which to scaffold
  • · Requirement too vague → test may be ambiguous
  • · Fake-it-till-you-make-it leads to bad design → deliberate, revisit after
Trust signals
  • · Provides framework-specific hints (jest vs pytest syntax)
  • · Enforces one assertion per test (prefer)
  • · Tests interface, not implementation