tdd-workflow

Enforce test-driven development with unit, integration, and E2E tests.

3|3|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/diegocamara89/ai-skills-hub --skill tdd-workflow-diegocamara89
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/diegocamara89/ai-skills-hub/tree/main/all-skills/tdd-workflow
Command: npx skills add https://github.com/diegocamara89/ai-skills-hub --skill tdd-workflow-diegocamara89

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures that development teams write tests before code so behavior is specified, regressions are prevented, and refactors remain safe, reducing production bugs and increasing confidence in releases.

Core Features & Use Cases

  • Tests-first enforcement: Prioritize writing unit, integration, and E2E tests before implementing features or fixes.
  • Coverage gating: Require a minimum 80% combined coverage across unit, integration, and E2E tests and verify via CI.
  • Test patterns and tooling: Provides patterns for Jest/Vitest unit tests, Next.js API integration tests, Playwright E2E flows, and mocking strategies for Supabase and Redis.
  • Use Case: When adding a new API endpoint or UI component, write failing tests that describe the user journey, implement minimal code, and verify tests and coverage before merging.

Quick Start

Use the tdd-workflow skill to write failing tests for a new feature, implement the minimal code to make them pass, and verify 80%+ coverage in CI.

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 practices for a new API endpoint?

To enforce test-driven development for an API endpoint, write failing integration tests that specify behavior before implementation, then write minimal code to pass them and verify 80%+ coverage in CI.

How do I maintain 80% test coverage when refactoring existing codebases?

Maintain 80% test coverage during refactoring by running unit, integration, and E2E tests to verify behavior remains unchanged, ensuring safe code modifications without introducing regressions.

How do I write E2E tests for Next.js using Playwright?

Write E2E tests for Next.js using Playwright by automating browser interactions to validate user flows, applying mocking strategies for external services like Supabase and Redis to isolate test environments.

What is the best way to structure unit and integration tests for feature development?

Structure unit and integration tests for feature development by using Jest or Vitit for unit tests and Next.js API integration tests, ensuring behavior is specified by tests before any implementation code is written.

Do I need to mock external services like Supabase and Redis for integration testing?

You need to mock external services like Supabase and Redis for integration testing to isolate dependencies, ensuring that tests validate specific component behavior without relying on live external infrastructure.

Can I use tdd-workflow for both bug fixes and new UI component creation?

You can use tdd-workflow for bug fixes and UI component creation by writing failing tests that describe the expected behavior or user journey, implementing minimal code, and verifying tests pass before merging.