test-driven-development

Ensures code is written only after a failing test demonstrates the need.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces test-driven development by ensuring a failing test exists before production code, reducing guesswork and catching design gaps early.

Core Features & Use Cases

  • Test-first discipline: Write tests that fail before implementing code, guaranteeing intended behavior is captured.
  • Broad applicability: Use for new features, bug fixes, refactors, and behavioral changes to maintain software quality.
  • Example scenario: When adding a user login feature, start with a failing authentication test, then implement the minimal login logic to satisfy the test.

Quick Start

Create a failing test showing the desired behavior, run the test to confirm failure, implement the smallest production code to make the test pass, then refactor for clarity and maintainability.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is test-driven development and how does it improve software quality?

Test-driven development (TDD) is a software engineering practice where you write a failing test before production code. It improves quality by capturing intended behavior early, reducing guesswork, and catching design gaps before implementation begins.

How do I apply red-green-refactor to add a new feature?

To apply red-green-refactor, first write a failing test defining the desired behavior, run it to confirm failure, implement minimal production code to pass the test, then refactor for clarity and maintainability.

Can I use test-driven development for fixing bugs and refactoring?

Yes, test-driven development works across new features, bug fixes, refactors, and behavioral changes. Write a failing test that reproduces the bug or validates the intended refactor outcome before modifying production code.

Does test-driven development require a specific testing framework or platform?

No, test-driven development is a discipline independent of specific testing frameworks. It requires writing real tests, running them to fail, then implementing minimal code to pass, making it applicable across any platform or language.

Why do my test-driven development tests fail before writing production code?

Tests must fail before production code exists to validate that the test is actually checking intended behavior. This failing step guarantees the test captures the requirement before any implementation logic is introduced.