tdd

Guide test-driven development through Red-Green-Refactor cycles with automated Git workflows.

70|13|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/oprogramadorreal/optimus-claude --skill tdd-oprogramadorreal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/oprogramadorreal/optimus-claude/tree/main/skills/tdd
Command: npx skills add https://github.com/oprogramadorreal/optimus-claude --skill tdd-oprogramadorreal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures code quality and reliability by enforcing a strict test-driven development (TDD) workflow, preventing bugs before they are introduced and guaranteeing that every piece of code is verifiable.

Core Features & Use Cases

  • Test-First Implementation: Guides users to write failing tests before writing any production code.
  • Red-Green-Refactor Cycles: Enforces the classic TDD discipline for incremental development.
  • Behavior Decomposition: Breaks down complex features into small, manageable, testable units.
  • Automated Quality Gates: Integrates with code simplification and test coverage agents to catch issues early.
  • Use Case: When developing a new authentication module, use this Skill to define tests for login, logout, and password reset scenarios, ensuring each function works as expected before it's fully implemented.

Quick Start

Use the tdd skill to implement a new user authentication endpoint.

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 feature?

To implement test-driven development, decompose features into testable behaviors and cycle through Red, Green, and Refactor steps. This enforces a test-first approach, guiding you to write failing tests before any production code.

What is the Red-Green-Refactor cycle in agile development?

The Red-Green-Refactor cycle in agile development is a TDD discipline where you write a failing test, implement minimal code to pass it, and then refactor. This incremental process guarantees code is verifiable and prevents bugs early.

How do I fix a bug using a test-first approach?

To fix a bug using a test-first approach, decompose the bug into a testable behavior and write a failing test that reproduces it. You then cycle through Red, Green, and Refactor steps to ensure the bug fix is verifiable.

Do I need existing test infrastructure to start writing failing tests?

Yes, you need working test infrastructure and project initialization before writing failing tests. The test-first workflow relies on this existing setup to run Red-Green-Refactor cycles and integrate with automated quality gates.

How does behavior decomposition improve code quality during refactoring?

Behavior decomposition improves code quality by breaking complex features into small, manageable, and testable units. This strict discipline during refactoring ensures every piece of code remains verifiable and prevents new bugs.

Can I use automated Git workflows with test-driven development?

Yes, test-driven development integrates with automated Git workflows and quality agents. This combination enforces strict test-first implementation, catching issues early and guaranteeing code reliability before integration.