tdd-guide

tdd-guide is an agent for Claude Code from Galaxy-Dawn/claude-scholar. It costs 45 tokens per session (265 once invoked), scanned A, original, MIT.

A test-driven development guide. Test-driven development (TDD) means writing a failing test before the smallest code change that should make it pass.

In plain words
What is it for?
Use it to define the behavior under test, create and run the first failing test, implement the smallest fix, verify it, and choose the next small step.
Why use it?
It keeps implementation work focused and makes each behavior change verifiable before broader refactoring or testing.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the claude-scholar plugin — 45 skills, 34 commands, 6 agents, 5 hooks shipped together

Good fit Use it to define the behavior under test, create and run the first failing test, implement the smallest fix, verify it, and choose the next small step.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/galaxy-dawn/claude-scholar/tdd-guide
About the project

Claude Scholar is a semi-automated research assistant for academic research and software development, supporting literature review, coding, experiments, reporting, writing, and project knowledge management. Computer science and AI researchers use it across the research workflow with several coding-agent platforms; the catalogue contains its skills, commands, agents, hooks, plugin, and instruction.

Galaxy-Dawn/claude-scholar · 5,349 stars · on GitHub

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/Galaxy-Dawn/claude-scholar

Made for: Claude Code.

Or install claude-scholar, the plugin that ships this one along with the rest of its 45 skills, 34 commands, 6 agents, 5 hooks.

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/galaxy-dawn/claude-scholar/tdd-guide.svg)](https://agentmods.dev/agents/galaxy-dawn/claude-scholar/tdd-guide)
Your own site
<a href="https://agentmods.dev/agents/galaxy-dawn/claude-scholar/tdd-guide"><img src="https://agentmods.dev/badge/agents/galaxy-dawn/claude-scholar/tdd-guide.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 265 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.00045 $0.00265
Opus 5 $0.00023 $0.00133
Sonnet 5 $0.00009 $0.00053
Haiku 4.5 $0.00005 $0.00026

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

agents/tdd-guide.md · 39 lines

What it actually says

You are a TDD guide.

Your job is to keep implementation test-backed and incremental.

Responsibilities

  1. Restate the behavior to verify.
  2. Define the smallest failing test first.
  3. Run the test and confirm the failure is the right one.
  4. Implement the minimum code needed to pass.
  5. Re-run targeted verification.
  6. Refactor only after tests are green.

Working rules

  • Prefer small RED → GREEN → REFACTOR cycles.
  • Do not start with broad rewrites.
  • Keep the verification scope narrow before running larger suites.
  • If the repository already has a strong test pattern, follow it.
  • If tests are missing and the task is risky, say so explicitly.

Output format

When invoked, produce:

  1. Test target
  2. First failing test
  3. Implementation plan
  4. Verification steps
  5. Next TDD slice
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. 8d ago First seen · 39 lines · 45 tokens per session scan A d9a6891fbd13

Subscribe to this mod's changes

tdd-guide is an agent published in the GitHub repository Galaxy-Dawn/claude-scholar (5,349 stars, last pushed 11d ago), licensed MIT. It adds 45 tokens to every session and 265 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.