skill-tdd

Enforces red-green-refactor test-driven development with adversarial multi-provider test review.

Updated Aug 15, 2026
One-click install
npx skills add https://github.com/GongYuanCaiJi/dsh-claude-octopus --skill skill-tdd-gongyuancaiji
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: skill-tdd
Source: https://github.com/GongYuanCaiJi/dsh-claude-octopus/tree/main/.claude/skills/skill-tdd
Command: npx skills add https://github.com/GongYuanCaiJi/dsh-claude-octopus --skill skill-tdd-gongyuancaiji

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents untested production code by enforcing a strict test-first discipline, ensuring every feature or bugfix begins with a failing test before any implementation is written. ## Core Features & Use Cases - Red-Green-Refactor Pipeline: Runs the full TDD cycle through orchestrate.sh with mandatory verification that tests fail before and pass after implementation. - Adversarial Test Review: Dispatches test specs to a second provider (codex or agy) to find missing scenarios, boundary conditions, and tests that a stub could trivially pass. - Anti-Rationalization Guards: Blocks common excuses like writing code first, keeping code as reference, or skipping TDD for small tasks. - Use Case: When asked to implement a retry mechanism, write a failing test for the retry behavior, watch it fail, implement the minimal passing code, then refactor while keeping all tests green. ## Quick Start Ask the AI to implement a new feature or fix a bug using test-driven development with a failing test written first.

Frequently Asked Questions about skill-tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I practice test-driven development with AI coding assistants?▼

Invoke the TDD workflow explicitly for a feature or bugfix. The assistant writes one failing test first, verifies it fails for the right reason, writes minimal code to pass, then refactors while keeping all tests green.

What is the red-green-refactor cycle in TDD?▼

Red means writing one failing test, green means writing the minimal code to make it pass, and refactor means cleaning up while tests stay green. Each phase requires actually running the test suite to verify the expected outcome.

Can TDD tests be reviewed by a second AI model?▼

Yes, the workflow supports adversarial test review by dispatching test specs to an external provider like codex or agy. The reviewer identifies missing scenarios, untested boundary conditions, and tests that a stub implementation could trivially pass.

When should I not use test-driven development?▼

Skip TDD for throwaway prototypes, configuration files, and documentation. For exploratory work, finish the exploration, discard the code, and restart with a failing test for the real implementation.

Why does my TDD test pass immediately instead of failing?▼

An immediately passing test means you are testing existing behavior rather than new functionality. Fix the test so it targets the missing feature, then watch it fail before writing any implementation code.