tdd-workflow

Enforces test-first development for code across unit, integration and Playwright E2E workflows.

Updated May 17, 2022
One-click install
npx skills add https://github.com/kanade0404/dotfiles --skill tdd-workflow-kanade0404
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/kanade0404/dotfiles/tree/main/.claude-plugin/skills/tdd-workflow
Command: npx skills add https://github.com/kanade0404/dotfiles --skill tdd-workflow-kanade0404

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes guesswork from feature work, bug fixes, and refactors by forcing a test-first workflow that catches regressions early and keeps changes safe.

Core Features & Use Cases

  • Test-first implementation: Write unit, integration, and end-to-end tests before adding or changing code.
  • Coverage discipline: Verify at least 80% coverage and ensure edge cases, error paths, and boundary conditions are tested.
  • Practical development guardrails: Use it when building APIs, UI components, service logic, or other changes that need reliable behavior and fast feedback.
  • Example: When adding a new API endpoint, start with failure and success tests, implement the minimal route logic, then refactor once the suite is green.

Quick Start

Use the tdd-workflow skill to plan tests first for your current feature, implement the smallest code change that makes them pass, and confirm coverage before refactoring.

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-first development when adding new API endpoints?

Test-first development enforces writing failure and success tests before implementing minimal route logic. You write unit, integration, and end-to-end tests first, implement the smallest code change to pass them, then refactor once the suite is green.

What is the best way to maintain coverage discipline during refactoring?

Coverage discipline during refactoring requires verifying at least 80% coverage and testing edge cases, error paths, and boundary conditions. You validate existing tests remain green and confirm coverage thresholds before modifying code to prevent regressions.

Can I use Playwright E2E workflows for user journey testing with this approach?

Playwright E2E workflows apply to user journey testing within a test-first approach. You write end-to-end tests alongside unit and integration tests to validate components, APIs, and user journeys before implementing the underlying logic.

Does test-first development work for both bug fixes and new feature implementation?

Test-first development works for bug fixes and new feature implementation by forcing a workflow that catches regressions early. You start by writing tests that reproduce the bug or define the feature, implement the fix or change, and verify coverage.

Why should I validate edge cases and error paths before refactoring code?

Validating edge cases and error paths before refactoring keeps changes safe and catches regressions early. Fast feedback loops confirm boundary conditions are tested, ensuring refactoring does not introduce unexpected behavior into existing logic.