test-driven-development

Guide developers through the Red-Green-Refactor cycle for Test-Driven Development.

1|Updated May 25, 2025
One-click install
npx skills add https://github.com/circld/dotfiles --skill test-driven-development-circld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/circld/dotfiles/tree/main/external/opencode/skills/test-driven-development
Command: npx skills add https://github.com/circld/dotfiles --skill test-driven-development-circld

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a rigorous Test-Driven Development (TDD) process, ensuring that all new code is written with corresponding tests that are developed before the implementation code. This prevents bugs, improves code quality, and creates robust, maintainable software.

Core Features & Use Cases

  • Enforces TDD Cycle: Guides users through the Red-Green-Refactor cycle.
  • Prevents Regressions: Ensures new features don't break existing functionality.
  • Improves Code Design: Encourages writing testable, modular code.
  • Use Case: When developing a new user authentication module, use this Skill to write tests for login, logout, and password reset before writing any of the actual authentication logic.

Quick Start

Follow the Red-Green-Refactor cycle for all new code development.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I start writing tests before implementation code?

You start writing tests before implementation code by following the Red-Green-Refactor cycle, which involves writing a failing test first, creating the minimum code to pass it, and then refactoring.

What is the Red-Green-Refactor cycle in Test-Driven Development?

The Red-Green-Refactor cycle in Test-Driven Development is a methodology where you write a failing test, implement the minimum code to make it pass, and then clean up the design without changing behavior.

How does test-driven development improve code design and maintainability?

Test-driven development improves code design and maintainability by encouraging modular, testable code, preventing bugs, and ensuring new features do not break existing functionality.

Can I use test-driven development for any software development task?

Yes, you can use test-driven development for any software development task requiring high quality and maintainability, such as building a new user authentication module.

What common anti-patterns should I avoid during test-driven development?

During test-driven development, you should avoid common rationalizations and anti-patterns that bypass the Red-Green-Refactor cycle, ensuring your code remains robust and fully verifiable.