test-driven-development

Enforces test-first development using the red-green-refactor cycle for features and bugfixes.

1|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/Emmanuel-R8/aikos --skill test-driven-development-emmanuel-r8
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/Emmanuel-R8/aikos/tree/main/.cursor/skills/test-driven-development
Command: npx skills add https://github.com/Emmanuel-R8/aikos --skill test-driven-development-emmanuel-r8

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Code written before tests often ships with unverified behavior, hidden bugs, and tests that pass immediately without proving anything. This Skill enforces strict test-driven development so every line of production code is backed by a test that was watched fail first. ## Core Features & Use Cases - Red-Green-Refactor Workflow: Guides writing a failing test, verifying the failure, implementing minimal code, and refactoring while staying green. - Anti-Rationalization Guardrails: Provides explicit counters to common excuses like "I'll test after" or "deleting work is wasteful", with a verification checklist before marking work complete. - Testing Anti-Patterns Reference: Covers testing mock behavior, test-only methods in production classes, incomplete mocks, and mocking without understanding dependencies. - Use Case: When fixing a bug where empty emails are accepted, write a failing test asserting the rejection, watch it fail, implement the minimal validation, and confirm all tests pass. ## Quick Start Use the test-driven-development skill to implement this feature by writing a failing test first, then the minimal code to make it pass.

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 to confirm it fails for the right reason, then write the simplest code to make it pass. After green, refactor while keeping all tests passing, and repeat for the next behavior.

How do I write a failing test for a bug fix?▼

Write a test that reproduces the bug by asserting the correct expected behavior, then run it to watch it fail. Implement the minimal fix, confirm the test passes along with all other tests, and the test now prevents regression.

Why should tests be written before implementation code?▼

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

When is it acceptable to skip TDD?▼

Exceptions are limited to throwaway prototypes, generated code, and configuration files, and only with explicit approval from your human partner. Exploration is fine, but the exploratory code should be discarded and rewritten test-first.

What are common testing anti-patterns with mocks?▼

Common anti-patterns include asserting on mock elements instead of real behavior, adding test-only methods to production classes, mocking without understanding side effects, and creating incomplete mocks missing fields downstream code uses. Test real behavior and mock minimally at the right level.