test-driven-development

Enforce test-first development with failing tests, minimal code, and regression checks.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/DaddyElonMusk69/motis-agent --skill test-driven-development-daddyelonmusk69
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/DaddyElonMusk69/motis-agent/tree/main/skills/software-development/test-driven-development
Command: npx skills add https://github.com/DaddyElonMusk69/motis-agent --skill test-driven-development-daddyelonmusk69

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents regressions and uncertain behavior by enforcing a test-first workflow that guarantees new code and bug fixes are validated by automated tests before becoming production code. It eliminates the guesswork of tests that pass immediately and reduces technical debt from unverified implementations.

Core Features & Use Cases

  • Red-Green-Refactor enforcement: Guide developers to write a single failing test, implement the minimal code to pass, then refactor while keeping tests green.
  • Verification steps: Emphasizes running targeted tests to confirm failure, running them again to confirm success, and running the full suite to catch regressions.
  • Use cases: New feature development, bug fixes, refactors, delegated implementation tasks, and onboarding workflows where reproducible behavior and regressions must be prevented.

Quick Start

Implement the new feature using strict TDD by writing a failing test first, running it to confirm the expected failure, implementing the minimal code to pass, and then refactoring with the test suite green.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is test-driven development and how does the red-green-refactor cycle work?

Test-driven development is a test-first workflow where you write a failing automated test, implement minimal code to pass it, then refactor while keeping tests green. This enforces red-green-refactor cycles to prevent regressions and eliminate unverified implementations.

How do I fix a bug using test-driven development?

To fix a bug with test-driven development, write a failing automated test reproducing the exact bug, execute it to confirm the expected failure, implement the minimal code to pass, and rerun the full test suite to detect regressions.

How do I start implementing new features with a test-first workflow?

Start implementing new features with a test-first workflow by writing a single failing automated test, running it to confirm failure, writing the minimal code required to pass, and rerunning the full suite to catch any regressions.

Does test-driven development work for refactoring existing code?

Yes, test-driven development works for refactoring by keeping automated tests green. You run the full test suite after minimal code changes to ensure behavior remains reproducible and no regressions are introduced during the refactor.

Why should I run the full test suite after passing a targeted unit test?

Running the full test suite after passing a targeted unit test is required to detect regressions. Test-driven development enforces this verification step to ensure new code or bug fixes do not break existing reproducible behavior.

When should I not use a strict test-first cycle for code changes?

You should not use a strict test-first cycle when automated tests cannot reproduce the behavior or environment needed. It requires writing reproducible automated tests, making it unsuitable for tasks where automated verification is impossible.