Guides the Test-Driven Development methodology: the Red-Green-Refactor cycle of writing failing tests before implementation code, then making them pass with minimal code, then refactoring. Use when the user asks to do TDD, practice test-driven development, follow red-green-refactor, write tests first, apply test-first methodology, or implement a feature using TDD workflow with pytest, Vitest, ERT, or Zod. NOT for choosing or setting up test frameworks (use testing-framework), NOT for finding and fixing bugs or analyzing stack traces (use debugging), NOT for reviewing existing code or PRs (use code-review).
How this skill is triggered — by the user, by Claude, or both
Slash command
/test-driven-development:test-driven-developmentThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A unified, comprehensive skill for implementing Test-Driven Development across multiple languages, frameworks, and testing levels.
references/coverage-validation.mdreferences/elisp-tdd.mdreferences/extended-patterns.mdreferences/general-tdd.mdreferences/playwright-best-practices.mdreferences/playwright-e2e-patterns.mdreferences/python-tdd.mdreferences/refactoring-with-tests.mdreferences/test-design-patterns.mdreferences/test-structure-guide.mdreferences/vitest-patterns.mdreferences/zod-testing-patterns.mdscripts/coverage_analyzer.pyscripts/coverage_check.pyscripts/run_tests.pyscripts/skill_validator.pyscripts/test_template_generator.pyscripts/with_server.pytemplates/elisp_test_template.eltemplates/python_test_template.py.templateA unified, comprehensive skill for implementing Test-Driven Development across multiple languages, frameworks, and testing levels.
RED -> Write a failing test first (define expected behavior)
GREEN -> Write minimal code to pass (just enough, don't over-engineer)
REFACTOR -> Improve code quality (clean up while tests pass)
REPEAT
def test_descriptive_name():
"""Clear description of what is being tested."""
# Arrange - Set up test data and conditions
input_data = prepare_test_data()
expected_result = "expected_value"
# Act - Execute the code under test
actual_result = function_under_test(input_data)
# Assert - Verify the results
assert actual_result == expected_result
Fast, isolated tests for individual functions/methods.
Tests for component interactions and external services.
Full system tests through the user interface.
# Good
def test_calculate_discount_returns_zero_for_empty_cart():
...
# Bad
def test_discount():
...
# Good - specific assertion with message
assert result.status == "success", f"Expected success but got {result.status}"
# Bad - generic assertion
assert result
See Extended Patterns for detailed language-specific guidance (Python/pytest, TypeScript/Vitest, Playwright E2E, Emacs Lisp/ERT), the 6-phase TDD workflow, quick reference commands, and troubleshooting.
references/extended-patterns.md - Detailed code examples and language guidancereferences/general-tdd.md - TDD principles and methodologyreferences/python-tdd.md - Python-specific TDD practicesreferences/elisp-tdd.md - Emacs Lisp TDD with ERTreferences/vitest-patterns.md - Vitest testing patternsreferences/playwright-e2e-patterns.md - Playwright best practicesreferences/playwright-best-practices.md - E2E testing guidelinesreferences/zod-testing-patterns.md - Schema validation testingreferences/test-design-patterns.md - Common test patternsreferences/test-structure-guide.md - Test organizationreferences/refactoring-with-tests.md - Safe refactoring practicesreferences/coverage-validation.md - Coverage analysis guidescripts/run_tests.py - Test runner utilityscripts/coverage_analyzer.py - Coverage analysis toolscripts/coverage_check.py - Coverage threshold checkerscripts/test_template_generator.py - Generate test boilerplatescripts/skill_validator.py - Validate test implementationstemplates/python_test_template.py.template - pytest test templatetemplates/elisp_test_template.el - ERT test templatetemplates/test_checklist.md - Coverage checklist templatetemplates/tdd_session_log.md - TDD session logging templateThis skill consolidates best practices from test-driven-development-tdd-skill, testing-guide-skill, test-agent-technical-skill, and development-workflow-specialist.
npx claudepluginhub viktorbezdek/skillstack --plugin test-driven-developmentGuides Test-Driven Development with Red-Green-Refactor cycle for writing code, implementing features, or fixing bugs in TDD projects.
Guides implementing Test-Driven Development (TDD) with RED-GREEN-REFACTOR cycle, property-based testing, and mutation testing across any language. Includes when to apply and anti-patterns.
<!-- AUTO-GENERATED by export-plugins.py — DO NOT EDIT -->