test-driven-development

Implement behavior changes using Red-Green-Refactor with failing tests.

8|4|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/jscraik/Agent-Skills --skill test-driven-development-jscraik
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/jscraik/Agent-Skills/tree/main/utilities/test-driven-development
Command: npx skills add https://github.com/jscraik/Agent-Skills --skill test-driven-development-jscraik

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill ensures that new features and bug fixes are implemented with a focus on verifiable behavior, reducing regressions and increasing code quality through a structured test-first approach.

Core Features & Use Cases

  • Test-First Development: Write failing tests before writing any production code.
  • Behavior Verification: Ensure code meets specific, testable requirements.
  • Regression Prevention: Catch unintended side effects early.
  • Use Case: When adding a new user authentication flow, use this skill to define the expected success and failure scenarios with tests before writing the actual login logic.

Quick Start

Use the test-driven-development skill to implement the new user profile update feature, starting with a failing test.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I implement behavior changes using test-driven development?

Test-driven development implements behavior changes by driving code with failing tests and verifying outcomes with explicit evidence. The Red-Green-Refactor methodology ensures new features and bug fixes meet specific, testable requirements through a structured test-first approach.

What is the Red-Green-Refactor methodology for preventing code regressions?

Red-Green-Refactor is a test-first methodology preventing regressions by writing failing tests, making them pass, and refining the code. It ensures verifiable behavior for features and bug fixes, catching unintended side effects early in the development cycle.

How do I start adding a new feature with a failing test first approach?

To start, define clear behavior targets and write a failing test before any production code. Execute test framework commands with file path context to verify the failure, then implement the feature logic until the test passes with explicit evidence.

Can I use this test-first approach for both new features and bug fixing?

Yes, this test-first approach applies to both new feature implementation and bug fixing requiring regression-proof behavior validation. It ensures code meets specific, testable requirements and reduces unintended side effects across both scenarios.

What do I need to provide to execute behavior verification with TDD?

Executing behavior verification requires clear behavior targets, test framework commands, and file path context. These inputs drive the Red-Green-Refactor cycle, allowing the methodology to verify code changes with explicit evidence.

Why does behavior-driven development focus on failing tests before writing code?

Behavior-driven development focuses on failing tests first to ensure code meets specific, testable requirements and to prevent regressions. This structured approach validates behavior changes with explicit evidence before implementation logic is finalized.