working-with-tdd

working-with-tdd is a skill for Claude Code from slowdini/slow-powers. It costs 20 tokens per session (1,147 once invoked), scanned A, original, MIT.

A test-driven development guide for implementing features, refactoring code, or fixing bugs. Test-driven development, or TDD, means writing a test that fails first, then the smallest code change that makes it pass, followed by cleanup.

In plain words
What is it for?
Use it whenever changing software behaviour, including new features, refactors, and bug fixes.
Why use it?
It makes the intended behaviour explicit before production code is written and provides a check against regressions. It also requires an isolated workspace first and verification after implementation.

Skill for Claude Code

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

Part of the slow-powers plugin — 9 skills, 2 hooks shipped together

Good fit Use it whenever changing software behaviour, including new features, refactors, and bug fixes.

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

Made for: Claude Code.

Or install slow-powers, the plugin that ships this one along with the rest of its 9 skills, 2 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 working-with-tdd

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/slowdini/slow-powers/working-with-tdd"><img src="https://agentmods.dev/badge/skills/slowdini/slow-powers/working-with-tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,147 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.00020 $0.01147
Opus 5.5 $0.00008 $0.00459
Sonnet 5.5 $0.00004 $0.00229
Haiku 4.5 $0.00002 $0.00115

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

Security

Grade A, and why

working-with-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 2mo 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/working-with-tdd/SKILL.md · 113 lines

How it starts

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

Test-driven development (TDD)

Write the test first. Watch it fail. Write minimal code to pass. Refactor.

THE IRON LAW: NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST.

Write production code before the test? Delete it. Start over. Do not keep it for "reference" or "adapt" it. Delete means delete.

Violating the letter of the rules is violating the spirit of the rules.

REQUIRED PREREQUISITE: You must have already completed slow-powers:working-in-isolation — establish an isolated workspace before writing any test or production code.

REQUIRED NEXT SKILL: You must complete slow-powers:verifying-development-work next, after the TDD implementation work is done and before claiming the task is complete or handing work back to the user.


Red-green-refactor cycle

  1. RED — Write a failing test:
    • Write one minimal, focused test showing what the behavior should do.
    • Use real code and real inputs; avoid mocks unless absolutely unavoidable. Before committing a test, scan it against the Testing anti-patterns table below; if it matches a row, read the named section of the testing anti-patterns reference first.
  2. Verify RED — Watch it fail:
    • Run the test command: npm test / pytest / go test.
    • MANDATORY: Verify it fails for the expected reason (for example, a function is undefined or a value is incorrect), not because of a typo or build error.
  3. GREEN — Write minimal code:
    • Write the simplest possible implementation to make the test pass.
    • Avoid over-engineering or speculative optimization.
  4. Verify GREEN — Watch it pass:
    • Run the test suite. Verify the test passes, and no regressions are introduced.
  5. REFACTOR — Clean up:
    • Clean up names, remove duplication, and extract helper methods.
    • Keep the test suite green. Do not add new behavior during refactoring.

Example: code vs. mock testing

Good (focuses on real behavior)

test('retries failed operations 3 times', async () => {
  let attempts = 0;
  const operation = async () => {
    attempts++;
    if (attempts < 3) throw new Error('fail');
    return 'success';
  };
  const result = await retryOperation(operation);
  expect(result).toBe('success');
  expect(attempts).toBe(3);
});

Read the full file on GitHub · 113 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. 2mo ago First seen · 113 lines · 20 tokens per session scan A c770ff51b108

Subscribe to this mod's changes

working-with-tdd is a skill published in the GitHub repository slowdini/slow-powers (2 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 1,147 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-31.

Related

working-with-tdd compared with skills from other repositories

working-with-tdd next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
working-with-tddslowdini/slow-powersSkill21mo agoMITA20Claude Code
init-pipelinechrislacey89/skillsSkill4todayMITA108Claude Code
triage-issuechrislacey89/skillsSkill4todayMITA77Claude Code, Codex
tddchrislacey89/skillsSkill4todayMITA67Claude Code
specmint-tddngvoicu/specmint-tddSkill313d agoMITA146Claude Code, Codex
tddmaystudios/maxsimcliSkill117mo agononeA34Claude Code, Codex
tddYeachan-Heo/oh-my-claudecodeSkill41kyesterdayMITA43Claude Code