tdd

tdd is a skill for Claude Code from hnikoloski/imlazy. It costs 33 tokens per session (1,089 once invoked), scanned A, original, MIT.

A Test-Driven Development workflow: write a failing test, add the smallest code that makes it pass, then clean up. TDD is a way of building software by specifying behavior in tests before writing the implementation.

In plain words
What is it for?
Implementing features one behavior at a time through the red-green-refactor cycle and verifying results before claiming completion.
Why use it?
It provides evidence that a test checks the intended missing behavior and prevents production code from being written without a failing test first.

Skill for Claude Code

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

Part of the imlazy plugin — 26 skills, 1 command, 1 hook shipped together

Good fit Implementing features one behavior at a time through the red-green-refactor cycle and verifying results before claiming completion.

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

Made for: Claude Code.

Or install imlazy, the plugin that ships this one along with the rest of its 26 skills, 1 command, 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/hnikoloski/imlazy/imlazy-tdd/github.svg)](https://agentmods.dev/skills/hnikoloski/imlazy/imlazy-tdd)
Your own site
<a href="https://agentmods.dev/skills/hnikoloski/imlazy/imlazy-tdd"><img src="https://agentmods.dev/badge/skills/hnikoloski/imlazy/imlazy-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/hnikoloski/imlazy/imlazy-tdd"><img src="https://agentmods.dev/badge/skills/hnikoloski/imlazy/imlazy-tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,089 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.00033 $0.01089
Opus 5 $0.00016 $0.00544
Sonnet 5 $0.00007 $0.00218
Haiku 4.5 $0.00003 $0.00109

Measured 11d ago against content hash aaf3c259a2d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 11d 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/imlazy-tdd/SKILL.md · 131 lines

How it starts

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

tdd

Overview

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

Core principle: If you didn't watch the test fail, you don't know if it tests the right thing.

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

The Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

Write code before the test? Delete it. Start over. No exceptions.

Red-Green-Refactor

Red: Write a failing test. Verify it fails for the right reason (feature missing, not a typo). One behavior, clear name, real code (no mocks unless unavoidable).

Green: Write the simplest code to pass the test. Do not add features, refactor nearby code, or "improve" beyond what the test requires.

Refactor: Clean up after green only. Remove duplication, improve names, extract helpers. Keep tests green. Don't add behavior.

Repeat with the next failing test for the next feature.

Good test vs bad test

Good:

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);
});

Clear name, tests real behavior, one thing.

Bad:

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

Vague name, tests mock not code.

Example: Bug Fix

Bug: Empty email accepted

// RED: Write failing test
test('rejects empty email', async () => {
  const result = await submitForm({ email: '' });
  expect(result.error).toBe('Email required');
});

// Verify RED: run test, confirm FAIL with "expected 'Email required', got undefined"

// GREEN: Minimal implementation
function submitForm(data) {
  if (!data.email?.trim()) return { error: 'Email required' };
  // ...
}

// Verify GREEN: run test, confirm PASS

Read the full file on GitHub · 131 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. 11d ago First seen · 131 lines · 33 tokens per session scan A aaf3c259a2d0

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository hnikoloski/imlazy (2 stars, last pushed 1mo ago), licensed MIT. It adds 33 tokens to every session and 1,089 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-31.

Related

Other skills, from other repositories

debug

Debug a stubborn bug with a deterministic reproduction, hypothesis ledger, one-variable fixes, and a regression test. Use after the first obvious look fails, reproduction is unclear, or a fix attempt failed. Not for routine obvious failures; use for "ไล่บั๊ก".

ohm41321/luciazero · 57 tokens

tdd

Develop a feature or bug fix through a focused failing-test, minimal-implementation, and refactor loop. Use when the user requests TDD, asks for a regression test, or the bug has an obvious cheap local test target. Do not force TDD when the useful test path is unclear, expensive, or integration-heavy.

dayfinggg/openai-codex-agent-skills · 68 tokens

kotlin-testing

Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.

affaan-m/ECC · 38 tokens

cpp-testing

Use only when writing/updating/fixing C++ tests, configuring GoogleTest/CTest, diagnosing failing or flaky tests, or adding coverage/sanitizers.

affaan-m/ECC · 34 tokens

rust-testing

Rust testing patterns including unit tests, integration tests, async testing, property-based testing, mocking, and coverage. Follows TDD methodology.

affaan-m/ECC · 31 tokens

verification-loop

This skill should be used when the user asks to "verify code", "run verification", "check quality", "validate changes", or before creating a PR. Provides comprehensive verification including build, type check, lint, tests, security scan, and diff review.

Galaxy-Dawn/claude-scholar · 55 tokens