About tdd-workflow
tdd-workflow is a skill for applying the TDD London School, starting with mocked tests and progressing through implementation and refactoring. It guides behavior-focused, incremental test development.
Key features
- 01Write mocked failing tests first
- 02Verify the expected failure
- 03Implement the minimal solution
- 04Refactor while tests pass
- 05Use descriptive behavior-based names
Use cases
- 01Adding a feature with tests first
- 02Testing behavior at dependency boundaries
- 03Developing incrementally while keeping tests green
MCP support
Uses Ruflo MCP pre-task and post-task hooks to mark the start and completion of a TDD task.
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ ruvnet/ ruflo --skill tdd-workflowAfter installing, type/tdd-workflowin Claude Code to confirm it loaded.
Details
From the project READMEFollow the TDD London School (mock-first) approach:
- Write the failing test first -- define expected behavior with mocked dependencies
- Run the test -- confirm it fails for the right reason
- Implement minimal code -- make the test pass with the simplest solution
- Refactor -- clean up while keeping tests green
- Repeat -- add the next behavior
Before starting: mcp__plugin_ruflo-core_ruflo__hooks_pre-task({ description: "TDD: FEATURE_NAME" })
After completing: mcp__plugin_ruflo-core_ruflo__hooks_post-task({ taskId: "tdd-FEATURE", success: true, storeResults: true })
Principles:
- Mock external dependencies at boundaries
- Test behavior, not implementation
- One assertion per test when possible
- Descriptive names:
should [behavior] when [condition]
Comments
Markdown supported