tdd-workflow

Enforce a RED-GREEN-REFACTOR cycle requiring a failing test before implementation.

Updated Apr 24, 2026
One-click install
npx skills add https://github.com/SpencerGoss/agent-engineering --skill tdd-workflow-spencergoss
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/SpencerGoss/agent-engineering/tree/main/tdd-workflow
Command: npx skills add https://github.com/SpencerGoss/agent-engineering --skill tdd-workflow-spencergoss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers through a test-driven development cycle, ensuring tests are written before implementation to reduce defects and enable safe, incremental progress.

Core Features & Use Cases

  • Enforces a RED-GREEN-REFACTOR cycle across languages, with a hard gate that prevents implementation until a failing test exists.
  • Provides structured, language-agnostic prompts and best practices for planning, writing tests, implementing minimal code, and refactoring.
  • Supports bug fixes, feature work, and spec-to-code conversions with consistent workflows that teams can drop into any agent-enabled host.

Quick Start

Execute the RED–GREEN–REFACTOR cycle by writing a failing test first, then add the minimal implementation to pass it, and finally refactor while preserving test success.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I enforce test-driven development before writing implementation code?▼

You can enforce test-driven development by using a workflow that applies a hard gate, preventing any implementation until a failing test exists. This ensures the RED-GREEN-REFACTOR cycle is strictly followed across languages.

What is the RED-GREEN-REFACTOR workflow for software engineering?▼

The RED-GREEN-REFACTOR workflow is a test-driven development cycle where you first write a failing test, then add the minimal implementation code to pass it, and finally refactor the code while preserving test success.

Can I use pytest and Jest for test-first development across different languages?▼

Yes, this approach supports common testing frameworks like pytest and Jest. It provides structured, language-agnostic prompts and best practices applicable across various runtimes for feature work and bug fixes.

How do I convert software specs into working code using TDD?▼

You can convert specs into working code by applying a structured test-driven workflow. It guides you from planning through writing failing tests, implementing minimal code, and refactoring for incremental delivery.

Does test-driven development work for bug fixes and feature work?▼

Yes, test-driven development workflows are designed to support both bug fixes and feature work. They enforce writing a failing test first to reduce defects and enable safe, incremental progress across your codebase.

Are there coverage checks available when refactoring during the TDD cycle?▼

Yes, the workflow includes guardrails like coverage checks during the refactoring phase. These checks ensure that your test suite maintains quality assurance standards while you clean up the code.