better-test-driven-development

Enforce a test-first workflow with failing tests and 80% coverage verification.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing code without tests leads to fragile features and regression risk. This skill enforces a test-first approach and targets 80%+ test coverage across unit, integration, and end-to-end tests.

Core Features & Use Cases

  • Red-Green-Refactor cycle: write a failing test, then implement the simplest production code to pass.
  • Mandatory test coverage: ensure 80%+ coverage across critical paths before shipping.
  • Applicable scenarios: new features, bug fixes, and refactors, with clear rules for exceptions (throwaway prototypes, generated code, configuration changes).

Quick Start

Start by writing a failing test for the new feature, then implement the minimal code to make it pass.

Frequently Asked Questions about better-test-driven-development

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

FAQPage Schema
How does test-first development improve code quality?

Test-driven development solves untested features by enforcing a test-first workflow. It mandates writing failing tests first, implementing minimal production code to pass, and verifying 80%+ coverage across unit, integration, and end-to-end tests.

How do I apply TDD when refactoring existing code?

Apply TDD during refactoring by writing failing tests for critical paths first, then modifying the minimal production code to pass. This ensures 80%+ test coverage and mitigates regression risk before shipping the refactored features.

When should I skip test-driven development for a new feature?

You should skip test-driven development for throwaway prototypes, generated code, and configuration changes. These scenarios are defined as clear exceptions to the 80%+ coverage requirement, avoiding unnecessary testing overhead.

What's the best way to start a new feature with a test-first workflow?

The best way to start is by writing a failing test for the new feature, then implementing the simplest production code to make it pass. This Red-Green-Refactor cycle ensures high-quality, well-tested code.

Does TDD require both unit and end-to-end tests before shipping?

TDD requires 80%+ coverage across unit, integration, and end-to-end tests before shipping. This mandatory coverage across critical paths ensures high-quality code and minimizes regression risk for new features and bug fixes.