test-driven-development

Enforces red-green-refactor test-driven development workflow for features and bugfixes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents untested production code by enforcing a strict test-first discipline, ensuring every feature and bugfix is backed by a failing test that was verified before implementation. ## Core Features & Use Cases - Red-Green-Refactor Enforcement: Guides writing a failing test, verifying the failure, implementing minimal code, and refactoring while staying green. - Anti-Rationalization Guardrails: Counters common excuses like "test after" or "too simple to test" with concrete rebuttals and red-flag checklists. - Testing Anti-Pattern Reference: Details pitfalls such as testing mock behavior, test-only production methods, and incomplete mocks, with gate functions to avoid them. - Use Case: When fixing a bug where an empty email is accepted, write a failing test asserting the rejection, watch it fail, implement the minimal validation, and confirm all tests pass. ## Quick Start Use the test-driven-development skill to implement this feature by writing a failing test first and following the red-green-refactor cycle.

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 for a new feature?

Write one minimal failing test describing the desired behavior, run it to confirm it fails for the right reason, then write the simplest code to pass. Refactor only while tests stay green, then repeat for the next behavior.

How do I fix a bug using TDD?

Write a failing test that reproduces the bug first, then implement the minimal fix until the test passes. This proves the fix works and creates a regression test preventing the bug from returning.

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 rather than existing behavior or mocks.

What are common testing anti-patterns with mocks?

Common anti-patterns include asserting on mock elements instead of real behavior, adding test-only methods to production classes, mocking without understanding side effects, and creating incomplete mocks missing fields downstream code uses.

When is it acceptable to skip TDD?

Exceptions are limited to throwaway prototypes, generated code, and configuration files, and only with explicit approval from your human partner. Rationalizations like "too simple to test" or "I will test after" are treated as red flags.