tdd

tdd is a skill for Claude Code from SyloRei/claude-godmode. It costs 38 tokens per session (1,393 once invoked), scanned A, original, MIT.

A test-first development method in which each behavior is specified by a failing test before the code is written.

In plain words
What is it for?
Use it to break a feature into small behaviors and implement each one through Red-Green-Refactor cycles: failing test, working code, then cleanup.
Why use it?
It makes the expected behavior explicit and helps catch regressions while the feature is being built. TDD means Test-Driven Development.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the claude-godmode plugin — 14 skills, 4 commands, 19 agents, 7 hooks, 3 MCP servers shipped together

Good fit Use it to break a feature into small behaviors and implement each one through Red-Green-Refactor cycles: failing test, working code, then cleanup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sylorei/claude-godmode/tdd
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.

Any agent
npx skills add SyloRei/claude-godmode --skill tdd
Clone the repo
git clone --depth 1 https://github.com/SyloRei/claude-godmode

Made for: Claude Code.

Or install claude-godmode, the plugin that ships this one along with the rest of its 14 skills, 4 commands, 19 agents, 7 hooks, 3 MCP servers.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/sylorei/claude-godmode/tdd"><img src="https://agentmods.dev/badge/skills/sylorei/claude-godmode/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,393 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.00038 $0.01393
Opus 5 $0.00019 $0.00696
Sonnet 5 $0.00008 $0.00279
Haiku 4.5 $0.00004 $0.00139

Measured 8d ago against content hash 944e29fd8281, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

tdd 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.

skills/tdd/SKILL.md · 138 lines

How it starts

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

Test-Driven Development

Implement features using strict Red-Green-Refactor cycles. Implements the testing protocol in rules/godmode-testing.md.


Auto Mode

Auto Mode suppresses confirmation prompts, not the clarifying questions that decide what the tests assert. If a target behavior is genuinely ambiguous — the expected output, an edge case's contract — don't ask blank: lead with the contract you'd assert and invite the override (e.g. "I'll assert this edge case returns an empty list rather than throwing — correct me before I write the red test"), because the tests encode it and guessing bakes the wrong contract into red-green. This is the clarifying rendering of the shared recommendation convention (godmode:recommend-convention) defined in rules/godmode-recommend.md. For low-stakes decomposition choices, use reasonable defaults and surface the behavior list + assumptions inline, then run the cycles. Treat course-corrections as normal input.


The Job

Break the feature into small behaviors. For each behavior, run one Red-Green-Refactor cycle.


The Cycle

RED — Write a failing test

  • Write ONE test for the next desired behavior
  • Run it. It MUST fail. If it passes, the test is wrong.
  • The test should fail for the RIGHT reason (not syntax/import error)
  • Test name: should [expected behavior] when [condition]

GREEN — Make it pass with minimal code

  • Write the SIMPLEST code that makes the test pass
  • No optimization, no elegance — just pass
  • Run ALL tests. Every test must pass.

REFACTOR — Clean up while green

  • Remove duplication, improve naming, simplify logic
  • Run tests after EACH refactoring change
  • If any test breaks: revert and try smaller step

Rules

  • NEVER write production code without a failing test first
  • One test at a time. Don't batch.
  • Commit after each GREEN step (atomic progress)
  • Test behavior, not implementation details
  • Keep tests independent — no shared mutable state
  • Detect and use the project's existing test framework
  • When .planning/STANDARDS.md is present, the code you write must honor it as authoritative project context over the generic defaults where it has spoken (see "Project Standards Precedence" in rules/godmode-coding.md)

Read the full file on GitHub · 138 lines

Files

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.

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 · 138 lines · 38 tokens per session scan A 944e29fd8281

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository SyloRei/claude-godmode (3 stars, last pushed 3mo ago), licensed MIT. It adds 38 tokens to every session and 1,393 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-31.