develop-tdd

Implement test-driven development workflows with Red-Green-Refactor steps.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/dragoscirjan/opencode-config --skill develop-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: develop-tdd
Source: https://github.com/dragoscirjan/opencode-config/tree/main/skills/develop-tdd
Command: npx skills add https://github.com/dragoscirjan/opencode-config --skill develop-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers build software with confidence by enforcing a disciplined Red-Green-Refactor workflow that keeps tests ahead of implementation and reduces regressions.

Core Features & Use Cases

  • Red phase discipline: Start with failing tests that capture the intended behavior before writing any production code.
  • Incremental implementation: Add the smallest amount of code needed to make each test pass, then improve the design without changing behavior.
  • Practical use cases: Use it for new features, bug fixes, edge-case coverage, and refactors where clear verification and steady progress matter.

Quick Start

Ask the assistant to apply this skill to your current task and guide the work through Red, Green, and Refactor while reporting each step clearly.

Frequently Asked Questions about develop-tdd

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

FAQPage Schema
How do I use test-driven development for refactoring existing code safely?

Test-driven development for refactoring involves writing failing tests to capture existing behavior, adding minimal code to pass them, and refactoring while preserving the passing test suite. This disciplined workflow reduces regressions during software changes.

What is the Red-Green-Refactor workflow in software development?

The Red-Green-Refactor workflow is a test-driven development process where you write a failing test first, add the minimal production code to make it pass, and then improve the design without changing behavior. It keeps tests ahead of implementation for confident software changes.

How do I fix a bug using the TDD Red-Green-Refactor cycle?

To fix a bug using TDD, start by writing a failing unit test that reproduces the bug, then add the minimal code required to make the test pass, and finally refactor the implementation while ensuring the test suite continues passing step by step.

When should I use test-driven development for feature work?

Use test-driven development for feature work when you need clear verification and steady progress through incremental tests. It is suited for new features, bug fixes, edge-case coverage, and refactors where behavior must be validated confidently to reduce regressions.

Do I need a specific testing framework to start writing failing tests first?

No specific testing framework is required to start writing failing tests first. The workflow applies to feature work, bug fixes, and refactors across software development, relying on incremental tests and stepwise status updates rather than specific dependencies.