tdd

tdd is a skill for Claude Code from jellydn/my-ai-tools. It costs 17 tokens per session (757 once invoked), scanned A, original, MIT.

A guide to test-driven development (TDD), a method where you write a failing test, make it pass, and then improve the code.

In plain words
What is it for?
It is for starting TDD sessions, creating failing tests, implementing code to pass them, refactoring safely, watching tests, and checking progress.
Why use it?
It provides small, repeated feedback steps that clarify expected behavior and help keep changes covered by tests.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions Codex; built for cline; mentions OpenCode.

Good fit It is for starting TDD sessions, creating failing tests, implementing code to pass them, refactoring safely, watching tests, and checking progress.

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

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 tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/jellydn/my-ai-tools/tdd/github.svg)](https://agentmods.dev/skills/jellydn/my-ai-tools/tdd)
Your own site
<a href="https://agentmods.dev/skills/jellydn/my-ai-tools/tdd"><img src="https://agentmods.dev/badge/skills/jellydn/my-ai-tools/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/jellydn/my-ai-tools/tdd"><img src="https://agentmods.dev/badge/skills/jellydn/my-ai-tools/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 757 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.00017 $0.00757
Opus 5 $0.00009 $0.00378
Sonnet 5 $0.00003 $0.00151
Haiku 4.5 $0.00002 $0.00076

Measured 10d ago against content hash 85952c6abf8b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d 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.

configs/amp/plugins/my-ai-tools-skills/skills/tdd/SKILL.md · 107 lines

How it starts

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

Test-Driven Development (TDD)

Guides you through the complete TDD workflow with Red-Green-Refactor cycle.

Usage

/tdd <ACTION> [ARGUMENTS]

Actions

  • start - Initialize TDD session for a feature
  • red <TEST_NAME> - Create failing test (Red phase)
  • green - Run tests and implement code (Green phase)
  • refactor - Guide refactoring process (Refactor phase)
  • cycle - Run complete Red-Green-Refactor cycle
  • watch - Start test watcher for continuous feedback
  • status - Show current test status and next steps

TDD Principles

The Red-Green-Refactor Cycle

  1. Red: Write a failing test that defines desired behavior
  2. Green: Write minimal code to make the test pass
  3. Refactor: Improve code quality while keeping tests green

Best Practices

  • Write tests first - Tests define the interface and behavior
  • Small steps - Make tiny, incremental changes
  • Fast feedback - Run tests frequently for immediate validation
  • Clean code - Refactor regularly to maintain quality
  • One concept per test - Keep tests focused and atomic
  • AAA Pattern - Structure tests as Arrange, Act, Assert
  • Black-box testing - Test only public methods and behavior, not implementation details

Process

For "start ":

  1. Initialize TDD session for the feature
  2. Create or identify target source file
  3. Create corresponding test file if it doesn't exist
  4. Explain the feature requirements and acceptance criteria

For "red <TEST_NAME>":

  1. Create a failing test that describes the desired behavior
  2. Ensure test fails for the right reason (not syntax errors)
  3. Run tests to confirm red state
  4. Explain what the test is validating

For "green":

  1. Implement minimal code to make failing tests pass
  2. Focus on making tests pass, not perfect code
  3. Run tests to confirm green state
  4. Write just enough code to pass the test

For "refactor":

  1. Improve code quality while maintaining green tests
  2. Remove duplication and improve design
  3. Run tests continuously during refactoring
  4. Make one refactoring change at a time

Read the full file on GitHub · 107 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. 10d ago First seen · 107 lines · 17 tokens per session scan A 85952c6abf8b

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository jellydn/my-ai-tools (120 stars, last pushed today), licensed MIT. It adds 17 tokens to every session and 757 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

test-driven-development

Use when implementing any feature or bugfix, before writing implementation code.

obra/superpowers · 17 tokens

test-driven-development

Drives development with tests using the red-green-refactor loop. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.

addyosmani/agent-skills · 57 tokens

writing-skills

A guide for creating and testing reusable instructions for AI agents, called skills. It applies test-driven development, or TDD—the practice of writing tests before implementation—to instruction documents.

jnMetaCode/superpowers-zh · 23 tokens

test-driven-development

Test-driven development, or TDD, is a way to build software by writing a test that fails, adding the smallest code that makes it pass, and then cleaning up the code. These instructions require that process for features, bug fixes, refactors, and behavior changes.

jnMetaCode/superpowers-zh · 20 tokens

skillshare-implement-feature

Implement a feature from a spec file or description using TDD workflow. Use this skill whenever the user asks to: add a new CLI command, implement a feature from a spec, build new functionality, add a flag, create a new internal package, or write Go code for skillshare. This skill enforces test-first development…

runkids/skillshare · 114 tokens

old-coder

Evidence-first development — surround the implementation with an executable spec and a gauntlet of constraints (tests, types, coverage, mutation) so line-by-line review becomes optional. Use when the user explicitly asks for high-assurance or evidence-first work ("reliable", "TDD", "prove it works", "I won't read the…

AmazingAng/old-coder · 116 tokens