tdd-workflow

Enforce test-driven development with 80% coverage across unit, integration, and Playwright E2E tests.

1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/khetansarvesh/ai_skills_repo --skill tdd-workflow-khetansarvesh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/khetansarvesh/ai_skills_repo/tree/main/skills/tdd-workflow
Command: npx skills add https://github.com/khetansarvesh/ai_skills_repo --skill tdd-workflow-khetansarvesh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents regressions and hidden bugs by enforcing test-driven development and maintaining strong unit, integration, and end-to-end coverage as you build or refactor.

Core Features & Use Cases

  • Tests BEFORE code: Turns each feature change, bug fix, or refactor into a sequence starting from user-focused test cases.
  • Coverage guardrails (80%+): Sets explicit expectations for branch/function/line coverage across unit, integration, and E2E layers.
  • Deterministic test types: Defines what to validate in unit tests, what to validate in integration tests (APIs/DB/external calls), and what to validate in Playwright E2E flows (critical user journeys).

Quick Start

Use the tdd-workflow skill when you need to implement a new feature or fix a bug by first writing failing unit, integration, and Playwright E2E tests, then implementing minimal code to make them pass and verifying 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 start test-driven development for a new feature?

Test-driven development begins by defining user journeys and generating comprehensive edge, error, and boundary test cases. You run these tests expecting initial failure, then implement minimal code changes to pass, and finally verify 80%+ coverage and test independence.

How do I maintain 80% test coverage during refactoring?

To maintain 80% test coverage during refactoring, enforce explicit branch, function, and line coverage thresholds across unit, integration, and end-to-end layers. Validate critical user flows with Playwright and ensure all tests remain independent.

What is the difference between integration testing and Playwright E2E tests?

Integration testing validates API endpoints, database interactions, and external calls, whereas Playwright E2E tests validate critical user journeys and broader application flows. Both layers are required to meet the 80% coverage threshold.

Can I use Jest and Playwright together for API testing and user flows?

Yes, you can use Jest and Playwright together. Jest handles unit and integration testing for API endpoints and database interactions, while Playwright validates critical user journeys and end-to-end flows to ensure comprehensive coverage.

When should I not use a strict TDD workflow?

A strict TDD workflow enforcing 80% coverage and failing tests before implementation may not suit rapid prototyping or experimental spikes where immediate functionality matters more than comprehensive edge, error, and boundary test validation.

Why write tests before implementing code?

Writing tests before implementing code prevents regressions and hidden bugs. This test-driven approach turns feature changes, bug fixes, and refactoring into a sequence starting from user-focused test cases, ensuring minimal code changes and reliable coverage.