tdd-workflow

Enforce Test-Driven Development with Red-Green-Refactor cycles and 80% coverage.

330|35|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/zhukunpenglinyutong/ai-max --skill tdd-workflow-zhukunpenglinyutong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/zhukunpenglinyutong/ai-max/tree/main/skills/tdd-workflow
Command: npx skills add https://github.com/zhukunpenglinyutong/ai-max --skill tdd-workflow-zhukunpenglinyutong

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces Test-Driven Development (TDD) principles to ensure code quality, comprehensive testing, and robust development practices.

Core Features & Use Cases

  • Enforces TDD: Guides users through the Red-Green-Refactor cycle.
  • Comprehensive Testing: Mandates unit, integration, and E2E tests.
  • Coverage Requirement: Requires a minimum of 80% test coverage.
  • Use Case: When developing a new API endpoint, use this Skill to first write tests for expected success and failure scenarios, then implement the API logic to satisfy those tests, ensuring reliability from the start.

Quick Start

Follow the TDD workflow to implement the new user authentication feature.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I enforce a Test-Driven Development workflow in my project?

To enforce a Test-Driven Development workflow, you must follow the Red-Green-Refactor cycle by writing tests before implementation. This approach requires achieving over 80% code coverage across unit, integration, and end-to-end tests.

How do I write tests before implementation for a new API endpoint?

Writing tests before implementation for a new API endpoint involves first defining expected success and failure scenarios through tests. You then implement the API logic specifically to satisfy those tests, ensuring reliability from the start.

How do I maintain 80% code coverage across unit, integration, and E2E tests?

Maintaining 80% code coverage requires mandating unit, integration, and end-to-end tests within your TDD workflow. You achieve this by continuously validating that all new code satisfies existing tests before refactoring.

Does the TDD workflow support testing frameworks like Jest and Playwright?

Yes, the TDD workflow supports various testing frameworks like Jest and Playwright. It provides specific guidance on organizing test files and mocking external services within these frameworks.

What is the Red-Green-Refactor cycle in Test-Driven Development?

The Red-Green-Refactor cycle in Test-Driven Development is a core mechanism where you write a failing test, implement code to make it pass, and then refactor the code. It enforces comprehensive testing and robust development practices.

How do I mock external services when following a TDD workflow?

Mocking external services during a TDD workflow involves isolating the code being tested by simulating dependencies. The workflow includes specific guidance on organizing test files and effectively mocking these external services.