test-first-implementation

Guide users through a red-green-refactor loop for observable behavior.

4|1|Updated May 19, 2026
One-click install
npx skills add https://github.com/stark-ai-de/agent-skills --skill test-first-implementation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-first-implementation
Source: https://github.com/stark-ai-de/agent-skills/tree/main/incubator/skills/engineering-workflows/test-first-implementation
Command: npx skills add https://github.com/stark-ai-de/agent-skills --skill test-first-implementation

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps in implementing behavior using a red-green-refactor loop, observable tests, and small vertical slices. It is useful when the user needs TDD, test-first work, regression-first fixes, or features requiring clear behavior before implementation.

Core Features & Use Cases

  • Red-Green-Refactor Loop: Drive implementation from observable behavior by writing a failing test, making it pass with the smallest change, then refactoring without changing behavior.
  • Observable Tests: Write tests that focus on observable behavior, avoiding private implementation details.
  • Small Vertical Slices: Break down a feature into the smallest vertical behavior slice for easier testing and implementation.
  • Use Case: When starting a new feature, use this Skill to ensure that each step is tested and passes before moving on to the next.

Quick Start

Implement a feature using TDD by writing a failing test for the desired behavior, making it pass, and then refactoring.

Frequently Asked Questions about test-first-implementation

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 is implemented by guiding you through a red-green-refactor loop: writing a failing test for desired behavior, making it pass with the smallest change, then refactoring. It breaks features into small vertical slices for easier testing.

What is the red-green-refactor loop in TDD?

The red-green-refactor loop in TDD drives implementation from observable behavior. You first write a failing test (red), make it pass with minimal code (green), and then refactor without changing behavior.

How do I write effective tests for behavior-driven development?

Tests for behavior-driven development should focus on observable behavior, avoiding private implementation details. This ensures tests validate actual features rather than internal logic, enabling safe refactoring during the TDD workflow.

Do I need a specific test framework to use test-first implementation?

Test-first implementation requires a test framework and the ability to run tests locally. It does not mandate a specific framework, allowing you to apply the red-green-refactor loop within your existing development environment.

When should I use a regression-first fix workflow?

A regression-first fix workflow is applicable when features require clear behavior definitions before implementation. It is useful for test-first work, ensuring each step is tested and passes before moving to the next.

Why break down a feature into small vertical slices for TDD?

Breaking down a feature into small vertical slices for TDD yields easier testing and implementation. It ensures observable behavior is defined incrementally, driving the red-green-refactor loop effectively for each component.