tdd-loop

tdd-loop is a skill for Claude Code from ramboz/jig. It costs 125 tokens per session (3,242 once invoked), scanned A, original, MIT.

A coding workflow that uses TDD, or test-driven development: write a failing test, make it pass, then improve the code.

In plain words
What is it for?
It is for detecting a project’s test runner, running focused or full tests through a helper script, confirming the new failure, and guiding implementation and refactoring.
Why use it?
It provides a repeatable way to connect each code change to an expected behavior and reports test results with consistent exit codes.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the jig plugin — 20 skills shipped together

Good fit It is for detecting a project’s test runner, running focused or full tests through a helper script, confirming the new failure, and guiding implementation and refactoring.

Compare 6 skills from other repositories ↓
View source ↗ ramboz/jig
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ramboz/jig
Claude Code
/plugin install jig

Made for: Claude Code.

Or install jig, the plugin that ships this one along with the rest of its 20 skills.

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-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/ramboz/jig/tdd-loop/github.svg)](https://agentmods.dev/skills/ramboz/jig/tdd-loop)
Your own site
<a href="https://agentmods.dev/skills/ramboz/jig/tdd-loop"><img src="https://agentmods.dev/badge/skills/ramboz/jig/tdd-loop/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-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/ramboz/jig/tdd-loop"><img src="https://agentmods.dev/badge/skills/ramboz/jig/tdd-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,242 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 original No closer match found 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.00125 $0.03242
Opus 5.5 $0.00050 $0.01297
Sonnet 5.5 $0.00025 $0.00648
Haiku 4.5 $0.00013 $0.00324

Measured 5d ago against content hash e17afacb11cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tdd-loop 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 5d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (quality.py, tdd.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.

hosts/claude/skills/tdd-loop/SKILL.md · 236 lines

How it starts

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

Spec 006 promoted this skill from a dangling auto-install reference to an active skill. The deterministic runner detection + subprocess invocation live in tdd.py; this SKILL.md drives the judgment layer.

What this skill does

Codifies the red-green-refactor loop that the implementer subagent (agents/implementer.md) already encodes as "non-negotiable TDD discipline." The skill:

  • Detects the project's test runner from filesystem signals (one of pytest, vitest, jest, or Node's built-in node --test).
  • Invokes the runner as a subprocess against a target, a focused --test-path, or a single --test selector.
  • Streams the runner's stdout/stderr through to the caller — you see real output, not a swallowed summary.
  • Normalizes the runner's native exit code so callers can branch deterministically:
    • 0 — all green
    • 1 — at least one red test (runner started but reported failure)
    • 2 — the tests could not be run: no runner detected, the runner binary is missing, or a custom command exited with anything other than 0 or 1

Which runners are built in. The built-in list is closed: pytest, vitest, jest and node --test. jig does not add an adapter per test framework (ADR-0068). Every other stack (Gradle, Maven, Go, Rust, .NET, Ruby…) connects through one file, .jig/test-command, whose command follows the same exit contract: 0 the tests passed, 1 a test ran and failed, anything else could not run. test-command-recipes.md states the contract in full and carries one worked example (a Gradle wrapper script that lives in the consuming project).

The red-green-refactor loop

  1. Red. Write a failing test for one acceptance criterion (or one well-bounded behaviour). Run tdd.py run <target> and confirm the new test is the only new failure — exit 1.
  2. Green. Write the minimum implementation that makes the test pass. Run tdd.py run <target> again; expect exit 0.
  3. Refactor. Clean up only after green. Re-run after each meaningful refactor; exit 0 must hold.

Read the full file on GitHub · 236 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago Changed · +30 lines e17afacb11cd
  2. 2mo ago Changed · +14 lines b27746b44d23
  3. 3mo ago First seen · 192 lines · 125 tokens per session scan A 7e754c47e208

Subscribe to this mod's changes

tdd-loop is a skill published in the GitHub repository ramboz/jig (6 stars, last pushed 6d ago), licensed MIT. It adds 125 tokens to every session and 3,242 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

tdd-loop compared with skills from other repositories

tdd-loop next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tdd-loopramboz/jigSkill66d agoMITA125Claude Code
executedatit309/supergraphSkill236d agoMITA26Claude Code
tdddatit309/supergraphSkill236d agoMITA29Claude Code
onboardingknitli/toolshedSkill13d agoMITA0Claude Code
setupknitli/toolshedSkill13d agoMITA0Claude Code
.codexknitli/toolshedSkill13d agoMITA0Claude Code, Codex
gh-stackknitli/toolshedSkill13d agoMITA65Claude Code, Codex