test-driven-development

Enforce a RED-GREEN-REFACTOR cycle with tests written before production code.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/V1vek98/claude-code-template --skill test-driven-development-v1vek98
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/V1vek98/claude-code-template/tree/main/.claude/skills/tdd
Command: npx skills add https://github.com/V1vek98/claude-code-template --skill test-driven-development-v1vek98

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development provides a safety net against regressions by requiring tests before implementing new features, ensuring intent and behavior are verifiable from the start.

Core Features & Use Cases

  • Enforces the RED-GREEN-REFACTOR cycle to drive design and verification.
  • Establishes rules for test naming, isolation, and mocking external dependencies to reduce flakiness.
  • Guides disciplined commits with focused messages that describe the behavior added or fixed.

Quick Start

Write a failing test first, then implement just enough code to pass.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I enforce strict test-driven development cycles for safe feature implementation?

Strict test-driven development cycles are enforced by following a disciplined RED-GREEN-REFACTOR workflow, requiring tests to be written before production code to drive design and ensure verifiable behavior from the start.

How do I apply the red-green-refactor cycle to fix bugs without introducing regressions?

Applying the red-green-refactor cycle to bug fixes involves writing a failing test that reproduces the bug first, then implementing just enough production code to pass it, and finally refactoring while maintaining test alignment.

What are the best practices for test naming and isolation in software testing?

Best practices for test naming and isolation involve establishing concrete rules for descriptive test names, isolating tests from external dependencies through mocking, and maintaining structural alignment between test files and source code to reduce flakiness.

How do I write focused commits that describe behavior added during feature development?

Writing focused commits during feature development requires disciplined commit messages that describe the specific behavior added or fixed, ensuring each commit aligns with a discrete step in the RED-GREEN-REFACTOR cycle.

Does test-driven development require mocking external dependencies to reduce test flakiness?

Yes, test-driven development requires mocking external dependencies to isolate tests, enforce strict RED-GREEN-REFACTOR cycles, and significantly reduce flakiness by maintaining focused alignment between tests and source structure.