Comprehensive TDD patterns and practices for all programming languages. This skill eliminates ~500-800 lines of redundant testing guidance per agent.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versiontest-driven-developmentExecute the skills CLI command in your project's root directory to begin installation:
Fetches test-driven-development from bobmatnyc/claude-mpm-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate test-driven-development. Access via /test-driven-development in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
29
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
29
stars
Comprehensive TDD patterns and practices for all programming languages. This skill eliminates ~500-800 lines of redundant testing guidance per agent.
Apply TDD for:
Write a test that:
- Describes the desired behavior
- Fails for the right reason (not due to syntax errors)
- Is focused on a single behavior
Write the minimum code to:
- Pass the test
- Not introduce regressions
- Follow existing patterns
While keeping tests green:
- Remove duplication
- Improve naming
- Simplify logic
- Extract functions/classes
// Arrange: Set up test data and conditions
const user = createTestUser({ role: 'admin' });
// Act: Perform the action being tested
const result = await authenticateUser(user);
// Assert: Verify the outcome
expect(result.isAuthenticated).toBe(true);
expect(result.permissions).toContain('admin');
Given: A user with admin privileges
When: They attempt to access protected resource
Then: Access is granted with appropriate permissions
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()Python (pytest):
def test_should_calculate_total_when_items_added():
# Arrange
cart = ShoppingCart()
cart.add_item(Item("Book", 10.00))
cart.add_item(Item("Pen", 1.50))
# Act
total = cart.calculate_total()
# Assert
assert total == 11.50
JavaScript (Jest):
describe('ShoppingCart', () => {
test('should calculate total when items added', () => {
const cart = new ShoppingCart();
cart.addItem({ name: 'Book', price: 10.00 });
cart.addItem({ name: 'Pen', price: 1.50 });
const total = cart.calculateTotal();
expect(total).toBe(11.50);
});
});
Go:
func TestShouldCalculateTotalWhenItemsAdded(t *testing.T) {
// Arrange
cart := NewShoppingCart()
cart.AddItem(Item{Name: "Book", Price: 10.00})
cart.AddItem(Item{Name: "Pen", Price: 1.50})
// Act
total := cart.CalculateTotal()
// Assert
if total != 11.50 {
t.Errorf("Expected 11.50, got %f", total)
}
}
Stub: Returns predefined data
def get_user_stub(user_id):
return User(id=user_id, name="Test User")
Mock: Verifies interactions
mock_service = Mock()
service.process_payment(payment_data)
mock_service.process_payment.assert_called_once_with(payment_data)
Fake: Working implementation (simplified)
class FakeDatabase:
def __init__(self):
self.data = {}
def save(self, key, value):
self.data[key] = value
def get(self, key):
return self.data.get(key)
# Good: Focused test
def test_should_validate_email_format():
assert is_valid_email("[email protected]") is True
# Avoid: Multiple unrelated assertions
def test_validation():
assert is_valid_email("[email protected]") is True
assert is_valid_phone("123-456-7890") is True # Different concept
# Good: Each test is self-contained
def test_user_creation():
user = create_user("[email protected]")
assert user.email == "[email protected]"
# Avoid: Tests depending on execution order
shared_user = None
def test_create_user():
global shared_user
shared_user = create_user("[email protected]")
def test_update_user(): # Depends on previous test
shared_user.name = "Updated"
# Good: Clear failure message
assert result.status == 200, f"Expected 200, got {result.status}: {result.body}"
# Avoid: Unclear failure
assert result.status == 200
# Good: Reusable test data creation
def create_test_user(**overrides):
defaults = {
'email': '[email protected]',
'name': 'Test User',
'role': 'user'
}
return User(**{**defaults, **overrides}Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
cexll/myclaude
github/awesome-copilot
greedychipmunk/agent-skills
rshankras/claude-code-apple-skills
oimiragieo/agent-studio
mrgoonie/claudekit-skills
test-driven-development has been reliable in day-to-day use. Documentation quality is above average for community skills.
Keeps context tight: test-driven-development is the kind of skill you can hand to a new teammate without a long onboarding doc.
We added test-driven-development from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
I recommend test-driven-development for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
test-driven-development fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
test-driven-development reduced setup friction for our internal harness; good balance of opinion and flexibility.
test-driven-development is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
I recommend test-driven-development for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Registry listing for test-driven-development matched our evaluation — installs cleanly and behaves as described in the markdown.
Keeps context tight: test-driven-development is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 68