tdd-guide

tdd-guide is an agent for Claude Code from johnfkoo951/cmdspace-plugins. It costs 221 tokens per session (898 once invoked), scanned A, original, MIT.

A guide for test-driven development, or TDD, a method where you write tests before the code they check. It follows the Red-Green-Refactor cycle: write a failing test, make it pass, then improve the code.

In plain words
What is it for?
Planning tests, guiding implementation against those tests, and tracking test coverage.
Why use it?
It helps turn a feature request into test cases first, including edge cases, so implementation has clear checks to satisfy.

Agent for Claude Code

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

Part of the dev-orchestrator plugin — 12 skills, 13 agents shipped together

Good fit Planning tests, guiding implementation against those tests, and tracking test coverage.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/johnfkoo951/cmdspace-plugins/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/johnfkoo951/cmdspace-plugins

Made for: Claude Code.

Or install dev-orchestrator, the plugin that ships this one along with the rest of its 12 skills, 13 agents.

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/johnfkoo951/cmdspace-plugins/tdd-guide/github.svg)](https://agentmods.dev/agents/johnfkoo951/cmdspace-plugins/tdd-guide)
Your own site
<a href="https://agentmods.dev/agents/johnfkoo951/cmdspace-plugins/tdd-guide"><img src="https://agentmods.dev/badge/agents/johnfkoo951/cmdspace-plugins/tdd-guide/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-guide

Your own site · 80×15
<a href="https://agentmods.dev/agents/johnfkoo951/cmdspace-plugins/tdd-guide"><img src="https://agentmods.dev/badge/agents/johnfkoo951/cmdspace-plugins/tdd-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 221 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 898 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.00221 $0.00898
Opus 5.5 $0.00088 $0.00359
Sonnet 5.5 $0.00044 $0.00180
Haiku 4.5 $0.00022 $0.00090

Measured 1mo ago against content hash 633b3d9ab977, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 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.

plugins/dev-orchestrator/agents/tdd-guide.md · 122 lines

How it starts

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

TDD Guide — Test-First Development Coach

You write tests first and guide implementation to satisfy them. You enforce the Red-Green-Refactor cycle.

Core Responsibilities

  1. Test-First Design: Write failing tests before implementation
  2. Edge Case Coverage: Identify boundary conditions and corner cases
  3. Test Quality: Clear, readable, maintainable tests
  4. Coverage Tracking: Ensure adequate code coverage
  5. Refactor Guidance: Improve code after tests pass

Workflow: Red-Green-Refactor

Step 1: RED — Write Failing Tests

  1. Analyze the requirements
  2. List test scenarios:
    • Happy path (normal operation)
    • Edge cases (boundaries, limits)
    • Error cases (invalid input, failures)
    • Integration points (if applicable)
  3. Write the tests (they should fail or not compile)

Step 2: GREEN — Minimal Implementation

Guide implementation that:

  • Makes the failing tests pass
  • Uses the simplest possible solution
  • Doesn't add functionality beyond what tests require

Step 3: REFACTOR — Clean Up

With passing tests as a safety net:

  • Remove duplication
  • Improve naming
  • Simplify logic
  • Extract helpers if needed

Test Writing Standards

Structure: Arrange-Act-Assert

test("should [behavior] when [condition]", () => {
  // Arrange: set up test data and context
  // Act: execute the code under test
  // Assert: verify the result
});

Naming Convention

describe("[Unit Under Test]", () => {
  describe("[Method/Behavior]", () => {
    it("should [expected behavior] when [condition]", () => {});
  });
});

Edge Case Checklist

  • Empty input (null, undefined, "", [], {})
  • Boundary values (0, -1, MAX_INT, empty string)
  • Type mismatches (string where number expected)
  • Concurrent access (if applicable)
  • Large inputs (performance edge cases)
  • Unicode and special characters

Test Quality Rules

Do

  • One assertion concept per test
  • Descriptive test names that read like sentences
  • Independent tests (no shared mutable state)
  • Test behavior, not implementation details
  • Use test fixtures/factories for complex setup

Read the full file on GitHub · 122 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. 1mo ago First seen · 122 lines · 221 tokens per session scan A 633b3d9ab977

Subscribe to this mod's changes

tdd-guide is an agent published in the GitHub repository johnfkoo951/cmdspace-plugins (7 stars, last pushed today), licensed MIT. It adds 221 tokens to every session and 898 once invoked, about $0.0009 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-08-31.

Related

Other agents, from other repositories

jira-task-runner

Drive any tracker ticket end-to-end from a link — access preflight, defect-or-change classification, reproduction or test-first evidence, delegated fix/implementation, evidence comment, QA transition.

atretyak1985/swarmery · 42 tokens

test-reviewer

Test-review role for the tdd-pipeline plugin. Reads tests written by the test-writer agent, checks coverage and correctness, and reports findings. Does not write code. Dispatched by tdd-orchestrate; not for direct user invocation.

kelp/agent-plugins · 54 tokens

test-writer

Test-writing role for the tdd-pipeline plugin. Writes ONLY the test file and minimal type stubs for a module — never the real implementation. Dispatched by tdd-orchestrate; not for direct user invocation.

kelp/agent-plugins · 49 tokens

implementer

Implementation role for the tdd-pipeline plugin. Writes ONLY the source file to make existing tests pass — never modifies tests or build files. Dispatched by tdd-orchestrate; not for direct user invocation.

kelp/agent-plugins · 46 tokens

qg-implementation

Use this agent to validate Implementation phase output against domain-specific quality criteria. Most comprehensive QG — covers hallucination detection, contract conformance, file size, test distribution, V-Model levels, AC coverage, design spec compliance, and execution results. Returns PASS/WARN/FAIL verdict.…

baodq97/open-plugin · 163 tokens

implementation-engineer

Unified TDD agent: writes tests from contracts (RED), implements code (GREEN), executes and verifies (REFACTOR). Self-contained execution loop with max 3 iterations. Handles the full Implementation phase including test generation, code implementation, package verification, and execution verification. Trigger this…

baodq97/open-plugin · 347 tokens