tdd

Guide Test-Driven Development workflows with planning, refactoring, and mocking guidelines.

Updated Jun 20, 2026
One-click install
npx skills add https://github.com/samuel-morrissey/skills --skill tdd-samuel-morrissey
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/samuel-morrissey/skills/tree/main/skills/tdd
Command: npx skills add https://github.com/samuel-morrissey/skills --skill tdd-samuel-morrissey

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to Test-Driven Development (TDD), helping users understand and apply its principles and practices effectively.

Core Features & Use Cases

  • Philosophy of TDD: Learn the core principles and how to write good tests.
  • Anti-Patterns: Identify and avoid common pitfalls in TDD.
  • Workflow: Step-by-step guide to the TDD process, including planning, tracer bullets, and refactoring.
  • Checklist: A checklist to ensure tests are of high quality and focused on behavior.
  • Mocking Guidelines: Best practices for mocking system boundaries.
  • Refactoring Candidates: Suggestions for refactoring after a TDD cycle.
  • Good and Bad Tests: Examples of effective and ineffective tests.

Quick Start

To start using the tdd skill, review the SKILL.md file to understand the TDD philosophy and workflow, then apply the principles to your next development project.

Frequently Asked Questions about tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is test-driven development and how does it improve code quality?

The TDD workflow involves planning, writing a failing test, implementing tracer bullets to pass the test, and refactoring. You apply this cycle iteratively to ensure code meets behavioral requirements and maintains high quality throughout development.

How do I identify and avoid common TDD anti-patterns?

Common TDD anti-patterns include writing tests that are too broad or testing implementation details rather than behavior. You can identify and avoid these pitfalls by using a focused checklist to ensure tests validate behavior and by reviewing examples of good and bad tests.

What are the best practices for mocking system boundaries in test-driven development?

Best practices for mocking system boundaries in test-driven development involve isolating external dependencies to test behavior reliably. You should mock at system boundaries rather than internal components to maintain test integrity and avoid coupling tests to implementation details.

Do I need to understand basic programming principles before applying test-driven development?

Yes, test-driven development requires an understanding of basic programming concepts and software testing principles. This foundational knowledge is necessary to grasp the TDD philosophy, implement the workflow effectively, and recognize when refactoring candidates appear.

When should I refactor code during the test-driven development cycle?

You should refactor code after a TDD cycle passes its tests, focusing on identified refactoring candidates. Refactoring ensures the code remains clean and maintainable while the existing tests verify that behavior stays unchanged during the process.