tdd-workflow

Enforce tests-first RED/GREEN checkpoints with 80% coverage across unit, integration, and E2E tests.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/riftzen-bit/gemini-setup --skill tdd-workflow-riftzen-bit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/riftzen-bit/gemini-setup/tree/main/skills/tdd-workflow
Command: npx skills add https://github.com/riftzen-bit/gemini-setup --skill tdd-workflow-riftzen-bit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces a tests-first development process to ensure features are specified by failing tests before implementation, prevent regressions, and guarantee robust coverage across unit, integration, and end-to-end testing.

Core Features & Use Cases

  • Tests before code: Require writing failing tests first and validating a RED state before changing production logic.
  • Coverage gate: Enforce a combined minimum of 80% coverage across unit, integration, and E2E tests before merging.
  • Git checkpoints: Define RED, GREEN, and optional refactor commits with recommended commit messages and verification that commits are on the active branch.
  • Test types & patterns: Provide patterns for unit, integration, and Playwright E2E tests plus guidance for mocking external services and CI integration.
  • Use Case: Use this workflow when adding features, fixing bugs, refactoring, or creating API endpoints to ensure repeatable, auditable test evidence and CI enforcement.

Quick Start

Write a failing test that reproduces the requirement or bug, run the tests to confirm RED, implement the minimal fix to make the test pass and confirm GREEN, then verify coverage meets 80%+ and commit checkpoints accordingly.

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 with RED and GREEN checkpoints?

Test-driven development is enforced by requiring a failing test (RED) before writing production code, then implementing the minimal logic to pass it (GREEN). This workflow validates both states and ensures features are specified by failing tests first.

What is the minimum test coverage required for unit, integration, and E2E tests?

A combined minimum of 80% test coverage is required across unit, integration, and E2E tests. This coverage gate ensures robust protection against regressions before code changes can be merged.

How do I structure Git checkpoints for TDD commits?

Git checkpoints define RED, GREEN, and optional refactor commits with recommended commit messages. The workflow verifies that these commits are properly structured and applied on the active branch.

Can I use Playwright for E2E testing within a TDD workflow?

Playwright is supported for E2E testing within the workflow. The process provides specific patterns for unit, integration, and Playwright E2E tests, including guidance for mocking external services and CI integration.

When should I use a tests-first workflow for code changes?

A tests-first workflow should be used when writing new features, fixing bugs, refactoring, or creating API endpoints and components. It ensures repeatable, auditable test evidence and CI enforcement for all code modifications.