test-driven-development

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

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/AarushiShah/coding-agents-databricks-apps --skill test-driven-development-aarushishah
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/AarushiShah/coding-agents-databricks-apps/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/AarushiShah/coding-agents-databricks-apps --skill test-driven-development-aarushishah

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 Cycle: Guides writing one minimal failing test, verifying the failure, implementing minimal code to pass, then refactoring while staying green. - Rationalization Detection: Lists common excuses for skipping TDD (manual testing, sunk cost, "test after") with counterarguments and red flags that trigger a restart. - Testing Anti-Patterns Reference: Companion reference covers testing mock behavior, test-only production methods, incomplete mocks, and mocking without understanding dependencies. - Use Case: When fixing a bug like an empty email being accepted, write a failing test reproducing it first, verify it fails for the right reason, then implement the minimal validation fix. ## 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 for 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. Refactor only while all tests stay green, then repeat the cycle for the next behavior.

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

Write a test that reproduces the bug, such as asserting that an empty email returns an error, and run it to watch it fail. Then implement the minimal fix and confirm the test passes without breaking other tests.

Why should tests be written before implementation 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 rather than a typo or existing behavior.

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.

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