test-driven-development

Enforces red-green-refactor test-driven development workflow before writing implementation code.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/macintorsten/aurapod --skill test-driven-development-macintorsten
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/macintorsten/aurapod/tree/main/.github/skills/test-driven-development
Command: npx skills add https://github.com/macintorsten/aurapod --skill test-driven-development-macintorsten

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 about correctness. This Skill enforces a strict test-first discipline so every feature and bugfix is backed by a test that was watched failing before implementation. ## Core Features & Use Cases - Red-Green-Refactor Enforcement: Guides the full TDD cycle with mandatory verification steps, including watching each test fail for the right reason before writing minimal code to pass. - Rationalization Countermeasures: Provides a catalog of common excuses for skipping TDD (sunk cost, manual testing, tests-after) with direct rebuttals and red flags that trigger a restart. - Testing Anti-Pattern Reference: Ships a companion reference covering mock-behavior testing, test-only production methods, incomplete mocks, and mocking without understanding dependencies. - Use Case: When fixing a bug where an empty email is accepted, write a failing test asserting the rejection error, watch it fail, implement the minimal validation, verify green, then refactor. ## Quick Start Use the test-driven-development skill to implement this feature by writing a failing test first and following the red-green-refactor cycle.

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 on a new feature?▼

Write one minimal failing test describing the desired behavior, run it and watch it fail for the expected reason, then write the simplest code to pass. After green, refactor while keeping tests passing, and repeat for the next behavior.

How to write a failing test before fixing a bug?▼

Write a test that reproduces the bug by asserting the correct behavior, then run it to confirm it fails because the fix is missing. Implement the minimal fix, verify the test passes, and keep it as a regression guard.

What is the difference between tests-first and tests-after?▼

Tests-first answer what the code should do and force edge-case discovery before implementation. Tests-after are biased by the existing implementation, pass immediately, and only verify what you remembered to check.

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

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

Why does my test pass immediately after writing it?▼

An immediately passing test means you are testing existing behavior or the test is not exercising the new code. Fix the test so it fails for the expected reason before writing any implementation.

How do I avoid testing mock behavior instead of real code?▼

Never assert on mock elements or mock existence; test the real component's behavior or unmock it. Understand a dependency's side effects before mocking, mock at the lowest level, and mirror the complete real API structure in mock data.