tdd:test-driven-development

Enforce a red-green-refactor cycle with failing tests before production code.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/luicabref97/sushi-jungle-web --skill tdd-test-driven-development-luicabref97
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd:test-driven-development
Source: https://github.com/luicabref97/sushi-jungle-web/tree/main/.agents/skills/tdd-test-driven-development
Command: npx skills add https://github.com/luicabref97/sushi-jungle-web --skill tdd-test-driven-development-luicabref97

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents untested or incorrectly tested production code by enforcing a test-first workflow that ensures behavior is specified, observed as failing, and then implemented to pass, reducing regressions and technical debt.

Core Features & Use Cases

  • Red-Green-Refactor cycle: Write a minimal failing test, implement the smallest change to pass it, then refactor while keeping tests green.
  • Verification gates: Mandates watching failures, confirming failure reasons, and re-running the full suite to avoid accidental passes.
  • Use cases: New feature development, bug fixes, refactoring, and behavior changes where automated tests validate correctness.
  • Anti-patterns guidance: Identifies and prevents common mistakes like testing mocks, adding test-only production methods, and over-mocking.

Quick Start

Write a focused failing test that expresses the desired behavior, run the tests to confirm the failure, implement the minimal code to pass, and then refactor while keeping all tests green.

Frequently Asked Questions about tdd: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 (TDD) is a test-first workflow using the red-green-refactor cycle: write a minimal failing test, implement the smallest code change to pass it, then refactor while keeping tests green. This ensures intended behavior is specified and verified.

How do I write unit tests before production code to prevent regressions?

To write unit tests before production code, create a focused failing test expressing desired behavior, run it to confirm the failure, implement minimal code to pass, then re-run the full test suite. This prevents untested code and reduces technical debt.

Can I use test-driven development for bug fixes and refactoring existing code?

Yes, test-driven development applies to bug fixes, refactoring, and behavior changes where automated tests validate correctness. You write failing tests reproducing the bug or specifying new behavior, then implement minimal production code to pass them.

What are common TDD anti-patterns and testing mistakes to avoid?

Common TDD anti-patterns include testing mocks instead of behavior, adding test-only production methods, and over-mocking. The test-first workflow mandates watching failures, confirming failure reasons, and re-running the full suite to avoid accidental passes.

Do I need an automated test suite to apply test-driven development?

Yes, test-driven development requires an environment where automated tests can be executed. You need a test suite to confirm initial failures, verify minimal code passes, and re-run the full suite during refactoring to ensure all tests remain green.