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.
npx skills add juanmhidalgo/claude-plugins --skill tdd-patternsgit clone --depth 1 https://github.com/juanmhidalgo/claude-pluginsWrote 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.
[](https://agentmods.dev/skills/juanmhidalgo/claude-plugins/tdd-patterns)<a href="https://agentmods.dev/skills/juanmhidalgo/claude-plugins/tdd-patterns"><img src="https://agentmods.dev/badge/skills/juanmhidalgo/claude-plugins/tdd-patterns/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.
<a href="https://agentmods.dev/skills/juanmhidalgo/claude-plugins/tdd-patterns"><img src="https://agentmods.dev/badge/skills/juanmhidalgo/claude-plugins/tdd-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00035 | $0.01468 |
| Opus 5.5 | $0.00014 | $0.00587 |
| Sonnet 5.5 | $0.00007 | $0.00294 |
| Haiku 4.5 | $0.00003 | $0.00147 |
Grade A, and why
tdd-patterns 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.
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.
How it starts
The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TDD Cycle Constraints
Iteration Limits
- Maximum 5 RED-GREEN cycles per bounded behavior (one acceptance criterion), not per feature. A feature with N criteria gets N separate budgets. If tests still fail after 5 cycles on the same criterion, halt and report the blocking issue; the orchestrator decides whether to re-dispatch.
- Stuck-after-3 rule: If the same test failure persists after 3 consecutive cycles with different fix attempts, STOP immediately. Do not keep trying the same approach.
Phase Ordering
Phases are strictly sequential. Never skip or reorder:
- RED: Write ONE test that MUST fail. If it passes immediately, it is testing existing behavior — remove or rewrite it. The exceptions are a step dispatched in characterization mode and a step's
Pins:, whose tests are meant to pass on first run; there, a passing test proves nothing until a temporary mutation shows it can fail (seetdd-runner). - GREEN: Write the minimum code to make tests pass. No refactoring, no optimization, no "while I'm here" changes.
- REFACTOR: Only after all tests are green. Run tests after every refactoring change. If a test breaks during refactor, undo the refactoring change.
Fix Implementation, Not Tests
When a test fails during the GREEN phase:
- Default action: fix the implementation, not the test.
- Only modify a test if the test itself has a bug (wrong assertion, incorrect setup) — never weaken a test to make it pass.
- If the spec is ambiguous, ask the user rather than adjusting the test.
Test Quality
A test that fails first can still prove nothing. RED and mutation proof show a test can fail; they do not show it fails for the right reason. Check these when writing each test:
- The expected value comes from outside the code under test: a literal, or a value the spec states. Computing it with the same function, formula or helper the impl uses is a tautology: the test and the code agree by construction, and both are wrong together.
- Mock only external boundaries: third-party HTTP (
responses,respx,vi.mockon the client module), time (time-machine,freezegun,vi.useFakeTimers), randomness. Never mock the project's own services, models or composables; a test that does proves the wiring you wrote, not the behavior. - No call-count asserts on the project's own code (
assert_called_once,toHaveBeenCalledTimes). They pin the implementation, so every refactor breaks them. Assert the observable outcome instead: the return value, the response, the state. - A database assert is fine when the row is the contract: a Django test that checks the row a request created asserts the behavior, not the implementation.
- Test through the public interface. If the behavior is only reachable through a private helper, or only with a mock of the project's own code, there is no good test seam: report it rather than testing the helper.
What ships with it
1 file 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.
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.
- 1mo ago Changed · +14 lines 165db1b05267
- 2mo ago Changed 4eecaedfcb32
- 2mo ago Changed dc51bedd03db
- 2mo ago Changed 66c9440c3db6
- 2mo ago First seen · 75 lines · 35 tokens per session scan A 9fd7ecfc80c3
tdd-patterns is a skill published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 16d ago), licensed MIT. It adds 35 tokens to every session and 1,468 once invoked, about $0.0001 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-09-03.
tdd-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| tdd-patternsjuanmhidalgo/claude-plugins | Skill | 8 | 16d ago | MIT | A | 35 | Claude Code |
| tddparcadei/Continuous-Claude-v3 | Skill | 4.0k | 14d ago | MIT | A | 19 | Claude Code |
| software-test-executionstencila/stencila | Skill | 916 | yesterday | Apache-2.0 | A | 97 | Claude Code |
| software-test-creationstencila/stencila | Skill | 916 | yesterday | Apache-2.0 | A | 82 | Claude Code |
| software-code-refactoringstencila/stencila | Skill | 916 | yesterday | Apache-2.0 | A | 102 | Claude Code |
| software-implementationstencila/stencila | Skill | 916 | yesterday | Apache-2.0 | A | 124 | Claude Code |
| software-plan-creationstencila/stencila | Skill | 916 | yesterday | Apache-2.0 | C | 86 | Claude Code |