bobmatnyc avatar

Test Driven Development

This consolidates TDD patterns into a single reusable skill so you don't need to repeat testing guidance across multiple agents. It covers the red-green-refactor cycle, test structure patterns like AAA and Given-When-Then, and language-specific examples for Python, JavaScript, and Go. The naming conventions and mock patterns are solid reference material. Most useful when you're setting up a new project or want consistent testing practices across a codebase. The anti-patterns section is honest about common mistakes like testing implementation details or running slow tests in your unit suite. Saves you from writing the same 500 lines of testing docs every time you spin up a new agent.

skills.sh installs
400
GitHub stars
79
last updated
Aug 21, 2026

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill test-driven-development --agent claude-code

Installs into .claude/skills of the current project.

Files

Test-Driven Development (TDD)

Comprehensive TDD patterns and practices for all programming languages. This skill eliminates ~500-800 lines of redundant testing guidance per agent.

When to Use

Apply TDD for:

  • New feature implementation
  • Bug fixes (test the bug first)
  • Code refactoring (tests ensure behavior preservation)
  • API development (test contracts)
  • Complex business logic

TDD Workflow (Red-Green-Refactor)

1. Red Phase: Write Failing Test

Write a test that:
- Describes the desired behavior
- Fails for the right reason (not due to syntax errors)
- Is focused on a single behavior

2. Green Phase: Make It Pass

Write the minimum code to:
- Pass the test
- Not introduce regressions
- Follow existing patterns

3. Refactor Phase: Improve Code

While keeping tests green:
- Remove duplication
- Improve naming
- Simplify logic
- Extract functions/classes

Test Structure Patterns

Arrange-Act-Assert (AAA)

// Arrange: Set up test data and conditions
const user = createTestUser({ role: 'admin' });

// Act: Perform the action being tested
const result = await authenticateUser(user);

Sponsors

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Categories
Testing & QA, AI & Agent Building
First seen
Jun 3, 2026

More from bobmatnyc/claude-mpm-skills

All 158
1secondsky avatarjest-generatorsecondsky/claude-skillsGenerate Jest unit tests for JavaScript/TypeScript with mocking, coverage. Use for JS/TS modules, React components, test generation, or encountering missing cov391skills.sh installs
2umbraco avatarumbraco-playwright-testhelpersumbraco/umbraco-cms-backoffice-skillsReference for @umbraco/playwright-testhelpers package - fixtures, API helpers, and UI helpers for E2E testing384skills.sh installs
3levnikolaevich avatarln-743-test-infrastructurelevnikolaevich/claude-code-skillsSets up test infrastructure with Vitest, xUnit, and pytest. Use when adding testing frameworks and sample tests to a project.378skills.sh installs
4pedronauck avatarvitestpedronauck/skillsVitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filteri376skills.sh installs
5levnikolaevich avatarln-523-auto-test-plannerlevnikolaevich/claude-code-skillsPlans automated tests (E2E/Integration/Unit) using Risk-Based Testing after manual testing. Use when Story needs a test task with prioritized scenarios.362skills.sh installs
6levnikolaevich avatarln-520-test-plannerlevnikolaevich/claude-code-skillsOrchestrates test planning pipeline: research, manual testing, automated test planning. Use when Story needs comprehensive test coverage planning.360skills.sh installs