tdd

Enforce a strict test-first red-green-refactor workflow for new features.

1|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/discountry/ritmex-skills --skill tdd-discountry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/discountry/ritmex-skills/tree/main/skills/tdd
Command: npx skills add https://github.com/discountry/ritmex-skills --skill tdd-discountry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing new features without upfront test coverage often leads to buggy, hard-to-maintain code that breaks unexpectedly during future changes. This Skill enforces a strict test-first workflow to catch issues early and ensure every new behavior works as intended before moving forward.

Core Features & Use Cases

  • Strict Red-Green-Refactor Cycle: Follows the canonical test-first loop to prevent speculative code and ensure every line of production code is justified by a failing test.
  • Behavior Slicing: Breaks net-new features into small, verifiable test chunks to avoid overwhelming complexity and enable incremental progress.
  • Deterministic Verification: Enforces control over time, randomness, I/O, and concurrency to eliminate flaky tests and ensure reliable results.
  • Use Case: When adding a new payment processing endpoint to an e-commerce API, use this Skill to write a failing test for successful payment validation first, implement the minimal code to pass it, then refactor for clarity before moving to edge cases like failed payments.

Quick Start

Ask the AI to implement a new user notification feature using strict test-first red-green-refactor workflow, starting with test slices for valid notification triggers and invalid input handling.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I implement test-driven development for a new API endpoint?

Test-driven development for a new API endpoint enforces a strict red-green-refactor workflow, starting with a failing test for successful validation, implementing minimal code to pass it, then refactoring for clarity before handling edge cases like failed inputs.

What is the red-green-refactor cycle in test-first development?

The red-green-refactor cycle in test-first development is a workflow that prevents speculative code by writing a failing test, implementing the minimal production code to pass it, and then refactoring to eliminate abstraction via the Rule of Three.

How do I eliminate flaky tests during new feature development?

To eliminate flaky tests during new feature development, apply deterministic verification that enforces control over time, randomness, I/O, and concurrency, ensuring reliable and repeatable results for every new behavior.

When should I not use test-driven development for software development?

Test-driven development should not be used for non-additive tasks, as it applies specifically to net-new behavior implementation including new features, modules, endpoints, and integrations, rather than modifying existing legacy code.

Does test-driven development work for adding new modules and integrations?

Test-driven development works for adding new modules and integrations by applying a strict test-first workflow to eliminate unreliable code, ensuring every line of production code is justified by a failing test before deployment.