tdd

Guides test-driven development using the red-green-refactor workflow for features and bug fixes.

Updated Jun 25, 2026
One-click install
npx skills add https://github.com/richard-jh-mccrae/PokemonAI --skill tdd-richard-jh-mccrae
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/richard-jh-mccrae/PokemonAI/tree/main/.agents/skills/tdd
Command: npx skills add https://github.com/richard-jh-mccrae/PokemonAI --skill tdd-richard-jh-mccrae

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It enforces a disciplined test-first workflow so features and bug fixes are validated by failing tests before implementation, reducing regressions and untested code. ## Core Features & Use Cases - Red-Green-Refactor Workflow: Directs the AI to write a failing test first, implement the minimal code to pass it, then refactor safely. - Bug Fix Reproduction: Captures bugs as failing tests before applying fixes, ensuring the issue is actually resolved. - Integration Test Guidance: Applies when the user requests integration tests or mentions test-first development. - Use Case: When asked to add a new API endpoint, the Skill first writes a failing test describing the expected behavior, then implements the endpoint until the test passes. ## Quick Start Ask the AI to build the requested feature or fix the bug using test-driven development with the red-green-refactor cycle.

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 with an AI assistant?▼

Invoke the tdd skill and describe the feature or bug. The workflow writes a failing test first, then implements the minimal code to make it pass, and finally refactors while keeping tests green.

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

Red-green-refactor means writing a failing test (red), writing the simplest code to make it pass (green), then improving the code structure without changing behavior (refactor). This skill enforces that exact sequence.

Can TDD be used for fixing bugs?▼

Yes. The skill first reproduces the bug as a failing test, then applies the fix until the test passes. This guarantees the bug is actually resolved and prevents future regressions.

When should I not use test-driven development?▼

TDD is less suitable for exploratory prototypes, throwaway scripts, or UI experiments where expected behavior is not yet defined. It works best when requirements and expected outcomes are clear enough to express as tests.