test-driven-development

Enforce the RED-GREEN-REFACTOR cycle with automated test validation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps engineering teams consistently apply the test-driven development workflow, ensuring that production code is written only after a failing test is defined and verified.

Core Features & Use Cases

  • Enforces the RED-GREEN-REFACTOR cycle for feature development, bug fixes, and refactoring.
  • Provides practical guidance, examples, and patterns to write meaningful tests before implementation.
  • Improves code quality, maintainability, and regression safety through automated test-first discipline.

Quick Start

Describe a feature you want to add, write a failing test for it, then implement the minimal code to pass.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I start writing code using the test-driven development workflow?

To start test-driven development, describe a feature, write a failing unit test for it, implement the minimal production code to pass that test, and then refactor. This enforces the RED-GREEN-REFACTOR cycle to ensure tests govern code changes.

What is the RED-GREEN-REFACTOR cycle in unit testing?

The RED-GREEN-REFACTOR cycle is a test-driven development practice where you first write a failing test (RED), implement minimal code to make it pass (GREEN), and then clean up the code (REFACTOR) while ensuring tests continue passing.

When should I use test-first development for bug fixes and refactoring?

You should use test-first development during bug fixes and refactoring to guard against regressions. Writing tests before changing production code ensures your automated test suite validates that fixes and structural changes preserve existing functionality.

Does test-driven development require an existing automated test suite?

Test-driven development requires building an automated test suite as you go. You write failing tests before implementing features or fixes, then validate your minimal production code against this growing suite to continuously ensure regression safety.

What's the best way to ensure code quality during software feature development?

The best way to ensure code quality during feature development is enforcing test-driven development practices. By writing minimal production code to satisfy predefined tests, you improve maintainability and regression safety through automated test-first discipline.

What are the limitations of writing minimal production code to satisfy tests?

Writing minimal production code limits over-engineering but requires strict adherence to the RED-GREEN-REFACTOR cycle. If tests lack meaningful coverage or fail to capture edge cases, minimal implementations may not fully address complex software engineering requirements.