Test Driven Development
Language-agnostic TDD guide covering red-green-refactor, test structure, mocking, and coverage targets for any stack.
- CCM score
- 47 of 100
- skills.sh installs
- 421
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the red-green-refactor workflow, AAA and Given-When-Then structures, and test naming conventions
- Includes examples in Python (pytest), JavaScript (Jest), and Go, plus unit, integration, and end-to-end test scopes
- Explains when to use stubs, mocks, and fakes, with coverage targets of 80% overall and 100% on critical paths
- Designed for agents writing tests or implementing features and bug fixes test-first
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill test-driven-development -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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);
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Categories
- Testing & QA, Agent Workflow & Planning
- First seen
- Jun 3, 2026
Questions
What is the test-driven-development skill for?
It gives the agent TDD patterns and practices that apply to all programming languages. It covers the red-green-refactor workflow, test structure such as Arrange-Act-Assert, naming conventions, unit, integration and end-to-end test types, and mocking.
How do I install the test-driven-development skill?
Run npx -y skills add bobmatnyc/claude-mpm-skills --skill test-driven-development -y in your project. Once installed, the agent can follow these TDD practices when writing or changing tests.
Which skills lead the Testing & QA category, and where does this one stand?
This skill is in the Testing & QA category alongside tdd, migrate-to-shoehorn, webapp-testing and break-ui. Its focus is on general TDD practice across languages rather than tooling for one framework.
Who is test-driven-development for?
It suits developers who want an agent to write tests before code, for new features, bug fixes, refactoring or API work. Its guidance includes what to test and what to skip, plus anti-patterns such as fragile tests and slow unit tests.
More from bobmatnyc/claude-mpm-skills
All 154- Verification Before Completion418
- Better Auth Authentication416
- Kubernetes415
- Kysely415
- Json Data Handling412
- Systematic Debugging410
- Api Documentation409
- Screenshot408
- Vue408
- Software Patterns401
- Root Cause Tracing400
- Nextjs V16399
- Testing Anti Patterns398
- Vercel Deployments Builds396
- Security Scanning395
- Test Quality Inspector395
- Stacked Prs391
- Svelte5 Runes Static390
- Better Auth Core386
- Homebrew Formula Maintenance383
- Better Auth Integrations381
- Reporting Pipelines381
- Better Auth Plugins380
- Git Worktrees379
Similar to Test Driven Development
More Testing & QAtddpproenca/dot-skills428 installsStructured guide of 42 test-driven development rules for red-green-refactor workflow and test design.
tdd-guidealirezarezvani/claude-skills1.1K installsTest-first development skill that generates tests, mocks, and coverage analysis across Jest, Pytest, JUnit, Vitest, and Mocha.
unit-testing-frameworkaj-geddes/useful-ai-prompts637 installsStructured guidance for writing unit tests with Jest, pytest, JUnit, or RSpec, following the AAA pattern.
Testing Anti-Patternsbobmatnyc/claude-mpm-skills398 installsAuthoritative guide for avoiding testing anti-patterns, covering mock misuse, test-only production code, and incomplete mocks.
tdd-workflowaffaan-m/ecc15.4K installsStrict TDD cycle enforcing RED-GREEN-refactor with 80%+ coverage across unit, integration, and E2E tests.
python-testing-patternswshobson/agents42.2K installsComprehensive pytest guide covering fixtures, mocking, parameterization, and test-driven development workflows for Python.