test-driven-development

Enforces Red-Green-Refactor workflow for frontend and backend code with automated tests.

Updated Apr 16, 2014
One-click install
npx skills add https://github.com/minhhh/dotfiles --skill test-driven-development-minhhh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/minhhh/dotfiles/tree/main/ai/.ai/gemini-superpowers/skills/test-driven-development
Command: npx skills add https://github.com/minhhh/dotfiles --skill test-driven-development-minhhh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development addresses the risk of delivering code with insufficient validation by requiring tests to define expected behavior before implementation.

Core Features & Use Cases

  • Red-Green-Refactor workflow ensures failing tests guide minimal implementation.
  • Early detection of regressions through automated tests across features.
  • Clear documentation of intended behavior via tests.

Quick Start

Implement a failing test for the feature you plan to add, then write just enough code to pass.

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 workflow function?

Test-driven development defines expected behavior by writing a failing test first, implementing minimal code to pass it, then refactoring while keeping tests green. This ensures validation before implementation and automates regression detection across features.

How do I start writing unit tests using a test-first workflow for new features?

To start test-driven development, implement a failing unit test for the specific feature you plan to add, observe the failure, then write just enough production code to make the test pass before refactoring.

Can I use test-driven development for bug fixes and refactoring across frontend and backend code?

Yes, test-driven development is applied during feature development, bug fixes, and refactors across both frontend and backend code to ensure behavior is defined by tests and regressions are detected early.

Why does writing tests before implementation improve code quality?

Writing tests before implementation improves code quality by enforcing a test-first workflow that requires minimal production code to pass failing tests, providing clear documentation of intended behavior and early regression detection.

What are the limitations of enforcing a strict test-first development workflow?

A strict test-first workflow requires writing a failing test before any production code, which may slow initial feature development but ensures behavior is validated and documented through automated unit tests across the codebase.