test-driven-development

Guide developers to write failing tests before implementing code.

Updated Jan 12, 2026
One-click install
npx skills add https://github.com/Suara17/guanlan-sina --skill test-driven-development-suara17
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/Suara17/guanlan-sina/tree/main/.opencode/skills/test-driven-development
Command: npx skills add https://github.com/Suara17/guanlan-sina --skill test-driven-development-suara17

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams ensure correct software behavior by guiding developers to write tests before implementing code, reducing regression risks and accelerating reliable delivery.

Core Features & Use Cases

  • Test-First Guideline: Always start with a failing test to define the expected behavior.
  • Red-Green-Refactor Cycle: Implement minimal code to pass tests, then refactor while keeping tests green.
  • Scope & Discipline: Applies to feature development, bug fixes, and refactoring across languages and projects.

Quick Start

Write a failing test for the intended behavior, then implement the smallest amount of production code required to make the test pass and finally refactor while keeping tests green.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is test-driven development and how does it ensure correct software behavior?

Test-driven development is a test-first approach ensuring correct software behavior by guiding developers to write failing tests before implementing code, reducing regression risks and accelerating reliable delivery.

How do I start writing unit tests before implementing code features?

Start writing unit tests before implementation by creating a failing test that defines the intended behavior, then implement the minimal production code required to make the test pass.

What is the red-green-refactor cycle in software engineering?

The red-green-refactor cycle in software engineering involves writing a failing test, implementing minimal code to pass the test, and then refactoring the code while keeping the tests green and deterministic.

Can I use test-driven development for bug fixes and refactoring across different languages?

Yes, you can use test-driven development for bug fixes and refactoring across different languages and projects, applying test-first discipline to ensure correct behavior and reliable delivery.

How do I keep my unit tests deterministic and avoid test-only hacks?

Keep unit tests deterministic and avoid test-only hacks by enforcing a red-green-refactor workflow that requires writing a failing test before implementation and maintaining scope discipline across feature development.