tdd

Guide developers through red-green-refactor cycles for feature work.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/RyanCallahan312/crayon --skill tdd-ryancallahan312
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/RyanCallahan312/crayon/tree/main/.agents/skills/tdd
Command: npx skills add https://github.com/RyanCallahan312/crayon --skill tdd-ryancallahan312

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development (TDD) helps teams ensure software behavior is validated via public interfaces, reducing regression when implementing features or fixing bugs.

Core Features & Use Cases

  • Red-Green-Refactor Cycle: Encourage failing tests first, implement just enough code, and refactor for clarity.
  • Integration-Style Testing: Emphasize end-to-end style tests that exercise real code paths through public APIs.
  • Vertical Slices & Planner Workflow: Plan, execute, and reflect on small, complete user-facing features with incremental learning.

Quick Start

Run a first red-green-refactor cycle on a new feature by writing a failing test, implementing minimal code to pass, and then refactoring for maintainability.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I implement test-driven development for a new feature?

Test-driven development for a new feature follows a red-green-refactor cycle: write a failing test first, implement just enough code to pass, then refactor for clarity. This validates behavior through public interfaces from the start.

What is a tracer bullet in software planning and testing?

A tracer bullet is an end-to-end integration test that validates a thin vertical slice of a feature early in development. It exercises real code paths through public APIs to verify architectural assumptions before implementing full logic.

How does integration-style testing differ from unit testing in TDD?

Integration-style testing in TDD emphasizes end-to-end tests that exercise real code paths through public APIs, rather than isolating individual units. This approach validates complete user-facing features and reduces regression when implementing changes.

When should I use vertical slice testing during feature development?

Vertical slice testing is used when planning and executing small, complete user-facing features. It enables incremental learning by building, testing, and reflecting on one functional slice at a time rather than building horizontal layers separately.

Can I apply TDD to fix bugs in existing software projects?

Yes, TDD is applicable to bug fixes across software projects. You write a failing integration test that reproduces the bug, implement the minimal code fix to make it pass, and then refactor to maintain quality and prevent future regressions.

What's the best way to refactor code after passing a failing test?

Refactoring after a passing test involves improving code clarity and maintainability while keeping the test green. The focus is on quality assurance through the red-green-refactor cycle, ensuring the public interface behavior remains unchanged.