dev-tdd

dev-tdd is a skill for Claude Code from christopherlouet/claude-base. It costs 75 tokens per session (2,668 once invoked), scanned A, original, MIT.

A test-first development guide built around TDD, a method where you write a failing test before writing the code that should pass it.

In plain words
What is it for?
Use it to add features or fix bugs by writing a small failing test, making it pass, and then cleaning up the code.
Why use it?
It defines a repeatable red-green-refactor cycle for checking expected behavior while implementing changes.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to add features or fix bugs by writing a small failing test, making it pass, and then cleaning up the code.

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

Made for: Claude Code.

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 dev-tdd

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/christopherlouet/claude-base/dev-tdd"><img src="https://agentmods.dev/badge/skills/christopherlouet/claude-base/dev-tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,668 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.00075 $0.02668
Opus 5.5 $0.00030 $0.01067
Sonnet 5.5 $0.00015 $0.00534
Haiku 4.5 $0.00007 $0.00267

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

Security

Grade A, and why

dev-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 27d 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.

.claude/skills/dev-tdd/SKILL.md · 352 lines

How it starts

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

Test-Driven Development (TDD)

Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

If code was written before the test: delete it. Start over with TDD.

  • Don't keep it "as a reference"
  • Don't "adapt" it by writing the tests
  • Don't look at it
  • Delete = delete

Implement from scratch starting from the tests. Period.

TDD Cycle

┌─────────┐     ┌─────────┐     ┌──────────┐
│   RED   │ ──▶ │  GREEN  │ ──▶ │ REFACTOR │
│  Test   │     │  Code   │     │  Clean   │
│  fail   │     │  pass   │     │   up     │
└─────────┘     └─────────┘     └──────────┘
      ▲                              │
      └──────────────────────────────┘

Phase 1: RED - Write a failing test

Write ONE minimal test showing the expected behavior

describe('Module', () => {
  describe('function', () => {
    it('should [behavior] when [condition]', () => {
      // Arrange - Prepare
      // Act - Execute
      // Assert - Verify
    });
  });
});

Good test vs Bad test

Good: Clear name, tests real behavior, one thing only

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

  const result = await retryOperation(operation);

  expect(result).toBe('success');
  expect(attempts).toBe(3);
});

Bad: Vague name, tests the mock instead of the code

test('retry works', async () => {
  const mock = jest.fn()
    .mockRejectedValueOnce(new Error())
    .mockRejectedValueOnce(new Error())
    .mockResolvedValueOnce('success');
  await retryOperation(mock);
  expect(mock).toHaveBeenCalledTimes(3);
});

Verify RED (MANDATORY - never skip)

npm test path/to/test.test.ts

Confirm:

  • The test fails (no syntax error)
  • The failure message is the expected one
  • The failure comes from the missing feature (not a typo)

Test passes immediately? You're testing existing behavior. Fix the test.

Read the full file on GitHub · 352 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. 27d ago Changed · -3 lines 2fa7ae2cc66a
  2. 28d ago Changed · -6 lines 31a94feeadee
  3. 29d ago Changed · -1 lines 8ab42a140b29
  4. 1mo ago First seen · 362 lines · 75 tokens per session scan A c1b38e41e76f

Subscribe to this mod's changes

dev-tdd is a skill published in the GitHub repository christopherlouet/claude-base (5 stars, last pushed 6d ago), licensed MIT. It adds 75 tokens to every session and 2,668 once invoked, about $0.0003 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-03.

Related

Other skills, from other repositories

agent-test-generator

Specialist subagent: Generates comprehensive test suites using TDD patterns. Use only when the user explicitly asks for tests, improved coverage, or test-first development.

travisjneuman/.claude · 36 tokens

workflow-patterns

Use this skill when implementing tasks according to Conductor's TDD workflow, handling phase checkpoints, managing git commits for tasks, or understanding the verification protocol.

wshobson/agents · 35 tokens

tdd

Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.

michael-denyer/pstack-claude · 52 tokens

implement

Use when an approved plan and task list exist and it is time to turn them into working, tested code — the SDD phase after analyze and before verify. Enforces TDD: a failing test comes before the code that makes it pass, one task at a time, appended to a progress ledger that survives compaction. Delegates test tooling…

ericrisco/rsc-harness · 123 tokens

plan-pipeline-execute

Execute a validated plan: worktree isolation, TDD scaffolding, level-based parallel agents, quality gate with smoke test, PR creation and merge. Handles everything through to merged PR.

FlorianBruniaux/claude-code-ultimate-guide · 43 tokens

accessibility-a11y

WCAG 2.2 compliance, ARIA patterns, keyboard navigation, screen readers, automated testing.

travisjneuman/.claude · 26 tokens