test-driven-development

Guide developers through the Red-Green-Refactor cycle with failing tests before coding.

2|1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/passionseed/ps_app --skill test-driven-development-passionseed
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/passionseed/ps_app/tree/main/.agent/skills/test-driven-development
Command: npx skills add https://github.com/passionseed/ps_app --skill test-driven-development-passionseed

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development helps you write tests before coding to ensure correct behavior, reduce bugs, and clarify requirements.

Core Features & Use Cases

  • Red-Green-Refactor cycle: Write a failing test, implement minimal code to pass, then refactor with confidence.
  • Guided usage: Works for new features, bug fixes, and refactors, ensuring safety before production.
  • Quality enforcement: Encourages small, deterministic steps and real tests rather than mocks.

Quick Start

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

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is the red-green-refactor cycle in test-driven development?

Test-driven development is a workflow where you write a failing test, implement the minimal code to pass it, and then refactor the code safely to improve quality.

How do I start writing tests before coding for a new feature?

To start writing tests before coding, write a failing test that defines the desired behavior for your new feature, then implement the minimal deterministic code required to make that test pass.

Does test-driven development work for bug fixes and refactoring?

Yes, test-driven development works for bug fixes and refactoring by guiding you to write a failing test that reproduces the bug or verifies behavior before making safe production changes.

Should I use mocks or real tests when following a test-first workflow?

You should use real tests rather than mocks in a test-first workflow to accurately confirm behavior and ensure code quality through small, deterministic implementation steps.

Why write a failing test before implementing minimal code?

Writing a failing test before implementing minimal code clarifies requirements and prevents regressions by ensuring your code is strictly driven by confirmed, deterministic behavioral expectations.