tdd-guide

tdd-guide is a skill for Claude Code, Codex from Morningstar202604/awesome-skillkit. It costs 111 tokens per session (2,585 once invoked), scanned A, a copy of tdd-guide, Apache-2.0.

A test-driven development guide for writing tests before or alongside code. Test-driven development, or TDD, uses a failing test, a code change that makes it pass, and then cleanup.

In plain words
What is it for?
Generating unit tests, fixtures, and mocks; reviewing coverage gaps; and guiding workflows for Jest, Pytest, JUnit, Vitest, and Mocha.
Why use it?
It helps find untested behavior and provides a repeatable way to check new or changed code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/tdd_cli.py workflow --requirement "implement user login" # red-green-refactor cycle + phase guidance.

Good fit Generating unit tests, fixtures, and mocks; reviewing coverage gaps; and guiding workflows for Jest, Pytest, JUnit, Vitest, and Mocha.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Morningstar202604/awesome-skillkit
agentmods
npx agentmods add skills/morningstar202604/awesome-skillkit/tdd-guide

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tdd-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/tdd-guide/github.svg)](https://agentmods.dev/skills/morningstar202604/awesome-skillkit/tdd-guide)
Your own site
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/tdd-guide"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/tdd-guide/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tdd-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/tdd-guide"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/tdd-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,585 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 97% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00111 $0.02585
Opus 5.5 $0.00044 $0.01034
Sonnet 5.5 $0.00022 $0.00517
Haiku 4.5 $0.00011 $0.00259

Measured 1mo ago against content hash 213d512c5f68, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tdd-guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 8 executable files (scripts/coverage_analyzer.py, scripts/fixture_generator.py, scripts/format_detector.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

97% identical to tdd-guide — 410 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

site/skills/programming/code-quality/tdd-guide/SKILL.md · 224 lines

How it starts

The opening of the file, as written. The whole thing — 224 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TDD Guide

Test-driven development across Jest, Pytest, JUnit, and Vitest: generate tests, analyze coverage gaps, and drive the red-green-refactor cycle with a single CLI.


Input Checklist

Input Required Description
Source code / requirement Yes A source file, req.json, or a feature-requirement description.
Target framework No jest | pytest | junit | vitest | mocha (auto-detected).
Coverage report No LCOV / JSON / XML path, for gap analysis.
Coverage threshold No Percentage (default 80).
Phase (workflow) No red | green | refactor.

When a required input is missing, ask only once:

Please provide: (1) the source code or requirement description to test; (2) the target test framework (Jest/Pytest/JUnit/Vitest/Mocha). I'll use the rest as defaults: coverage-threshold=80%, phase advanced automatically by the workflow.

Pre-flight Checks

# 1. Does the entry script exist?
test -f scripts/tdd_cli.py || { echo "ERROR: scripts/tdd_cli.py missing"; exit 1; }
# 2. Is Python available?
command -v python3 >/dev/null 2>&1 || { echo "ERROR: python3 not found"; exit 1; }
# 3. If a coverage report is supplied, confirm the file exists:
test -z "$REPORT" || test -f "$REPORT" || { echo "ERROR: report $REPORT not found"; exit 1; }

Unified CLI (scripts/tdd_cli.py)

All library modules are invoked through a single entry point (exit codes: 0 = ok, 2 = input error, 1 = internal error):

python scripts/tdd_cli.py workflow --requirement "implement user login"            # red-green-refactor cycle + phase guidance
python scripts/tdd_cli.py detect --file examples/src/service.py                  # language/framework/test-pattern detection (bundled sample)
python scripts/tdd_cli.py gen-tests --requirements examples/req.json --framework pytest   # requirement → test cases (bundled sample)
python scripts/tdd_cli.py fixtures --mode boundary --type int           # boundary-value / edge-case / mock data
python scripts/tdd_cli.py coverage --report examples/coverage.xml --threshold 80 # coverage summary/gaps/suggestions (bundled sample cobertura)
python scripts/tdd_cli.py metrics --source examples/src/service.py --test examples/tests/test_service.py      # quality metrics (bundled sample)
python scripts/tdd_cli.py stub --framework pytest --name test_login     # render a test skeleton

Read the full file on GitHub · 224 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -20 tokens per session 213d512c5f68
  2. 1mo ago Changed f0dd5a1bfa07
  3. 1mo ago Changed · -185 lines · +49 tokens per session 1837faf734c6
  4. 1mo ago First seen · 409 lines · 82 tokens per session scan A d9e086fbaa4a

Subscribe to this mod's changes

tdd-guide is a skill published in the GitHub repository Morningstar202604/awesome-skillkit (0 stars, last pushed 25d ago), licensed Apache-2.0. It adds 111 tokens to every session and 2,585 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 97% identical to tdd-guide, differing in 410 lines, and is treated as a copy.