test-driven-development

Enforce red-green-refactor loops with tests through public interfaces.

9|Updated Dec 20, 2025
One-click install
npx skills add https://github.com/christopher-buss/flux --skill test-driven-development-christopher-buss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/christopher-buss/flux/tree/main/.agents/skills/test-driven-development
Command: npx skills add https://github.com/christopher-buss/flux --skill test-driven-development-christopher-buss

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Streamlines the process of delivering reliable software by enforcing a red-green-refactor loop and testing through public interfaces rather than internal implementation details.

Core Features & Use Cases

  • Public-interface driven: tests exercise real behavior via public APIs, not internal mocks.
  • Tracer Bullet workflow: one end-to-end test drives minimal implementation in a single cycle.
  • Incremental refactor discipline: safe refactors guided by tests that preserve observable behavior.
  • Planning and guardrails: integrates planning, feedback loops, and checklists to reduce risk during feature work.

Quick Start

Begin by writing one failing test that specifies a public behavior, then implement the minimal code to pass it.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I start test-driven development using the red-green-refactor loop?

To start test-driven development, write one failing test that specifies a public behavior, then implement the minimal code to pass it. Repeat this red-green-refactor loop incrementally to build reliable software features.

What is a tracer bullet workflow in agile software testing?

A tracer bullet workflow in agile software testing drives minimal implementation through a single end-to-end test cycle. It validates public interfaces early by connecting system endpoints before fleshing out internal logic.

How do I refactor code safely while preserving observable behavior?

To refactor code safely, use incremental refactor discipline guided by tests that preserve observable behavior. Public-interface driven tests validate real behavior, ensuring internal implementation changes do not break existing functionality.

Should I test public interfaces or internal implementation details in TDD?

In TDD, you should test public interfaces rather than internal implementation details. Testing through public APIs exercises real behavior without internal mocks, keeping tests stable and resilient during code evolution.

Does test-driven development require mocking for feature planning and guardrails?

Test-driven development does not require mocking for feature planning. It integrates planning, feedback loops, and checklists to reduce risk, relying on public-interface tests rather than internal mocks to enforce guardrails.

When should I not use the red-green-refactor TDD loop?

Avoid the red-green-refactor TDD loop when delivering throwaway prototypes or exploratory spikes where stable public interfaces are undefined. Without a target public behavior to specify, the strict test-first cycle adds unnecessary overhead.