test-driven-development

Enforce test-first development with a red-green-refactor workflow.

1|Updated Mar 6, 2014
One-click install
npx skills add https://github.com/79yuuki/dotfiles --skill test-driven-development-79yuuki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/79yuuki/dotfiles/tree/main/claude/skills/test-driven-development
Command: npx skills add https://github.com/79yuuki/dotfiles --skill test-driven-development-79yuuki

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents unreliable implementations by enforcing a test-first workflow that verifies behavior before production code is written.

Core Features & Use Cases

  • Red-Green-Refactor Workflow: Guides feature development and bug fixes through failing tests, minimal implementations, and safe refactoring.
  • Testing Discipline: Enforces verification steps that confirm tests fail for the right reasons and pass after implementation.
  • Use Case: Apply this Skill when adding a new feature, fixing a defect, or changing behavior to ensure the resulting code is covered by meaningful tests and avoids common testing mistakes.

Quick Start

Use the test-driven-development skill to guide me through implementing this feature by writing tests first and following the TDD cycle.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is the red-green-refactor workflow in test-driven development?

The red-green-refactor workflow in test-driven development requires writing a failing test first, implementing the minimal code to make it pass, and then safely refactoring the implementation while maintaining test coverage.

How do I fix bugs using test-first development?

To fix bugs using test-first development, you write a failing test that reproduces the defect, implement the minimal code change to make the test pass, and refactor the software to ensure reliable automated verification.

When should I apply test-driven development during software development?

You should apply test-driven development when adding new features, fixing defects, or changing behavior to ensure the resulting code is covered by meaningful automated tests and avoids common testing anti-patterns.

What are common testing anti-patterns to avoid during refactoring?

Common testing anti-patterns avoided during refactoring include writing implementation code before tests, skipping test validation steps, and building implementations that exceed the minimal code needed to pass the failing test.

Does test-driven development work for automated test verification of behavior changes?

Yes, test-driven development enforces automated test verification for behavior changes by requiring tests to fail for the right reasons before implementation and confirming they pass after the minimal code is written.