test-driven-development

Guide creation of failing tests before implementation using Red-Green-Refactor cycles.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/FeatherHunter/StudyNotes --skill test-driven-development-featherhunter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/FeatherHunter/StudyNotes/tree/main/.opencode/skills/superpowers/skills/test-driven-development
Command: npx skills add https://github.com/FeatherHunter/StudyNotes --skill test-driven-development-featherhunter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers often implement features or fixes without guided tests, leading to regressions and unclear requirements. This skill promotes a test-first approach, ensuring features are driven by failing tests first.

Core Features & Use Cases

  • Enforces the Red-Green-Refactor cycle for new features, bug fixes, and refactors.
  • Provides a clear workflow to write minimal, real tests before production code.
  • Helps teams document behavior through explicit, named tests and reduced risk of regression.

Quick Start

Write a failing test first, then implement the minimal code to pass it and refactor.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I enforce a strict test-driven development workflow for new features?

Test-driven development enforces a strict Red-Green-Refactor cycle by guiding you to write a failing test before implementing the minimal production code to pass it. This ensures features are driven by explicit, named tests and reduces regression risk.

Can I use the TDD Red-Green-Refactor cycle for bug fixes and refactoring?

Yes, the TDD Red-Green-Refactor cycle applies to feature development, bug fixes, refactoring, and behavior changes. It guides creation of deterministic failing tests to verify the bug, followed by minimal implementation and explicit verification of passes.

What is the best way to write tests before implementation across different stacks?

The best way to write tests before implementation is using a deterministic test-first approach that satisfies minimal, explicit test definitions across languages and stacks. This documents behavior through explicit tests before writing any production code.

Does test-driven development work without relying on specific testing frameworks?

Test-driven development works across languages and stacks without requiring specific testing framework dependencies. It focuses on the deterministic Red-Green-Refactor steps and explicit verification of test failures and passes rather than relying on external components.

How do I start writing a failing test first for a new software behavior?

To start writing a failing test first, define the explicit, minimal test for the new behavior, verify it fails deterministically, implement the minimal code to pass it, and then refactor. This test-first approach ensures clear requirements and reduced regressions.