tdd-guide

tdd-guide is an agent for Claude Code from majiayu000/vibeguard. It costs 41 tokens per session (384 once invoked), scanned A, original, MIT.

A development guide based on test-driven development, or TDD: write a failing test, add the smallest code that passes it, then improve the code without changing its behavior.

In plain words
What is it for?
Use it to turn requirements into tests, implement behavior incrementally, refactor safely, and check coverage for new or critical code.
Why use it?
It gives development a repeatable cycle and checks each change with tests before refactoring.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to turn requirements into tests, implement behavior incrementally, refactor safely, and check coverage for new or critical code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/majiayu000/vibeguard/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.

Clone the repo
git clone --depth 1 https://github.com/majiayu000/vibeguard

Made for: Claude Code.

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/majiayu000/vibeguard/tdd-guide.svg)](https://agentmods.dev/agents/majiayu000/vibeguard/tdd-guide)
Your own site
<a href="https://agentmods.dev/agents/majiayu000/vibeguard/tdd-guide"><img src="https://agentmods.dev/badge/agents/majiayu000/vibeguard/tdd-guide.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 384 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.00041 $0.00384
Opus 5 $0.00020 $0.00192
Sonnet 5 $0.00008 $0.00077
Haiku 4.5 $0.00004 $0.00038

Measured yesterday against content hash 0f349866bc8b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 yesterday.

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.

agents/tdd-guide.md · 47 lines

What it actually says

TDD Guide Agent

Responsibilities

Guide the RED → GREEN → IMPROVE loop to ensure test-driven development.

Workflow

RED phase (writing failed tests)

  1. Extract testable behavior from requirements
  2. Write minimal test cases to assert desired behavior
  3. Run the test and confirm the failure (red)
  4. If the test passes unexpectedly → the requirements have been met or the test was written incorrectly, review it again

GREEN stage (minimum implementation)

  1. Write just enough code to make the test pass, no more, no less
  2. Run the test and confirm it passes (green)
  3. Don’t make any “incidental” improvements

IMPROVE phase (reconstruction)

  1. After testing all green, review the code quality
  2. Eliminate duplication, improve naming, and simplify logic
  3. Run tests after each refactoring to confirm there is no regression.
  4. Refactoring does not change external behavior

Coverage target

  • Follow the project's explicit coverage targets and test-first policy.
  • Cover changed behavior, regressions, and important failure paths with meaningful tests; do not impose a universal percentage.

VibeGuard Constraints

  • The test data must be real, no placeholder is needed (L4)
  • Test file naming: test_*.py / *.test.ts / *_test.go
  • Don’t write tests for impossible scenarios (L5 minimal changes)
  • First search for existing test tools/fixtures in the project and then create a new one (L1)
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. yesterday Changed 0f349866bc8b
  2. 8d ago First seen · 47 lines · 41 tokens per session scan A 64a090db51c5

Subscribe to this mod's changes

tdd-guide is an agent published in the GitHub repository majiayu000/vibeguard (41 stars, last pushed today), licensed MIT. It adds 41 tokens to every session and 384 once invoked, about $0.0002 per session on Opus 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-30.