tdd-guide

tdd-guide is a skill for Claude Code, Codex from Morningstar202604/awesome-skillkit. It costs 82 tokens per session (3,348 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.

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 with agentmods
npx agentmods add skills/morningstar202604/awesome-skillkit/tdd-guide
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

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

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 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,348 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.00082 $0.03348
Opus 5 $0.00041 $0.01674
Sonnet 5 $0.00016 $0.00670
Haiku 4.5 $0.00008 $0.00335

Measured 9d ago against content hash d9e086fbaa4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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 — 5 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.

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

How it starts

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

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):

def divide(a: float, b: float) -> float:
    if b == 0:
        raise ValueError("Cannot divide by zero")
    return a / b

Command:

python scripts/test_generator.py --input math_utils.py --framework pytest

Generated test output (test_math_utils.py):

import pytest
from math_utils import divide

class TestDivide:
    def test_divide_positive_numbers(self):
        assert divide(10, 2) == 5.0

    def test_divide_negative_numerator(self):
        assert divide(-10, 2) == -5.0

    def test_divide_float_result(self):
        assert divide(1, 3) == pytest.approx(0.333, rel=1e-3)

    def test_divide_by_zero_raises_value_error(self):
        with pytest.raises(ValueError, match="Cannot divide by zero"):
            divide(10, 0)

    def test_divide_zero_numerator(self):
        assert divide(0, 5) == 0.0

Read the full file on GitHub · 409 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. 9d 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 (1 stars, last pushed yesterday), licensed Apache-2.0. It adds 82 tokens to every session and 3,348 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to tdd-guide, differing in 5 lines, and is treated as a copy.

Related

Other skills, from other repositories

test-driven-development

Guides TDD (test-driven development) with red-green-refactor workflows, test-first feature delivery, bug reproduction through failing tests, behavior-focused assertions, and refactoring safety. Use when writing unit tests, implementing new functions, adding test coverage, fixing regressions, changing APIs, or…

pantheon-org/tekhne · 87 tokens

testing-expert

Ultimate Kotlin testing skill. Use this whenever writing, reviewing, or debugging ANY Kotlin test — unit, integration, property-based, or coroutine. Covers TDD (RED/GREEN/REFACTOR), Kotest + MockK + Kover, anti-pattern detection, and four-pillar quality framework. Triggers on: write a test, add coverage, why is this…

JosephSanjaya/skills · 115 tokens

python-testing

Python testing patterns with pytest: TDD loop, fixtures, parametrization, mocking, test organization, async testing, coverage, and CI hygiene. Use when writing or reviewing Python tests to improve correctness and reduce flakiness.

AeonDave/malskill · 48 tokens

django-tdd

Django testing strategies with pytest-django, TDD methodology, factoryboy, mocking, coverage, and testing Django REST Framework APIs.

x-cmd/skill · 32 tokens

python-testing

Python testing strategies using pytest, TDD methodology, fixtures, mocking, parametrization, and coverage requirements.

x-cmd/skill · 24 tokens

rspec-testing

This skill should be used when writing, reviewing, or improving RSpec tests for Ruby on Rails applications. Use this skill for all testing tasks including model specs, controller specs, system specs, component specs, service specs, and integration tests. The skill provides comprehensive RSpec best practices from…

Shoebtamboli/rails_claude_skills · 68 tokens