tdd-workflow

Enforces test-driven development with RED-GREEN-REFACTOR cycles and 80% coverage requirements.

1|Updated Oct 11, 2025
One-click install
npx skills add https://github.com/ibytechaos/claude --skill tdd-workflow-ibytechaos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/ibytechaos/claude/tree/main/plugins/everything-claude-code/skills/tdd-workflow
Command: npx skills add https://github.com/ibytechaos/claude --skill tdd-workflow-ibytechaos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents untested code from reaching production by enforcing a strict test-first workflow where tests are written before implementation, validated through failing (RED) and passing (GREEN) states, and tracked with Git checkpoint commits. ## Core Features & Use Cases - Structured TDD Cycle: Guides writing user journeys, generating test cases, confirming a failing RED state, implementing minimal code, verifying GREEN, and refactoring safely. - Multi-Level Testing Patterns: Provides ready-to-use templates for unit tests (Jest/Vitest), API integration tests, and E2E tests (Playwright), plus mocking patterns for Supabase, Redis, and OpenAI. - Git Checkpoint Discipline: Requires checkpoint commits on the active branch after each validated TDD stage so progress is auditable and recoverable. - Use Case: When fixing a bug in a search API, write a failing reproducer test first, commit it as RED evidence, implement the minimal fix, rerun the same test target to confirm GREEN, then refactor with coverage verification. ## Quick Start Ask the AI to implement a new feature or bug fix using the TDD workflow with a failing test first and at least 80% coverage.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I practice test-driven development on a new feature?

Write user journeys first, generate test cases from them, run the tests to confirm they fail (RED), then implement minimal code until they pass (GREEN), and finally refactor while keeping tests green. Commit a Git checkpoint after each validated stage.

What test types should I write for a web application?

Use unit tests with Jest or Vitest for functions and components, integration tests for API endpoints and database operations, and Playwright E2E tests for critical user flows. Aim for at least 80% combined coverage across all layers.

What counts as a valid RED state in TDD?

A valid RED state requires the test to compile and execute with a failure caused by the intended bug or missing implementation. A test that was only written but never run, or that fails due to unrelated syntax errors or broken setup, does not count.

How do I mock external services like Redis or OpenAI in tests?

Use jest.mock to replace the service module with stubbed functions returning fixed promises, such as a mock embedding array for OpenAI or a fake search result for Redis. This isolates unit tests from network dependencies.

Why do my E2E tests break after UI changes?

Tests break when they rely on brittle CSS class selectors. Use semantic selectors like button text or data-testid attributes instead, which remain stable across styling and markup changes.