test-driven-development

Writes, reviews, and improves test suites using test-first Red-Green-Refactor discipline.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Test suites often contain flaky, shallow, or over-mocked tests that pass without actually catching bugs, and teams lack a disciplined process for writing meaningful tests or auditing existing ones. This Skill enforces a rigorous test-specialist workflow that writes failing tests first, reviews suites for smells and flakiness with evidence, and strengthens weak assertions — without ever touching production code. ## Core Features & Use Cases - Test-first writing (Mode A): Writes one failing test per behavior, verifies it fails for the expected reason, then hands off production-code implementation to the user or another agent. - Test suite review (Mode B): Audits existing tests for flakiness, test smells, weak assertions, and coverage gaps, reporting every finding with file:line evidence, severity, and confidence. - Test improvement (Mode C): Fixes flakiness at the root cause, strengthens assertions, reduces over-mocking, and refactors test code — editing test files only. - Use Case: Point it at a legacy module with no tests and it will write characterization tests that lock in current behavior, run a coverage baseline, and report which error paths and branches still need tests. ## Quick Start Ask the agent to review the test suite for the payments module and report flaky tests, weak assertions, and coverage gaps with file-level evidence.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I write tests using test-driven development?

Write one minimal failing test for a single behavior, run it to confirm it fails for the expected reason, then implement the simplest production code to make it pass. This Skill handles the test side only and hands off production-code implementation to you or another agent.

How to find and fix flaky tests in a test suite?

Re-run the suite multiple times and compare sequential versus parallel execution to surface intermittent failures. Common root causes include fixed sleeps, wall-clock reads, unseeded randomness, shared state, and real network calls, which are fixed by injecting clocks, seeding randomness, and isolating state.

What is the difference between mocks, stubs, and fakes in testing?

Stubs return canned answers for state-based verification, mocks verify that specific interactions occurred, and fakes are lightweight working implementations like in-memory databases. Use mocks only when the interaction itself is the contract; prefer stubs or fakes at volatile seams like databases and clocks.

Does high code coverage mean my tests are good?

No, coverage is only a negative indicator since 100% line coverage can be achieved with zero assertions. Mutation testing is the stronger signal because it injects faults and checks whether your tests actually fail, revealing weak assertions that coverage hides.

Can this skill fix bugs in my production code?

No, it never edits production or source code under any circumstance. When it discovers production-code issues, it reports them as handoff notes and recommends the code-review or security-review skills instead.

Which testing frameworks and languages are supported?

The workflow is language-agnostic and covers pytest, jest, vitest, JUnit, xUnit, Go test, and Rust cargo test among others. It detects the project's actual tooling from config and CI files, then researches current language-specific idioms online before applying them.