tdd

tdd is a skill for Claude Code, Codex from open-gsd/gsd-pi. It costs 73 tokens per session (1,452 once invoked), scanned A, original, MIT.

A test-driven development workflow that builds software through small behavior-focused steps. TDD means writing a test that fails, making it pass, and then cleaning up the code before continuing.

In plain words
What is it for?
Use it for bug fixes, new module interfaces, API endpoints, and other features with a clear expected result. It is designed for vertical slices, meaning each step delivers a small end-to-end piece.
Why use it?
It turns a feature or bug fix into a sequence of observable decisions and checks. Tests describe the public behavior, so the code can be reorganized without changing what the tests verify.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for bug fixes, new module interfaces, API endpoints, and other features with a clear expected result. It is designed for vertical slices, meaning each step delivers a small end-to-end piece.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/open-gsd/gsd-pi/tdd
About the project

GSD Pi is a command-line coding agent and project workflow system that plans, implements, verifies, and tracks software work through milestones, tasks, Git worktrees, and stored project notes. It is for developers who want structured, longer-running agent sessions using different model providers. The catalogue entries extend GSD Pi with skills and agents.

open-gsd/gsd-pi · 1,334 stars · on GitHub · opengsd.net

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 open-gsd/gsd-pi --skill tdd
Clone the repo
git clone --depth 1 https://github.com/open-gsd/gsd-pi

Made for: Claude Code, Codex.

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/open-gsd/gsd-pi/tdd/github.svg)](https://agentmods.dev/skills/open-gsd/gsd-pi/tdd)
Your own site
<a href="https://agentmods.dev/skills/open-gsd/gsd-pi/tdd"><img src="https://agentmods.dev/badge/skills/open-gsd/gsd-pi/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/open-gsd/gsd-pi/tdd"><img src="https://agentmods.dev/badge/skills/open-gsd/gsd-pi/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,452 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00073 $0.01452
Opus 5.5 $0.00029 $0.00581
Sonnet 5.5 $0.00015 $0.00290
Haiku 4.5 $0.00007 $0.00145

Measured 17d ago against content hash 2387f59a037d, 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 17d 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.

src/resources/skills/tdd/SKILL.md · 115 lines

How it starts

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

Invocation points:

  • Task plan calls out behavior with a clear external contract (pure function, API endpoint, module boundary)
  • Bug fix — write the failing repro test first, then fix
  • Refactor into a new module — write the tests against the new interface first

Do not use this skill for:

  • Exploratory spikes (use /gsd start spike — no production code ships)
  • Pure UI polish where visual verification beats unit tests
  • Scripts that run once and are deleted

<core_principle> TESTS VERIFY BEHAVIOR THROUGH PUBLIC INTERFACES, NOT IMPLEMENTATION DETAILS. A good test reads like a specification and survives refactors. A test that mocks internals or asserts private state fails every time you clean up the code — that is a bad test pretending to be a good one.

VERTICAL SLICES, NOT HORIZONTAL LAYERS. Writing all tests upfront ("horizontal slicing") produces tests for behavior you imagined, not behavior the code actually exhibits. One tracer bullet at a time: write one test, make it pass, learn, write the next.

NEVER REFACTOR WHILE RED. Refactoring without a passing test means you are guessing whether you broke something. Get to green first. Then clean up. Then go red again for the next slice. </core_principle>

Step 1: Confirm the interface

Before writing anything:

  1. What is the public interface? (function signature, HTTP route, module exports)
  2. Which behaviors matter most? List them in order of how badly you'd want to know if they broke.
  3. What does a "caller" look like? Write one example call in prose.

If the user has not supplied these, ask — one round, 1–3 questions.

Read the full file on GitHub · 115 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. 17d ago Changed 2387f59a037d
  2. 20d ago Changed · +2 lines 49c0ea1da5c8
  3. 1mo ago First seen · 113 lines · 73 tokens per session scan A a7caac31e398

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository open-gsd/gsd-pi (1,334 stars, last pushed today), licensed MIT. It adds 73 tokens to every session and 1,452 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.