test-driven-development

Implements code changes using the red-green-refactor test-driven development loop.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/MSC72m/DevForge --skill test-driven-development-msc72m
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/MSC72m/DevForge/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/MSC72m/DevForge --skill test-driven-development-msc72m

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code changes made without tests ship unverified behavior, and bug fixes without reproduction tests leave regressions unguarded. This Skill enforces a write-the-failing-test-first workflow so every behavior change is proven by an automated test. ## Core Features & Use Cases - Red-Green-Refactor Loop: Write a failing test, implement the minimal code to pass it, then refactor with tests green. - Prove-It Pattern for Bug Fixes: Reproduce any reported bug with a failing test before attempting the fix, then verify the fix and run the full suite. - Stack Discovery & Test Quality Guidance: Detect the repository's own test runner and conventions, and apply practices like the test pyramid, DAMP over DRY, state-based assertions, and real implementations over mocks. - Use Case: A bug report says completing a task doesn't set its timestamp. Write a failing reproduction test confirming the bug, implement the fix, watch the test pass, then run the full suite to rule out regressions. ## Quick Start Use test-driven development to fix this bug: first write a failing test that reproduces it, then implement the minimal fix and run the repository's full test suite.

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 on a bug fix?▼

Write a test that reproduces the bug first and confirm it fails, then implement the fix and confirm the test passes. Finish by running the full test suite to verify no regressions were introduced.

How do I find the right test command for a repository?▼

Inspect the project's build files such as package.json, pom.xml, pyproject.toml, go.mod, or Cargo.toml, and prefer checked-in wrappers like ./gradlew or make test. README, CONTRIBUTING, and CI workflows show the commands that actually gate merges.

Should tests use mocks or real implementations?▼

Prefer real implementations first, then fakes, stubs, and finally interaction mocks. Reserve mocks for dependencies that are too slow, non-deterministic, or have uncontrollable side effects like external APIs or email sending.

When should I not use test-driven development?▼

Skip TDD for pure configuration changes, documentation updates, or static content changes with no behavioral impact. The cycle targets logic, bug fixes, and behavior modifications that automated tests can verify.

Why do tests that pass on the first run signal a problem?▼

A test that passes immediately proves nothing about the new behavior, since it may not exercise the code you think it does. The RED step requires confirming the test fails before writing the implementation.