tdd

Guide test-driven development with red-green-refactor cycles and quality checks.

51|2|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/g2i-ai/agents --skill tdd-g2i-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/g2i-ai/agents/tree/main/skills/tdd
Command: npx skills add https://github.com/g2i-ai/agents --skill tdd-g2i-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers practice test-driven development by guiding the red-green-refactor workflow and ensuring tests drive design decisions.

Core Features & Use Cases

  • Test-First Orientation: Start with a failing test to define the intended behavior before implementing code.
  • Structured Workflow: Navigate red, green, and refactor phases to stabilize features and fixes.
  • Guided Practices: Provide actionable steps for bug fixes and feature additions with consistent quality checks.

Quick Start

Write a failing test for a small feature, then implement the minimal change to make it pass and refactor for readability.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I practice test-driven development for feature development?

Test-driven development for feature development involves writing a failing test to define behavior, implementing the minimal code change to pass it, and refactoring for readability.

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

The red-green-refactor workflow in TDD is a structured cycle where you write a failing test, implement the minimal code to make it pass, and then refactor the code to maintain quality across evolving requirements.

How do I use TDD to validate bug fixes?

To validate bug fixes with TDD, you write a failing test that reproduces the specific bug, implement the smallest change to fix the issue and pass the test, then re-run tests alongside linting and type checks.

Does test-driven development require running linting and type checks?

Test-driven development requires re-running tests along with linting and type checks during the workflow to maintain code quality and ensure the implementation passes consistent quality checks.

When do I need to use a test-first approach for writing code?

You need a test-first approach when adding new features or fixing bugs to ensure tests drive design decisions, stabilizing the application by defining intended behavior before implementing code.