Agent skill · Testing & QA

tdd-guide

Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and Mocha. Use when the user asks to write tests, improve test coverage, practice TDD, generate mocks or stubs, or mentions testing frameworks like Jest, pytest, or JUnit.

Alireza Rezvani23,369★ · +428/wk · 1 repos on radarProfile →
claude-codecodexcursorships scriptsMIT
Install
npx skills add alirezarezvani/claude-skills --skill tdd-guide --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 18
SKILL.md size: 13 KB
Bundled scripts: yes
Path: engineering-team/skills/tdd-guide/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 23,791 · +422 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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) **Input source function (`math_utils.py`):** ```pyth

What's inside
Steps it walks through
  1. Workflows
  2. Generate Tests from Code
  3. Analyze Coverage Gaps
  4. TDD New Feature
  5. Examples
  6. Test Generation — Input → Output (Pytest)
  7. Coverage Analysis — Sample P0/P1/P2 Output
  8. Key Tools
  9. Input Requirements
  10. Spec-First Workflow
  11. Spec Directory Convention
  12. Extracting Tests from Specs
  13. Red-Green-Refactor Examples Per Language
  14. TypeScript / Jest
Ships with 17 files
  • HOW_TO_USE.md
  • README.md
  • assets/expected_output.json
  • assets/sample_coverage_report.lcov
  • assets/sample_input_python.json
  • assets/sample_input_typescript.json
  • references/ci-integration.md
  • references/framework-guide.md
  • references/tdd-best-practices.md
  • scripts/coverage_analyzer.py
  • scripts/fixture_generator.py
  • scripts/format_detector.py
  • scripts/framework_adapter.py
  • scripts/metrics_calculator.py
  • scripts/output_formatter.py
  • scripts/tdd_workflow.py
  • scripts/test_generator.py
Commands it runs
python scripts/test_generator.py --input math_utils.py --framework pytest
python scripts/coverage_analyzer.py --report lcov.info --threshold 80
More from claude-skills
All skills →
About this skill
What does the tdd-guide skill do?

Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and Mocha. Use when the user asks to write tests, improve test coverage, practice TDD, generate mocks or stubs, or mentions testing frameworks like Jest, pytest, or JUnit.

How do I install it?

Run `npx skills add alirezarezvani/claude-skills --skill tdd-guide --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From alirezarezvani/claude-skills, a repository with 23,791 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going