tdd

tdd is a skill for Claude Code from YSAA1/harness-workflow. It costs 46 tokens per session (533 once invoked), scanned A, original, MIT.

A test-driven development guide. TDD means writing a failing test for a public behavior, making it pass with the smallest change, and then repeating the cycle.

In plain words
What is it for?
It is for choosing public test boundaries, writing behavior-focused tests first, and implementing changes one tested slice at a time.
Why use it?
It keeps tests focused on what users can observe instead of internal implementation details, making them less likely to break during refactoring.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the harness-workflow plugin — 16 skills, 1 hook shipped together

Good fit It is for choosing public test boundaries, writing behavior-focused tests first, and implementing changes one tested slice at a time.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ysaa1/harness-workflow/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 YSAA1/harness-workflow --skill tdd
Clone the repo
git clone --depth 1 https://github.com/YSAA1/harness-workflow

Made for: Claude Code.

Or install harness-workflow, the plugin that ships this one along with the rest of its 16 skills, 1 hook.

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/ysaa1/harness-workflow/tdd/github.svg)](https://agentmods.dev/skills/ysaa1/harness-workflow/tdd)
Your own site
<a href="https://agentmods.dev/skills/ysaa1/harness-workflow/tdd"><img src="https://agentmods.dev/badge/skills/ysaa1/harness-workflow/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/ysaa1/harness-workflow/tdd"><img src="https://agentmods.dev/badge/skills/ysaa1/harness-workflow/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 533 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.00046 $0.00533
Opus 5.5 $0.00018 $0.00213
Sonnet 5.5 $0.00009 $0.00107
Haiku 4.5 $0.00005 $0.00053

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

skills-en/tdd/SKILL.md · 31 lines

How it starts

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

TDD (red → green)

Tests verify behavior on public interfaces, not implementation details; the implementation can be replaced wholesale without the tests having to follow. Consult this file before each loop starts, not after the fact.

Seams: where tests go

A seam is a public boundary for observing behavior: an interface where behavior changes are visible without digging into internals. Tests live only on seams and are never written against internals.

Test only on pre-agreed seams. Before writing any test, write down the seams to be tested and confirm them with the user, or adopt the acceptance surface of an approved Spec/plan; write no tests on unconfirmed seams. How to ask: "What is the public interface? Which seams are worth testing?" Give each proposed seam a one-line note on what it catches and what it misses.

A good test reads like a specification ("user can checkout with valid cart") and survives refactoring. Good/bad contrasts are in references/tests.md; mock boundaries are in references/mocking.md.

Loop rules

  • Red first, green second. Write the failing test first, then just enough implementation to make it pass; do not pre-write future tests or add speculative features.
  • One slice at a time. Each loop covers one seam, one test, one minimal piece of implementation; a vertical slice rather than laying things out horizontally — writing all the tests first and then all the implementations verifies only imagined behavior.
  • Refactoring is not part of the loop. Structural convergence after the behavior is green is identified by review and tidied up separately once authorized; it is not mixed into the red-green loop.

Anti-patterns

  • Implementation coupling: mocking internal collaborators, testing private methods, verifying through a side door. Detection signal: the behavior did not change, yet the test went red after refactoring.
  • Tautology: the assertion recomputes the expected value the same way the implementation does, passing by construction. Expected values must come from an independent source of truth: known-correct literals, precomputed examples, or the Spec.
  • Horizontal slicing: see "One slice at a time".

Read the full file on GitHub · 31 lines

Files

What ships with it

2 files 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. 1mo ago Changed b898f1d4d40b
  2. 2mo ago Changed ceda777cf3d3
  3. 2mo ago First seen · 31 lines · 46 tokens per session scan A 21114d2b3a72

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository YSAA1/harness-workflow (3 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 533 once invoked, about $0.0002 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-09-16.

Related

tdd compared with skills from other repositories

tdd next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tddYSAA1/harness-workflowSkill31mo agoMITA46Claude Code
test-driven-developmentaddyosmani/agent-skillsSkill121k6d agoMITA118Claude Code
workflow-patternswshobson/agentsSkill43k6d agoMITA35Claude Code
writing-skillsjnMetaCode/superpowers-zhSkill8.6k14d agoMITA23Claude Code
test-driven-developmentjnMetaCode/superpowers-zhSkill8.6k14d agoMITA20Claude Code
better-harnessQoderAI/better-harnessSkill2.5k19d agoMITA53Claude Code
diagnose-backend-bugQoderAI/better-harnessSkill2.5k19d agoMITA87Claude Code, Codex