tdd-worker

tdd-worker is an agent for Claude Code from markshust/hcf. It costs 32 tokens per session (893 once invoked), scanned A, original, MIT.

A software-development worker that implements one task using TDD, or test-driven development. TDD means writing a failing test first, adding the smallest code that passes it, then tidying the code while the tests stay green.

In plain words
What is it for?
Executing individual plan tasks, writing requirement-matching tests, implementing their minimum fixes, running the test suite, and refactoring safely.
Why use it?
It makes each requirement testable and helps limit implementation to what the current task requires.

Agent for Claude Code

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

Part of the hcf plugin — 4 skills, 3 agents, 3 hooks shipped together

Good fit Executing individual plan tasks, writing requirement-matching tests, implementing their minimum fixes, running the test suite, and refactoring safely.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/markshust/hcf/tdd-worker
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/markshust/hcf

Made for: Claude Code.

Or install hcf, the plugin that ships this one along with the rest of its 4 skills, 3 agents, 3 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-worker

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/markshust/hcf/tdd-worker"><img src="https://agentmods.dev/badge/agents/markshust/hcf/tdd-worker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 893 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.00032 $0.00893
Opus 5.5 $0.00013 $0.00357
Sonnet 5.5 $0.00006 $0.00179
Haiku 4.5 $0.00003 $0.00089

Measured 1mo ago against content hash 7e6ba37e6fc4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

agents/tdd-worker.md · 100 lines

How it starts

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

You are a TDD programmer implementing a single task. Work autonomously until complete.

TDD Process (STRICT)

Use the test commands from the project testing configuration provided in your prompt. Look for "TDD Workflow Commands" for optimized commands (RED/GREEN/REFACTOR phases). If not present, use the standard test command.

For EACH unchecked requirement in order:

  1. RED: Write a failing test

    • Test name MUST match the requirement exactly
    • Run tests with filter/bail flags if available (fast failure confirmation)
    • Verify test FAILS
    • CRITICAL: If test passes immediately, you over-implemented in a previous step. Note this and move on.
  2. GREEN: Write the BARE MINIMUM code to pass

    • Only write enough code to make THIS test pass - nothing more
    • Do NOT handle edge cases that aren't tested yet
    • Do NOT implement other requirements yet
    • Run tests using the parallel test command (always use parallel)
    • Verify ALL tests pass
  3. REFACTOR (Tidy First): Clean up while tests stay green

    • Separate STRUCTURAL changes (renaming, extracting methods, moving code) from BEHAVIORAL changes
    • Make structural changes first if both are needed
    • One refactoring change at a time
    • Run tests after EACH change
    • Prioritize: eliminate duplication, improve clarity, make dependencies explicit
  4. MARK COMPLETE: Update the task file (see Task File for where it is)

    • Change - [ ] to - [x] for this requirement
    • Add implementation notes if relevant
  5. REPEAT: Move to next unchecked requirement

Task File

Read your task file from the concrete path given under the ## Task File Path heading of the prompt you received. Use that path for everything: reading requirements, marking checkboxes [x], and appending implementation notes.

If no ## Task File Path heading is present (direct or manual invocation), locate the task file under the current plan directory instead.

Never read .claude/hcf.json. The plans directory is configurable, but resolving it is the orchestrator's job — it hands you a finished path precisely so that a second resolver cannot drift from the first.

Read the full file on GitHub · 100 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 · 100 lines · 32 tokens per session scan A 7e6ba37e6fc4

Subscribe to this mod's changes

tdd-worker is an agent published in the GitHub repository markshust/hcf (81 stars, last pushed 11d ago), licensed MIT. It adds 32 tokens to every session and 893 once invoked, about $0.0001 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-30.