tdd

Guide developers through red-green-refactor cycles for TDD workflows.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/prasunTimalsina/Aereth --skill tdd-prasuntimalsina
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/prasunTimalsina/Aereth/tree/main/.agents/skills/tdd
Command: npx skills add https://github.com/prasunTimalsina/Aereth --skill tdd-prasuntimalsina

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development (TDD) helps teams build features with confidence by validating behavior via tests before implementing code. It reduces risk of regressions and clarifies requirements through a red-green-refactor loop. This skill guides practitioners to focus on public interfaces and observable behavior rather than internal implementation details.

Core Features & Use Cases

  • Vertical slices: One test → one implementation cycle that keeps feedback fast.
  • Public-interface focus: Tests verify user-visible behavior, not internals.
  • Safe refactoring: Tests stabilize code during changes and document intended outcomes.
  • Use Case: When starting a new feature or fixing a bug, follow a red-green-refactor loop to drive development and ensure regression safety.

Quick Start

Write a failing test, implement the minimal code to pass, then refactor for maintainability.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I start test-driven development for a new feature?▼

Test-driven development uses a red-green-refactor cycle: write a failing test for the desired behavior, implement minimal code to pass it, then refactor safely to maintain quality without breaking functionality.

What is the red-green-refactor cycle in TDD?▼

The red-green-refactor cycle in TDD is a loop where you first write a failing test (red), implement the minimal code to make it pass (green), and then refactor the code for maintainability while keeping tests green.

How do I write tests that verify behavior instead of implementation details?▼

To verify behavior instead of implementation details, focus your tests on public interfaces and observable user-visible outcomes rather than internal code structure, ensuring safe refactoring without breaking tests.

Can I use TDD workflows for fixing bugs in existing code?▼

Yes, you can use TDD workflows for fixing bugs by writing a failing test that reproduces the bug, updating the code to pass the test, and refactoring safely to prevent future regressions.

Do I need external dependencies or frameworks to apply TDD?▼

No, you do not need external dependencies to apply TDD. This workflow is dependency-free and emphasizes clear public interfaces and integration-style tests for behavior verification.

When should I not focus tests on internal implementation details?▼

You should never focus tests on internal implementation details when practicing TDD. Tests should validate observable behavior through public interfaces to allow safe refactoring without causing test failures.