test-driven-development

Enforce test-driven development for non-trivial code with watch-it-fail checks.

5|Updated Jun 5, 2026
One-click install
npx skills add https://github.com/VincentJiang06/skills --skill test-driven-development-vincentjiang06
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/VincentJiang06/skills/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/VincentJiang06/skills --skill test-driven-development-vincentjiang06

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the widespread inconsistency in test-driven development adoption: teams either skip writing tests for critical non-trivial behavior (leading to silent, costly regressions) or ritualize TDD for trivial changes (leading to bloated, brittle test suites that slow down development and are painful to maintain.

Core Features & Use Cases

  • Right-size gate: Automatically triggers TDD only for real logic, bug fixes, and behavior changes, skipping trivial edits, throwaway prototypes, and generated code to avoid unnecessary overhead.
  • Modify mode: Prioritizes editing, merging, or deleting existing tests instead of piling on duplicates, keeping the test suite lean and aligned with the current code target.
  • Anti-gaming enforcement gates: Mandatory watch-it-fail checks, revert-to-red validation for bug fixes, and optional subagent role separation to eliminate fake TDD and correlated testing errors.
  • Use case example: When fixing a bug in a payment processing function that incorrectly calculates discounts, use this Skill to first write a failing regression test, confirm it fails for the correct reason, apply the fix, then prove the test catches the bug by reverting the fix and confirming the test fails again.

Quick Start

When implementing a new user authentication feature with edge cases for invalid passwords and expired tokens, use the test-driven-development skill to first write a failing test for the validation logic, watch it fail for the expected reason, then write 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 enforce test-driven development for non-trivial software behavior without bloating the test suite?

To enforce test-driven development for non-trivial software behavior, apply a right-size gate that triggers TDD only for real logic and bug fixes. This avoids bloated test suites by skipping trivial edits and throwaway prototypes.

How do I write regression tests for bug fixes to prevent silent regressions?

Writing regression tests for bug fixes requires a mandatory watch-it-fail check to confirm the test fails for the correct reason. After applying the fix, use revert-to-red validation by reverting the fix to prove the test catches the bug.

When should I skip writing tests during software development?

You should skip writing tests during software development for trivial edits, throwaway prototypes, and generated code. This prevents unnecessary overhead and avoids ritualizing test-driven development for changes that do not involve complex logic or edge cases.

What is the best way to maintain a test suite when updating already-tested code?

The best way to maintain a test suite when updating tested code is using modify mode. This prioritizes editing, merging, or deleting existing tests instead of adding duplicates, keeping the test suite lean and preventing test proliferation.

How do I eliminate correlated test-authoring errors in TDD?

To eliminate correlated test-authoring errors in TDD, use optional subagent role separation. This separates the test authoring role from the implementation role, preventing the same author from writing both the code and the test in a way that reinforces incorrect assumptions.