test-driven-development

Enforce test-driven development with failing tests guiding feature implementation.

1|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/pantheon-org/opencode-plugins --skill test-driven-development-pantheon-org
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/pantheon-org/opencode-plugins/tree/main/.opencode/skills/test-driven-development
Command: npx skills add https://github.com/pantheon-org/opencode-plugins --skill test-driven-development-pantheon-org

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces a test-first mindset so work starts from a failing test, ensuring the feature's behavior is validated before implementation.

Core Features & Use Cases

  • Red-Green-Refactor: Follow a predictable cycle: write a failing test, make it pass with minimal code, then clean up.
  • Unified quality gate: Builds confidence that changes preserve expected behavior across features, bug fixes, and refactors.
  • Real-world workflow: Use in any language/project with a test framework to guide development from requirements to implementation.

Quick Start

Start by writing a failing test for the new feature, run the tests to observe failure, implement the minimal code to pass, and then refactor for readability.

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 the red-green-refactor cycle work?

Test-driven development guides feature implementation by starting with a failing test, writing minimal code to pass it, then refactoring for readability. This red-green-refactor cycle ensures expected behavior is validated before implementation across features, bug fixes, and refactors.

How do I start writing unit tests before implementing a new feature?

Start writing unit tests by creating a failing test for the new feature's expected behavior, run the tests to observe failure, implement the minimal code required to pass, and then refactor the implementation for readability and quality.

Does test-driven development work with any programming language or test framework?

Test-driven development works in any language or project equipped with a test framework. It guides development from requirements to implementation without specific dependencies, supporting feature development, bug fixes, and refactoring across diverse software environments.

What's the best way to enforce a test-first mindset during software refactoring?

The best way to enforce a test-first mindset during software refactoring is using a disciplined workflow where failing tests guide implementation. This unified quality gate builds confidence that changes preserve expected behavior throughout the refactoring process.

Why should I write a failing test before writing implementation code?

You should write a failing test before implementation code to ensure the feature's behavior is validated upfront. This test-first mindset enforces a predictable cycle where minimal code is written to pass tests, followed by iterative refactoring.