test-driven-development

Guide software teams through RED-GREEN-REFACTOR Test-Driven Development workflows.

3|Updated Dec 7, 2025
One-click install
npx skills add https://github.com/Grimblaz/agent-orchestra --skill test-driven-development-grimblaz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/Grimblaz/agent-orchestra/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/Grimblaz/agent-orchestra --skill test-driven-development-grimblaz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Test-Driven Development workflow guidance, quality standards, and practical patterns to help teams write tests first, drive design, and ensure maintainable codebases.

Core Features & Use Cases

  • Red-Green-Refactor guidance: structure workflows around writing failing tests, making tests pass, and refactoring safely.
  • Quality gates discipline: covers mutation testing, code coverage, and 100% test pass goals to gate PRs.
  • Patterns & templates: includes test templates, nested describe patterns, and data builders to standardize tests.

Quick Start

Execute a RED-GREEN-REFACTOR workflow on a new feature by writing a failing test first, then implementing the minimal code to pass, and finally refactoring while keeping tests green.

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 unit tests first when developing new features?

Writing unit tests first involves executing a RED-GREEN-REFACTOR cycle: write a failing test, implement minimal code to pass it, then refactor safely. This test-driven development approach structures workflows around tests to drive design and ensure maintainable codebases.

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

The RED-GREEN-REFACTOR cycle is a test-driven development workflow where you write a failing test first, implement the minimal code required to make that test pass, and then refactor the code while keeping all tests green to ensure software quality.

Can I use mutation testing and code coverage as quality gates for pull requests?

Yes, mutation testing, code coverage, and 100% test pass goals can be applied as quality gates to gate pull requests. This test-driven development discipline ensures that code changes maintain high software quality standards before merging.

Does test-driven development provide templates for standardizing unit tests and integration tests?

Test-driven development provides test templates, nested describe patterns, and data builders to standardize unit tests and integration tests. These operational patterns support consistent practice across feature development and refactoring workflows.

When should I not use a test-first development approach?

Test-driven development is designed for feature development, refactoring, and quality-gate driven workflows. You should avoid forcing test-first development when rapid prototyping without maintainability constraints, as the RED-GREEN-REFACTOR cycle requires structured iteration.

What's the best way to structure workflows around failing tests for refactoring existing code?

The best way to structure workflows around failing tests for refactoring is to write failing tests that capture current behavior, implement changes to make them pass, and refactor while keeping tests green. This ensures safe code transformations driven by test coverage.