tdd-guide

Generate unit tests and analyze coverage reports for TDD workflows.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/Fantasia1999/claude-skills-zh --skill tdd-guide-fantasia1999
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-guide
Source: https://github.com/Fantasia1999/claude-skills-zh/tree/main/translations/engineering-team/tdd-guide
Command: npx skills add https://github.com/Fantasia1999/claude-skills-zh --skill tdd-guide-fantasia1999

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the Test-Driven Development (TDD) process, enabling developers to write better tests, improve code coverage, and follow the red-green-refactor workflow efficiently.

Core Features & Use Cases

  • Automated Test Generation: Creates unit tests from source code or requirements for various frameworks (Jest, Pytest, JUnit, Vitest).
  • Coverage Analysis: Parses LCOV, JSON, and XML reports to identify and prioritize code coverage gaps.
  • TDD Workflow Guidance: Provides step-by-step instructions for the red-green-refactor cycle.
  • Use Case: A developer needs to implement a new authentication module. They can use this Skill to generate initial tests for the requirements, then analyze coverage as they implement, and get guidance on the TDD cycle.

Quick Start

Use the tdd-guide skill to generate Pytest unit tests for the provided Python source code.

Frequently Asked Questions about tdd-guide

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

FAQPage Schema
How do I generate unit tests for Python and TypeScript source code?

Automated unit test generation creates framework-specific tests from source code or requirements, supporting Pytest for Python and Jest or Vitest for TypeScript to bootstrap your test suites quickly.

How do I identify and prioritize code coverage gaps from LCOV and XML reports?

Coverage analysis parses LCOV, JSON, and XML reports to pinpoint untested code paths, prioritizing specific gaps so you can target missing test fixtures and improve overall metrics.

Can I use this TDD workflow with Java and JUnit?

Yes, the TDD workflow guidance supports Java with JUnit, providing step-by-step instructions for the red-green-refactor cycle alongside TypeScript, JavaScript, and Python environments.

What is the best way to follow the red-green-refactor cycle when adding a new module?

TDD workflow guidance provides step-by-step instructions for the red-green-refactor cycle, helping you write failing tests first, implement source code to pass them, and refactor safely.

Does automated test generation create mocks and fixtures for Jest and Pytest?

Yes, automated test generation produces test fixtures and mocks for frameworks like Jest and Pytest, enabling isolated component testing directly from parsed source code or requirements.