test-driven-development

Enforces red-green-refactor test-driven development workflow for features and bugfixes.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/adrianasiam19/ATLAS --skill test-driven-development-adrianasiam19
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/adrianasiam19/ATLAS/tree/main/.agent/skills/test-driven-development
Command: npx skills add https://github.com/adrianasiam19/ATLAS --skill test-driven-development-adrianasiam19

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers often write production code before tests, producing 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 that tests fail for the right reason before any implementation code is written. - Anti-Rationalization Guardrails: Catalogs common excuses for skipping TDD (manual testing, sunk cost, "test after") and explains why each fails, keeping the workflow honest. - Testing Anti-Pattern Reference: Ships a companion reference covering mock-behavior testing, test-only production methods, incomplete mocks, and over-mocking, with gate functions to catch violations. - Use Case: When fixing a bug where empty emails are accepted, write a failing test asserting the rejection error, watch it fail, implement the minimal validation, verify green, then refactor. ## Quick Start Ask the AI to implement a new feature or bugfix using strict test-driven development, writing the failing test first before any production code.

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 step by step?▼

Follow the red-green-refactor cycle: write one minimal failing test, run it and confirm it fails for the expected reason, write the simplest code to make it pass, verify all tests pass, then refactor while keeping tests green. Repeat for each new behavior.

How do I write a failing test before implementation?▼

Write a test with a clear name describing one behavior, calling the API you wish existed, using real code rather than mocks. Run it and confirm it fails because the feature is missing, not because of typos or errors, before writing any implementation.

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 and rewritten test-first.

Why should tests be written before code instead of after?▼

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 rather than mirroring the implementation.

What are common mocking anti-patterns in unit tests?▼

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. Fix them by testing real behavior and mocking minimally at the right level.