TDD Guide is a skill that helps developers practice test-driven development by generating unit tests, analyzing coverage gaps, and guiding red-green-refactor workflows across popular frameworks like Jest, Pytest, JUnit, and Vitest. It provides scripts for test generation, coverage analysis, and TDD phase validation, along with examples and best practices.

✨ What it does

  • Generates test cases from source code or requirements.
  • Analyzes coverage reports (LCOV, JSON, XML) and prioritizes gaps as P0/P1/P2.
  • Guides red-green-refactor cycles with phase validation.
  • Provides examples for TypeScript/Jest, Python/Pytest, and Go.
  • Includes property-based testing and mutation testing guidance.
  • Defines bounded autonomy rules for when to stop and ask the user.

🎯 When to use it

  • When asked to write unit tests for existing code or new features.
  • When needing to improve test coverage or identify coverage gaps.
  • When practicing TDD (red-green-refactor) and needing guidance.
  • When generating mocks, stubs, or test fixtures.
  • When working with testing frameworks like Jest, Pytest, JUnit, or Vitest.

🚀 How to use

Trigger the skill by asking to write tests, improve coverage, or practice TDD. Provide source code or a spec, specify the target framework (e.g., Jest, Pytest), and optionally a coverage report. The skill uses scripts like test_generator.py and coverage_analyzer.py. Example prompts:

Generate unit tests for my Python module using Pytest.
Analyze my coverage report and suggest missing tests.
Guide me through TDD for a new feature: user login.

📄 Output: Generated test files, coverage gap reports, and TDD workflow guidance.

📦 Add this skill to Claude Code

# 1. Get the skills repo
git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills

# 2. Copy this skill into your project (or ~/.claude/skills for all projects)
mkdir -p .claude/skills
cp -r /tmp/claude-skills/engineering-team/skills/tdd-guide .claude/skills/tdd-guide

Skill source: engineering-team/skills/tdd-guide/SKILL.md

⚠️ Good to know

Focuses on unit tests; integration/E2E tests require different tools. Cannot execute tests or measure runtime behavior. Best for TypeScript, JavaScript, Python, Java. Coverage reports must be in LCOV, JSON, or XML. Generated tests require human review for complex logic.

❓ FAQ

What frameworks are supported?

The skill supports Jest, Pytest, JUnit, Vitest, and Mocha, with best support for TypeScript, JavaScript, Python, and Java.

How does coverage analysis work?

It parses coverage reports in LCOV, JSON, or XML formats and prioritizes uncovered code paths as P0 (critical), P1 (high-value), and P2 (low-risk) gaps, recommending which to address first.

What is the bounded autonomy rule?

The skill stops and asks the user when requirements are ambiguous, edge cases are unclear, test count exceeds 50, external dependencies are unclear, or security-sensitive logic is involved.

🤖 Overview, features, install steps and FAQ were generated from the project's SKILL.md on Sep 4, 2026. Always check the original source before running commands.