tdd-worker

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

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.

agentmods
npx agentmods add agents/markshust/hcf/tdd-worker
Clone the repo
git clone --depth 1 https://github.com/markshust/hcf
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. Scan, not verified.
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 $0.00032 $0.00893
Opus 5 $0.00016 $0.00447
Sonnet 5 $0.00006 $0.00179
Haiku 4.5 $0.00003 $0.00089

Measured 2d ago against content hash 7e6ba37e6fc4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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. 2d 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 (67 stars, last pushed 7d ago), licensed MIT. It adds 32 tokens to every session and 893 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.

Related

Other agents, from other repositories

seo-drift

SEO drift analysis agent. Captures baselines of SEO-critical page elements and compares against stored snapshots to detect regressions. Reports changes with severity classification. Only spawned when a drift baseline exists for the URL.

AgriciDaniel/claude-seo · 45 tokens

api-designer

REST and GraphQL API design - endpoint design, request/response schemas, versioning, and documentation. Use for designing new APIs or evolving existing ones.

AgentWorkforce/relay · 35 tokens

audit-creative

Cross-platform creative specialist. Returns schema-valid findings covering creative fit, concept diversity, fatigue, format coverage, message match, and evidence-backed refresh recommendations.

AgriciDaniel/claude-ads · 34 tokens

external-system-integration-expert

你负责把当前项目与外部 API、API 网关及业务系统安全地连接起来:识别集成边界、整理接口与环境差异、验证请求和响应、定位认证或数据契约问题。.

agents-universe/agents-universe · 33 tokens

Audit

Deep security + performance audit of a specific diff. Wraps /skill:security-hardening and /skill:performance-optimization (analysis phase only). Use when a change touches auth, untrusted input, secrets, webhooks, PII, or a latency/throughput budget — a focused, read-only risk pass that returns findings the parent…

BlackBeltTechnology/pi-agent-dashboard · 98 tokens

nodejs-expert

Specializes in Node.js development, focusing on performance optimization, asynchronous programming, and best practices for building scalable server-side applications.

BlackBeltTechnology/pi-agent-dashboard · 25 tokens