tdd-first

Enforce test-first development by mandating failing tests before implementation code.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents the common anti-pattern of writing implementation code before any tests exist, ensuring a robust and testable codebase from the start.

Core Features & Use Cases

  • Mandatory Test-First Enforcement: Guarantees that a failing test is written before any implementation code.
  • Guided Workflow: Provides a strict, step-by-step sequence (Write Test, Stub, Verify RED, Minimum to GREEN, Refactor) for agents to follow.
  • Use Case: When an agent is tasked with developing a new feature, this Skill ensures they write the test for that feature first, then the minimal code to pass it, promoting a disciplined TDD approach.

Quick Start

Instruct the agent to use the tdd-first skill before starting any new implementation.

Frequently Asked Questions about tdd-first

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

FAQPage Schema
How do I enforce test-first development discipline in my automated workflow?

Test-first development discipline is enforced by mandating a failing test before any implementation code is written. This ensures tests drive design and prevent the accumulation of technical debt.

What is the RED-GREEN-REFACTOR cycle in TDD and BDD workflows?

The RED-GREEN-REFACTOR cycle in TDD involves writing a failing test, creating minimal implementation code to pass it, and then refactoring. This guided sequence ensures robust code quality.

How to prevent agents from writing implementation code before tests exist?

To prevent implementation code before tests, agents follow a strict sequence: write a test, stub it, verify RED, write minimal code to GREEN, and refactor. This stops the anti-pattern of untested code.

Does this test-first development approach support BDD workflows?

Yes, this test-first development approach supports BDD workflows alongside various testing frameworks. It guides agents through a strict step-by-step sequence to ensure tests drive the design process.

What's the best way to start a new feature using test-driven development?

The best way to start a new feature with test-driven development is instructing the agent to write the test first, then the minimal code to pass it. This promotes a disciplined TDD approach.