speckit-tdd

Generate failing tests before implementing code to enforce test-driven development.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/a2mus/smart-da3m --skill speckit-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: speckit-tdd
Source: https://github.com/a2mus/smart-da3m/tree/main/.agents/skills/speckit-tdd
Command: npx skills add https://github.com/a2mus/smart-da3m --skill speckit-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces a disciplined test-driven development workflow so teams write tests before implementation, avoid premature design decisions, and maintain high test coverage for critical code paths.

Core Features & Use Cases

  • Scaffold Interfaces First: Define types and interfaces before implementation to drive clear contracts.
  • Tests-First Workflow: Generate failing tests (RED) to specify expected behavior prior to coding.
  • Minimal Implementation & Coverage: Implement the smallest change to pass tests (GREEN), refactor safely, and ensure 80%+ coverage for maintainability.
  • Use Cases: Adding new features, reproducing and fixing bugs by writing regression tests first, refactoring modules, and gating CI pipelines on coverage thresholds.

Quick Start

Use speckit-tdd to scaffold interfaces, generate failing tests for the new feature, implement the minimal code to make tests pass, and verify at least 80% coverage.

Frequently Asked Questions about speckit-tdd

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

FAQPage Schema
How do I enforce a tests-first workflow for new feature development?

Enforce a tests-first workflow by generating failing tests before implementing code. The Skill scaffolds interfaces first, then drives feature development through the RED-GREEN-REFACTOR cycle to ensure reliable contracts and reduce regressions.

Can I use unit testing to reproduce and fix existing bugs?

Yes, you can reproduce and fix bugs by writing regression tests first. The Skill generates a failing test that captures the bug's exact behavior, then guides you to implement the minimal code change required to make that test pass.

What is the best way to maintain high unit test coverage during module refactoring?

The best way to maintain coverage during refactoring is to verify that existing tests pass and unit test coverage remains at least 80%. The Skill ensures safe refactoring by validating that the minimal implementation still satisfies the original test contracts.

Does this Skill scaffold interfaces before generating failing tests?

Yes, the Skill scaffolds interfaces and types before generating failing tests. Defining these clear contracts first drives the tests-first workflow, preventing premature design decisions and ensuring the test suite accurately specifies expected behavior.

How does the RED-GREEN-REFACTOR cycle work for CI gating scenarios?

For CI gating scenarios, the RED-GREEN-REFACTOR cycle works by generating failing tests, implementing minimal code to pass them, and refactoring safely. The Skill enforces this cycle to gate CI pipelines on strict unit test coverage thresholds of 80% or more.

When do I need a test-driven development process for my codebase?

You need a test-driven development process when adding new features, fixing bugs, refactoring modules, or gating CI pipelines. Applying tests-first reduces regressions and maintains high test coverage for critical code paths.