test-driven-development

test-driven-development is a skill for Claude Code from zekiriabd/SDD-Pro. It costs 141 tokens per session (1,804 once invoked), scanned A, original, Apache-2.0.

A test-first development workflow built around three steps: write a failing test, write the smallest code that passes it, then improve the code. TDD means test-driven development.

In plain words
What is it for?
Adding functions, classes, endpoints, or components while requiring a test to define their expected behaviour first.
Why use it?
It makes the intended behaviour explicit before production code is written and helps prevent changes that do not have a verified contract.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event.

Good fit Adding functions, classes, endpoints, or components while requiring a test to define their expected behaviour first.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zekiriabd/sdd-pro/test-driven-development
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 zekiriabd/SDD-Pro --skill test-driven-development
Clone the repo
git clone --depth 1 https://github.com/zekiriabd/SDD-Pro

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 test-driven-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/zekiriabd/sdd-pro/test-driven-development.svg)](https://agentmods.dev/skills/zekiriabd/sdd-pro/test-driven-development)
Your own site
<a href="https://agentmods.dev/skills/zekiriabd/sdd-pro/test-driven-development"><img src="https://agentmods.dev/badge/skills/zekiriabd/sdd-pro/test-driven-development.svg" alt="Measured on agentmods" height="20"></a>
Per session 141 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,804 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.00141 $0.01804
Opus 5 $0.00071 $0.00902
Sonnet 5 $0.00028 $0.00361
Haiku 4.5 $0.00014 $0.00180

Measured 3d ago against content hash 52913a3e1312, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

test-driven-development 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 3d 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.

.sdd/skills/test-driven-development/SKILL.md · 121 lines

How it starts

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

Skill — Test-Driven Development (RED-GREEN-REFACTOR)

Emprunt direct Superpowers v5.1 : "NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST. Delete code written before tests — start over." Ce skill matérialise le contrat test-first au niveau du pipeline SDD_Pro, complémentaire au QA agent (qui RUN les tests) et à l'API Gate (qui les vérifie post-hoc).

L'invariant non-négociable

RED   → écrire UN test qui échoue (et le faire échouer pour la bonne raison)
GREEN → écrire le code MINIMAL pour le passer
REFACTOR → améliorer code + tests tant que tests restent verts

Aucune ligne de code de production sans un test écrit avant qui le justifie. Si l'agent réalise qu'il a écrit du code sans test : supprimer le code, écrire le test, recommencer en RED.

Quand ce skill s'active

Intention détectée Action TDD
"Écris une fonction qui …" Skill bloque → "écris d'abord le test qui définit le contrat"
"Ajoute un endpoint POST /api/foo" Skill bloque → "écris d'abord le test d'intégration HTTP du happy path"
"Crée une classe UserService" Skill bloque → "écris d'abord 1 test du method principal"
Création fichier `*.cs *.ts
"Je vais refactor X" Skill ALLOWS (refactor = test reste vert ; pas de nouveau contrat)
"Je vais corriger un bug" Skill exige un test de régression rouge AVANT le fix

Le cycle complet (étapes)

1. RED — écrire le test rouge

  • Identifier l'unité minimale à tester (1 behavior, pas N)
  • Écrire le test dans le bon répertoire :
    • .NET : workspace/src/{BackendName}.Tests/Unit/
    • Node/TS : __tests__/ ou *.test.ts à côté
    • Python : tests/test_*.py
    • Kotlin : src/test/kotlin/
  • Lancer le test, vérifier qu'il échoue — et qu'il échoue pour la bonne raison (assertion failure, pas import error / syntax error)
  • Si le test passe immédiatement → soit le code existe déjà, soit le test ne teste rien. STOP, repenser.

Read the full file on GitHub · 121 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. 3d ago First seen · 121 lines · 141 tokens per session scan A 52913a3e1312

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository zekiriabd/SDD-Pro (191 stars, last pushed 4d ago), licensed Apache-2.0. It adds 141 tokens to every session and 1,804 once invoked, about $0.0007 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-09-03.