test-driven-development

Enforces RED-GREEN-REFACTOR test-first workflow for implementing features and bugfixes.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/azaanaliraza/operarius --skill test-driven-development-azaanaliraza
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/azaanaliraza/operarius/tree/main/src-tauri/bin/hermes/skills/software-development/test-driven-development
Command: npx skills add https://github.com/azaanaliraza/operarius --skill test-driven-development-azaanaliraza

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers often write production code before tests, producing tests that pass immediately and prove nothing. 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 cycle of writing a failing test, verifying the failure, writing minimal passing code, and refactoring safely. - Rationalization Detection: Lists common excuses for skipping TDD and red flags that signal the process was violated, with instructions to delete code and restart. - Subagent Integration: Shows how to embed TDD requirements into delegated tasks and pair with systematic debugging so every bugfix starts with a reproducing test. - Use Case: When asked to add a retry mechanism to an API client, write a failing test asserting three retry attempts, watch it fail, implement the minimal retry logic, verify it passes, then refactor. ## Quick Start Ask the agent to implement the next feature using strict test-driven development with a failing test written and verified 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 with pytest?▼

Write one minimal failing test for the desired 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 to check for regressions before refactoring.

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 and catches the intended bug.

What should I do if a new test passes immediately?▼

A test that passes immediately is testing existing behavior, not the new feature. Fix the test so it targets the missing behavior and fails for the expected reason before writing any implementation code.

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 approval. Exploratory spikes are allowed, but the exploration code should be discarded and rewritten test-first.

How does TDD apply to fixing bugs?▼

Write a failing test that reproduces the bug before changing any code. The test proves the fix works and acts as a regression guard so the same bug cannot return undetected.