test-driven-development

Enforces RED-GREEN-REFACTOR test-driven development workflow for writing tests before production code.

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/swcstudiospace/aimeecodes --skill test-driven-development-swcstudiospace
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/swcstudiospace/aimeecodes/tree/main/.aimee/skills/test-driven-development
Command: npx skills add https://github.com/swcstudiospace/aimeecodes --skill test-driven-development-swcstudiospace

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers often write production code first and add tests afterward, which produces biased tests that pass immediately and prove nothing. This Skill enforces strict test-driven development so every feature, bug fix, and refactor starts with a failing test that verifies real behavior. ## Core Features & Use Cases - RED-GREEN-REFACTOR Enforcement: Guides the agent through writing one failing test, verifying the failure, writing minimal passing code, and refactoring safely. - Rationalization Detection: Lists common excuses ("too simple to test", "I'll test after") and red flags that signal TDD is being skipped, with instructions to delete code and restart. - Subagent Integration: Provides templates for delegating implementation tasks with TDD requirements embedded, and pairs with systematic debugging so every bug fix starts with a reproducing test. - Use Case: When asked to add a retry mechanism to an API client, the agent first writes a failing test asserting three retry attempts, watches it fail, implements the minimal retry logic, confirms the full suite passes, then refactors. ## Quick Start Ask the agent to implement a new feature or fix a bug using strict test-driven development with a failing test written first.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I practice test-driven development with pytest?▼

Write one minimal failing test for a single behavior, run it with pytest to confirm it fails for the expected reason, then write the simplest code to pass. Re-run the specific test and the full suite, then refactor while keeping tests green.

What is the RED-GREEN-REFACTOR cycle in TDD?▼

RED means writing a failing test that defines desired behavior. GREEN means writing the minimal code to make it pass, even hardcoding values. REFACTOR means cleaning up duplication and names while keeping all tests passing.

Why should tests be written before production code?▼

Tests written after code pass immediately, which proves nothing about whether they test the right behavior. Watching a test fail first confirms it actually exercises the missing feature and catches real bugs.

When is it acceptable to skip test-driven development?▼

Exceptions are limited to throwaway prototypes, generated code, and configuration files, and only with explicit user permission. Exploration is allowed, but the exploratory code must be discarded before restarting with TDD.

What should I do if a test passes immediately on the first run?▼

An immediately passing test means it is testing existing behavior rather than the new feature. Fix the test so it fails for the expected reason, confirming the feature is genuinely missing, before writing any implementation code.