bobmatnyc/claude-mpm/universal-testing-test-driven-development
Claude Code and agent skill by bobmatnyc/claude-mpm
- community
Checking that the SKILL.md file is still in the repository.
Comprehensive TDD patterns and practices for all programming languages, eliminating redundant testing guidance per agent.
Install
npx vskill@latest install bobmatnyc/claude-mpm/universal-testing-test-driven-developmentSKILL.md
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
2. Green Phase: Make It Pass
3. Refactor Phase: Improve Code
Test Structure Patterns
Arrange-Act-Assert (AAA)
Given-When-Then (BDD Style)
Test Naming Conventions
Pattern: test_should_<expected_behavior>_when_<condition>
Examples:
test_should_return_user_when_id_exists()test_should_raise_error_when_user_not_found()test_should_validate_email_format_when_creating_account()
Language-Specific Conventions
Python (pytest):
JavaScript (Jest):
Go:
Test Types and Scope
Unit Tests
- Scope: Single function/method
- Dependencies: Mocked
- Speed: Fast (< 10ms per test)
- Coverage: 80%+ of code paths
Integration Tests
- Scope: Multiple components
- Dependencies: Real or test doubles
- Speed: Moderate (< 1s per test)
- Coverage: Critical paths and interfaces
End-to-End Tests
- Scope: Full user workflows
- Dependencies: Real (in test environment)
- Speed: Slow (seconds to minutes)
- Coverage: Core user journeys
Mocking and Test Doubles
When to Mock
- External APIs and services
- Database operations (for unit tests)
- File system operations
- Time-dependent operations
- Random number generation
Mock Types
Stub: Returns predefined data
Mock: Verifies interactions
Fake: Working implementation (simplified)
Test Coverage Guidelines
Target Coverage Levels
- Critical paths: 100%
- Business logic: 95%+
- Overall project: 80%+
- UI components: 70%+
What to Test
- ✅ Business logic and algorithms
- ✅ Edge cases and boundary conditions
- ✅ Error handling and validation
- ✅ State transitions
- ✅ Public APIs and interfaces
What NOT to Test
- ❌ Framework internals
- ❌ Third-party libraries
- ❌ Trivial getters/setters
- ❌ Generated code
- ❌ Configuration files
Testing Best Practices
1. One Assertion Per Test (When Possible)
2. Test Independence
3. Descriptive Test Failures
4. Test Data Builders
Testing Anti-Patterns to Avoid
❌ Testing Implementation Details
❌ Fragile Tests
❌ Slow Tests in Unit Test Suite
❌ Testing Everything Through UI
Quick Reference by Language
Python (pytest)
JavaScript (Jest)
Go
TDD Benefits Realized
- Design Improvement: Tests drive better API design
- Documentation: Tests serve as executable documentation
- Confidence: Refactoring becomes safe
- Debugging: Tests isolate issues quickly
- Coverage: Ensures comprehensive test coverage
- Regression Prevention: Catches bugs before deployment
Related Skills
When using Test Driven Development, these skills enhance your workflow:
- systematic-debugging: Debug-first methodology when tests fail unexpectedly
- react: Testing React components, hooks, and context
- django: Testing Django models, views, and forms
- fastapi-local-dev: Testing FastAPI endpoints and dependency injection
[Full documentation available in these skills if deployed in your bundle]
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugin/skills/universal-testing-test-driven-development/SKILL.md
Popularity
- Repository stars
- 151
- Repository forks
- 34
- Repository npm downloads, 7 days
- 58
- 7-day trend score
- 42
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 16 Sep 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bobmatnyc/claude-mpm/universal-testing-test-driven-development)