Test-Driven Development drives an agent through the red, green and refactor loop for new logic, behavior changes and bug fixes. The agent first discovers how this repository runs tests, then writes a failing test, makes it pass with minimal code and cleans up with tests still green.
The skill adds the Prove-It pattern for bugs, the test pyramid and test sizes, advice on DAMP tests, state-based assertions and real implementations over mocks, an anti-pattern table and a browser testing section that uses Chrome DevTools MCP.
What You Get
- The red, green and refactor cycle with TypeScript examples
- A Prove-It bug fix flow
- Guidance on test levels, test sizes and test doubles
- A browser testing section, an anti-pattern table and a verification checklist
Common Use Cases
- Implementing new logic
- Fixing a reported bug
- Changing existing behavior safely
- Improving the quality of an existing test suite
What Makes It Unique
The skill starts by finding the repository’s actual test commands and refuses to assume npm test. It also suggests a subagent to write the reproduction test without knowledge of the fix, and it says to exercise real crash and rollback boundaries in place of injected exceptions.
Under The Hood
The skill is a single SKILL.md of instructions with TypeScript examples. It runs no scripts of its own. The agent reads build and CI files, runs the repository’s focused-test and full-suite commands, and may use Chrome DevTools MCP for browser checks and a subagent for the reproduction test. It points to a testing patterns reference.