test-driven-development

Enforce test-first development with the RED-GREEN-REFACTOR cycle.

1|Updated Jun 25, 2026
One-click install
npx skills add https://github.com/Signmanal/VIGIL --skill test-driven-development-signmanal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/Signmanal/VIGIL/tree/main/skills/software-development/test-driven-development
Command: npx skills add https://github.com/Signmanal/VIGIL --skill test-driven-development-signmanal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the costly problem of shipping buggy, untested code that requires extensive late-cycle debugging and fixes, by enforcing a test-first workflow that catches issues before they are embedded in production code.

Core Features & Use Cases

  • Strict RED-GREEN-REFACTOR Cycle Enforcement: Mandates writing a failing test first, implementing minimal code to pass it, then refactoring without breaking existing tests.
  • Guardrails Against Common Rationalizations: Includes red flags, common excuse rebuttals, and a verification checklist to prevent skipping TDD steps.
  • VIGIL Tool Integration: Provides ready-to-use commands for running tests via the terminal tool and dispatching TDD-compliant subagent tasks.
  • Use Case: A developer adding a new retry feature for failed API calls will use this skill to first write a test verifying the operation retries 3 times, confirm the test fails, implement the minimal retry logic, then refactor for readability while keeping all tests passing.

Quick Start

Ask the AI to implement the new user password validation feature using strict test-driven development, writing a failing test for the minimum 8-character length requirement first before writing any production code.

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 test-first development to catch bugs early in my workflow?

Test-first development catches bugs early by mandating a strict RED-GREEN-REFACTOR cycle. This requires writing and verifying a failing test before implementing any production code, ensuring issues are resolved before embedding them in the final software.

What is the RED-GREEN-REFACTOR cycle in test-driven development?

The RED-GREEN-REFACTOR cycle is a strict test-driven development workflow. RED means writing a failing test first, GREEN is implementing minimal code to pass that test, and REFACTOR is optimizing the code without breaking existing tests.

How do I write code for new features using strict test-driven development?

To write code for new features using strict test-driven development, write a failing test verifying the specific behavior first, implement the minimal production logic to pass it, then refactor for readability while keeping all tests passing.

Can I use test-driven development for refactoring and bug fixes across cross-platform projects?

Yes, test-driven development applies to new feature development, bug fixes, refactoring, and behavior changes across cross-platform software engineering projects. It enforces comprehensive test coverage and prevents post-hoc test writing for maintainable codebases.

How do I prevent skipping test-first steps when rationalizing development speed?

You can prevent skipping test-first steps by using built-in guardrails against common rationalizations. This includes red flags, common excuse rebuttals, and a verification checklist to ensure the strict test-driven workflow is maintained.

What's the best way to verify API retry logic using test-driven development?

The best way to verify API retry logic is to first write a test confirming the operation retries 3 times, confirm the test fails, implement the minimal retry logic to pass the test, then refactor the code for readability.