New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Test-first development skill that generates tests, mocks, and coverage analysis across Jest, Pytest, JUnit, Vitest, and Mocha.

skills.sh installs
1K
GitHub stars
30.3K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers red-green-refactor workflows, test generation from source code, and coverage gap analysis with prioritized P0/P1/P2 output
  • Includes test_generator.py, coverage_analyzer.py, tdd_workflow.py, and fixture_generator.py for tests, reports, phase checks, and mocks
  • Derives tests from numbered acceptance criteria in specs/<feature>.md so each criterion maps to at least one test case
  • Designed for projects adding tests before or after code, raising coverage toward an 80% threshold, or mocking dependencies

Install

$ npx -y skills add alirezarezvani/claude-skills --skill tdd-guide -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

TDD Guide

Test-driven development skill for generating tests, analyzing coverage, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, and Vitest.


Workflows

Generate Tests from Code

  1. Provide source code (TypeScript, JavaScript, Python, Java)
  2. Specify target framework (Jest, Pytest, JUnit, Vitest)
  3. Run test_generator.py with requirements
  4. Review generated test stubs
  5. Validation: Tests compile and cover happy path, error cases, edge cases

Analyze Coverage Gaps

  1. Generate coverage report from test runner (npm test -- --coverage)
  2. Run coverage_analyzer.py on LCOV/JSON/XML report
  3. Review prioritized gaps (P0/P1/P2)
  4. Generate missing tests for uncovered paths
  5. Validation: Coverage meets target threshold (typically 80%+)

TDD New Feature

  1. Write failing test first (RED)
  2. Run tdd_workflow.py --phase red to validate
  3. Implement minimal code to pass (GREEN)
  4. Run tdd_workflow.py --phase green to validate
  5. Refactor while keeping tests green (REFACTOR)
  6. Validation: All tests pass after each cycle

Examples

Test Generation — Input → Output (Pytest)

Details

Repository
github.com/alirezarezvani/claude-skills
Category
Testing & QA
First seen
May 16, 2026

More from alirezarezvani/claude-skills

All 259

Similar to Tdd Guide

More Testing & QA