test-driven-development

Enforce test-driven development by writing failing tests before implementation.

Updated Jan 19, 2026
One-click install
npx skills add https://github.com/kgadek/kgadek-claude-plugin --skill test-driven-development-kgadek
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/kgadek/kgadek-claude-plugin/tree/main/ai-spec/2026-01-21-sdd-inspirations/references/obra-superpowers/skills/test-driven-development
Command: npx skills add https://github.com/kgadek/kgadek-claude-plugin --skill test-driven-development-kgadek

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Test-driven development (TDD) solves the problem of undetected bugs and unclear requirements by guiding implementation with tests written before production code, thereby increasing code quality and confidence.

Core Features & Use Cases

  • Red-Green-Refactor cycle: write a failing test, confirm it fails, implement the minimal code to pass, and refactor for readability.
  • Pre-production confidence: guarantees every feature or bugfix is covered by tests, reducing regressions in production.
  • Guided design and maintenance: clarifies API surfaces and behavior through explicit tests, making future changes safer.
  • Use Case: during feature development, bug fixes, or refactors, use TDD to drive design and verify behavior.

Quick Start

Write a failing test for the desired behavior, then implement the simplest code to make it pass.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How does test-driven development improve code quality?

Test-driven development improves code quality by guiding implementation with tests written before production code, increasing confidence and reducing undetected bugs. It clarifies requirements and ensures every feature or bugfix is covered by automated tests.

What is the red-green-refactor cycle in TDD?

The red-green-refactor cycle in TDD involves writing a failing test, confirming it fails, implementing minimal code to pass, and refactoring for readability. This disciplined workflow ensures fast feedback and documented design intent.

How do I start writing tests before implementation for a new feature?

To start writing tests before implementation, write a failing test for the desired behavior, then implement the simplest production code to make it pass. Apply this across feature work, bug fixes, and refactors to verify behavior.

Can I use TDD for bug fixes and refactoring existing behavior?

Yes, you can use TDD for bug fixes and refactoring existing behavior. It drives design and verifies behavior changes by writing failing tests first, ensuring minimal production code and safer future modifications.

When should I not use test-driven development?

Test-driven development may not suit exploratory prototyping where requirements are highly volatile. It requires a disciplined workflow of writing failing tests first and minimal production code, which can slow initial experimentation.

Does test-driven development work without external testing dependencies?

Test-driven development works without external dependencies by focusing on the core red-green-refactor workflow. It enforces writing failing tests first and minimal code, relying on automated tests for fast feedback rather than specific frameworks.