test-driven-development

Guide the Red-Green-Refactor cycle with failing tests before implementation.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/bennie-ng/AgCel --skill test-driven-development-bennie-ng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/bennie-ng/AgCel/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/bennie-ng/AgCel --skill test-driven-development-bennie-ng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a rigorous development practice that prevents bugs by ensuring code is written to pass predefined tests, leading to more robust and reliable software.

Core Features & Use Cases

  • Test-First Development: Mandates writing failing tests before any implementation code.
  • Red-Green-Refactor Cycle: Guides developers through writing a failing test, minimal code to pass, and then refactoring.
  • Use Case: When developing a new user authentication feature, you would first write a test for a successful login, then write the minimal code to make that test pass, and finally refactor both the test and the code.

Quick Start

Use the test-driven-development skill to write a failing test for a new feature.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is the test-driven development process for writing new features?

Test-driven development requires writing a failing test before implementation, then writing minimal code to pass it, and finally refactoring both the code and the test for better quality.

How do I apply the Red-Green-Refactor cycle when fixing bugs?

To apply the Red-Green-Refactor cycle for a bug fix, first write a failing test reproducing the bug, then write minimal code to make it pass, and finally refactor while verifying all tests pass.

Why should I write tests before implementation code?

Writing tests before implementation code enforces a rigorous practice that prevents bugs by ensuring your software is written to pass predefined tests, leading to more robust and reliable software.

When do I need to use test-first development for refactoring?

You need to use test-first development during refactoring to verify all existing tests pass before proceeding, ensuring structural changes do not alter behavior and maintaining strict code quality.

Does test-driven development work without external testing dependencies?

Yes, test-driven development works without external dependencies by guiding you through the Red-Green-Refactor cycle natively, requiring only your commitment to writing minimal code to pass predefined tests.