test-driven-development

Enforce red-green-refactor cycles with tests guiding code implementation.

Updated Jan 3, 2026
One-click install
npx skills add https://github.com/jayhjenkins/Dev-Team-Full-SDLC --skill test-driven-development-jayhjenkins
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/jayhjenkins/Dev-Team-Full-SDLC/tree/main/vendor/superpowers/skills/test-driven-development
Command: npx skills add https://github.com/jayhjenkins/Dev-Team-Full-SDLC --skill test-driven-development-jayhjenkins

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill promotes a disciplined software development workflow by ensuring you write tests before implementing production code, preventing regressions and clarifying requirements.

Core Features & Use Cases

  • Red-Green-Refactor cycle: write a failing test, verify it fails, implement minimal code to pass, then refactor while keeping all tests green.
  • Clear guidance for feature and bug fixes: apply TDD to new features, bug fixes, and refactoring to preserve behavior and design.
  • Use Case: when adding a new function, you start by writing a failing unit test, implement just enough code to pass it, then iterate to improve design without breaking existing behavior.

Quick Start

  1. Write a failing test for the desired behavior.
  2. Implement the minimal code to make the test pass.
  3. Run the test suite and refactor as needed while keeping all tests 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 it improve code quality?

Test-driven development enforces a strict red-green-refactor cycle: you write a failing test first, implement minimal code to pass it, then refactor while keeping all tests green to preserve behavior.

How do I apply the red-green-refactor cycle when adding a new function?

To apply the red-green-refactor cycle, write a failing unit test for the desired behavior, implement just enough code to make the test pass, then iterate to improve design without breaking existing behavior.

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

Yes, you can use test-driven development for bug fixes and refactoring by writing tests that capture desired behavior, ensuring changes preserve existing design and prevent future regressions.

Do I need any specific testing frameworks to start writing tests first?

No specific testing frameworks are required to start writing tests first; this workflow applies to standard software projects and guides developers through the cycle using available unit test tools.

What is the best way to write unit tests before implementing production code?

The best way to write unit tests before production code is to follow a strict workflow: define behavior with a failing test, implement minimal passing code, then refactor safely while keeping tests green.