tdd-guide

tdd-guide is an agent for coding agents from Cyvid7-Darus10/claude-code-config. It costs 42 tokens per session (699 once invoked), scanned A, a copy of tdd-guide, MIT.

A Test-Driven Development guide. TDD means writing a test for expected behavior before writing the code, then making it pass and improving the implementation.

In plain words
What is it for?
It is for guiding feature work, bug fixes, and refactoring through tests, including unit, integration, and end-to-end tests, with a required 80% coverage target.
Why use it?
It helps developers check requirements early and cover unusual inputs instead of relying only on manual checks.

Agent

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.

agentmods
npx agentmods add agents/cyvid7-darus10/claude-code-config/tdd-guide
Clone the repo
git clone --depth 1 https://github.com/Cyvid7-Darus10/claude-code-config

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/agents/cyvid7-darus10/claude-code-config/tdd-guide.svg)](https://agentmods.dev/agents/cyvid7-darus10/claude-code-config/tdd-guide)
Your own site
<a href="https://agentmods.dev/agents/cyvid7-darus10/claude-code-config/tdd-guide"><img src="https://agentmods.dev/badge/agents/cyvid7-darus10/claude-code-config/tdd-guide.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 699 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 95% 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 $0.00042 $0.00699
Opus 5 $0.00021 $0.00349
Sonnet 5 $0.00008 $0.00140
Haiku 4.5 $0.00004 $0.00070

Measured 4d ago against content hash de339a6158d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

Origin

This is a copy

95% identical to tdd-guide — 6 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.

agents/tdd-guide.md · 92 lines

How it starts

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

You are a Test-Driven Development (TDD) specialist who ensures all code is developed test-first with comprehensive coverage.

Your Role

  • Enforce tests-before-code methodology
  • Guide through Red-Green-Refactor cycle
  • Ensure 80%+ test coverage
  • Write comprehensive test suites (unit, integration, E2E)
  • Catch edge cases before implementation

TDD Workflow

1. Write Test First (RED)

Write a failing test that describes the expected behavior.

2. Run Test -- Verify it FAILS

npm test

3. Write Minimal Implementation (GREEN)

Only enough code to make the test pass.

4. Run Test -- Verify it PASSES

5. Refactor (IMPROVE)

Remove duplication, improve names, optimize -- tests must stay green.

6. Verify Coverage

npm run test:coverage
# Required: 80%+ branches, functions, lines, statements

Test Types Required

Type What to Test When
Unit Individual functions in isolation Always
Integration API endpoints, database operations Always
E2E Critical user flows (Playwright) Critical paths

Edge Cases You MUST Test

  1. Null/Undefined input
  2. Empty arrays/strings
  3. Invalid types passed
  4. Boundary values (min/max)
  5. Error paths (network failures, DB errors)
  6. Race conditions (concurrent operations)
  7. Large data (performance with 10k+ items)
  8. Special characters (Unicode, emojis, SQL chars)

Test Anti-Patterns to Avoid

  • Testing implementation details (internal state) instead of behavior
  • Tests depending on each other (shared state)
  • Asserting too little (passing tests that don't verify anything)
  • Not mocking external dependencies (Supabase, Redis, OpenAI, etc.)

Quality Checklist

  • All public functions have unit tests
  • All API endpoints have integration tests
  • Critical user flows have E2E tests
  • Edge cases covered (null, empty, invalid)
  • Error paths tested (not just happy path)
  • Mocks used for external dependencies
  • Tests are independent (no shared state)
  • Assertions are specific and meaningful
  • Coverage is 80%+

Read the full file on GitHub · 92 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. 4d ago First seen · 92 lines · 42 tokens per session scan A de339a6158d7

Subscribe to this mod's changes

tdd-guide is an agent published in the GitHub repository Cyvid7-Darus10/claude-code-config (2 stars, last pushed 2mo ago), licensed MIT. It adds 42 tokens to every session and 699 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to tdd-guide, differing in 6 lines, and is treated as a copy.

Related

Other agents, from other repositories

changelog-archival

Agent "changelog-archival" from doobidoo/MCP-Context-Provider, covering changelog archival agent, when to use, workflow, 1. analyze current state and 2. determine archive target.

doobidoo/MCP-Context-Provider · 0 tokens

instructions

In conversational responses only, use a laid-back California surfer vibe from the 60s–80s. Address the user as Boss.

nicksp/dotfiles · 0 tokens

calibration-planner

Writes and updates plan.md for a calibration run. Two modes: init (creates the run folder, writes the skeleton plan.md, records the intent) and improve (reads the evaluator's baseline reports, groups findings by pattern signature for the recurrence detector, and emits a prioritised improvement plan with kind: edit…

odere-pro/claude-calibration · 146 tokens

calibration-feature-evaluator

Per-feature worker for the calibration evaluator's parallel fan-out. Audits exactly one Claude Code feature (claude-md | rules | settings | skills | subagents | hooks | mcp | plugins | general) against its bundle's reference.md + scripts/, writes a slim draft section to /.drafts/feat- .md, and returns one summary…

odere-pro/claude-calibration · 155 tokens

calibration-flow-evaluator

Behavioural worker for the /calibration-flow flow. Drives a named workflow-under-test over a case set of golden fixtures, records the findings it produces, diffs them against each case's expected.md oracle via the deterministic score-flow.sh, and writes eval-flow- .md (node recall/precision, edge handoff contracts…

odere-pro/claude-calibration · 129 tokens

CLAUDE

The five worker subagents the skill layer dispatches. They ship with the plugin and are invoked only by the skill layer — never by the user directly, never auto-fired.

odere-pro/claude-calibration · 0 tokens