tdd-guide

Guide teams through Red-Green-Refactor cycles with 80%+ test coverage.

Updated Nov 17, 2025
One-click install
npx skills add https://github.com/itou-daiki/easy_stat_edu --skill tdd-guide-itou-daiki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-guide
Source: https://github.com/itou-daiki/easy_stat_edu/tree/main/.agent/skills/tdd-guide
Command: npx skills add https://github.com/itou-daiki/easy_stat_edu --skill tdd-guide-itou-daiki

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Teams often ship code without sufficient tests, risking regressions and low confidence. This Skill guides developers to adopt Test-Driven Development by enforcing tests-before-code and maintaining high coverage (80%+).

Core Features & Use Cases

  • TDD Workflow: Red-Green-Refactor cycle across unit, integration, and end-to-end tests.
  • Test Suite Expectations: Mandatory unit/integration/e2e tests, edge-case coverage, and clear 80%+ coverage goals.
  • Quality Guidance: Mocking external dependencies, coverage reports, and best practices with common tooling.

Quick Start

Begin by writing a failing unit test for a new function, then implement code to pass it and progressively extend tests to cover edge cases and refactoring.

Frequently Asked Questions about tdd-guide

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

FAQPage Schema
How do I start test-driven development for a new function?

Test-driven development begins by writing a failing unit test for a new function, then implementing code to pass it and progressively extending tests to cover edge cases and refactoring.

What is the Red-Green-Refactor cycle in TDD?

The Red-Green-Refactor cycle in TDD involves writing a failing test, writing the minimum code to pass that test, and then refactoring the code while maintaining passing tests and high coverage.

How do I enforce an 80% test coverage goal across my software project?

To enforce 80% test coverage, you must mandate unit, integration, and end-to-end tests, utilize coverage reports to track progress, and ensure edge-case coverage across feature development and bug fixes.

What types of tests are mandatory when applying TDD to feature development?

Mandatory tests for TDD feature development include unit tests, integration tests, and end-to-end tests, ensuring comprehensive edge-case coverage and robust quality checks for reliable code.

How do I handle mocking external dependencies during integration testing?

Mocking external dependencies during integration testing is handled by applying best practices with common tooling, isolating the code under test to ensure accurate and reliable test execution.

Does TDD work for bug fixes and refactoring existing code?

TDD applies effectively to bug fixes and refactoring by guiding teams to write tests before changing code, ensuring regressions are caught and maintaining an 80% or higher coverage goal.