Agent skill

TDD

by poshan0126 in poshan0126/dotclaude

Test-Driven Development loop. An agent skill from poshan0126/dotclaude.

MITAuto-check passedTesting & QA

Install TDD

skills CLI
$ npx skills add poshan0126/dotclaude --skill tdd -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install poshan0126/dotclaude tdd --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/poshan0126/dotclaude.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/tdd .claude/skills/tdd && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tdd
GitHub stars
870
Token cost
~779 tokens
SKILL.md length
461 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Test-Driven Development loop. An agent skill from poshan0126/dotclaude.

  • Works in 4 steps: Write ONE test for the smallest next… → The test must → Run the test. It MUST fail. If it… → …
  • Tasks that involve Test-driven development
  • SKILL.md covers The TDD Cycle, Choosing What to Test Next, Rules and Output
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

TDD is an agent skill from poshan0126/dotclaude. Test-Driven Development loop. Write a failing test first, then the minimum code to pass it, then refactor. Repeat.

Its SKILL.md is about 780 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test-driven development. The repository describes itself as: The standard .claude/ folder structure for everyday development. The licence is MIT.

When your agent uses it

  • Tasks that involve Test-driven development

Example prompts

  • “/tdd”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Write ONE test for the smallest next behavior (not the whole feature)
  2. The test must
  3. Run the test. It MUST fail. If it passes, either
  4. Verify the failure message makes sense. It should tell you what's missing

What it can do on your machine

Read from SKILL.md and the folder at commit 94b84b9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

TDD loads about 779 tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 461 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~30
When it runs · the whole SKILL.md, loaded when a task matches
~779

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from poshan0126/dotclaude at commit 94b84b9, republished under its MIT licence (© poshan0126). 461 words, ~779 tokens.

Download SKILL.mdSave it as .claude/skills/tdd/SKILL.md (or your agent's skills folder).
name
tdd
description
Test-Driven Development loop. Write a failing test first, then the minimum code to pass it, then refactor. Repeat.
argument-hint
[feature description or function signature]
disable-model-invocation
true

Build the following using strict Test-Driven Development:

Feature: $ARGUMENTS

The TDD Cycle

Repeat this cycle for each behavior. Never skip steps.

Red: Write a Failing Test
  1. Write ONE test for the smallest next behavior (not the whole feature)
  2. The test must:
    • Describe the behavior in its name: should return 0 for empty cart
    • Use Arrange-Act-Assert structure
    • Assert specific values, not vague truths
  3. Run the test. It MUST fail. If it passes, either:
    • The behavior already exists (skip to the next behavior)
    • The test is wrong (it's not testing what you think. Fix it)
  4. Verify the failure message makes sense. It should tell you what's missing
Green: Write the Minimum Code to Pass
  1. Write the simplest, most obvious code that makes the failing test pass
  2. Don't generalize. Don't make it elegant. Don't handle cases the test doesn't cover.
  3. Hardcoding is fine if only one test exists for that path. The next test will force generalization
  4. Run the test. It MUST pass. If it doesn't, fix the code (not the test. The test defined the behavior)
  5. Run ALL tests. Nothing previously passing should break.
Refactor: Clean Up Without Changing Behavior
  1. Look for: duplication, unclear names, functions doing too much, magic values
  2. Make ONE improvement at a time
  3. Run ALL tests after each change. If anything breaks, undo immediately.
  4. Stop refactoring when the code is clean enough. Don't gold-plate
Show full SKILL.md (222 more words)Show less

Choosing What to Test Next

Work from simple to complex:

  1. Degenerate cases. Null input, empty collection, zero
  2. Happy path. The simplest valid input
  3. Variations. Different valid inputs that exercise different branches
  4. Edge cases. Boundary values, max sizes, special characters
  5. Error cases. Invalid input, failures, exceptions
  6. Integration. How this connects to the rest of the system

Each test should require a small code change. If you need to write more than ~10 lines of production code to pass a test, the test is too big. Split it.

Rules

  • Never write production code without a failing test that demands it.
  • Never write more than one failing test at a time. One red → green → refactor cycle at a time.
  • The test drives the design. If the code is hard to test, the design is wrong. Change the design, not the test approach.
  • Don't mock what you own. If you need to mock your own code to test it, the code needs restructuring.
  • Commit after each green+refactor cycle. Small, passing, meaningful commits.

Output

After each cycle, briefly state:

  • Test: what behavior was added
  • Code: what changed to make it pass
  • Refactor: what was cleaned up (or "none needed")

When the feature is complete, provide a summary of all behaviors covered and any gaps that would need integration or manual testing.

© poshan0126, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/tdd of poshan0126/dotclaude.

Open the folder on GitHubat commit 94b84b9

Compare with similar skills

TDD next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

TDD compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
TDD this skillposhan0126/dotclaude870—~779Automated safety check: PassMIT
TDDpietheinstrengholt/rssmonster56430 repos~906Automated safety check: PassMIT
TDD WorkflowhellangleZ/burn-in-cceverywhere-ralph11211 repos~2.4kAutomated safety check: PassNone
TDDsanity-io/sanity6.4k20 repos~1kAutomated safety check: PassMIT
Test Driven Developmentfarm-fe/farm5.6k51 repos~2.5kAutomated safety check: PassMIT
Tapd Story PipelineTencentBlueKing/bk-bcs840—~2.6kAutomated safety check: PassCustom licence

Similar skills

  • TDD

    pietheinstrengholt/rssmonster

    Test-driven development. An agent skill from pietheinstrengholt/rssmonster.

    564 GitHub starsUsed in 30 repos~906 tokens
    Testing & QAAuto-check passed
  • TDD Workflow

    hellangleZ/burn-in-cceverywhere-ralph

    A skill your agent uses when writing new features, fixing bugs, or refactoring code.

    112 GitHub starsUsed in 11 repos~2.4k tokens
    Testing & QAAuto-check passed
  • TDD

    sanity-io/sanity

    Official

    Test-driven development with red-green-refactor loop. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 20 repos~1k tokens
    Testing & QAAuto-check passed
  • A skill your agent uses when implementing any feature or bugfix, before writing implementation code

    5.6k GitHub starsUsed in 51 repos~2.5k tokens
    Testing & QAAuto-check passed
  • Tapd Story Pipeline

    TencentBlueKing/bk-bcs

    单需求实现流水线——把一个 TAPD 需求从零推进到代码提交。自动串联技术澄清、 开发计划、任务拆分、TDD 实现、架构/安全校验、代码提交六个阶段。

    840 GitHub stars~2.6k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Absolute Init

    maddhruv/absolute

    One-time setup for absolute: interview how you want it to behave (output style, autonomy, TDD strictness, spec dir, families) + detect the stack once, then write .absolute.config.json (project…

    219 GitHub starsUsed in 1 repo~3k tokens
    Testing & QAAuto-check passed

More from poshan0126/dotclaude

All 14 skills in this repo
  • Session Catchup and Handoff

    poshan0126/dotclaude

    Rebuilds working context after /clear by reading a handoff note and the branch's git state, or writes that handoff note before a session ends.

    870 GitHub stars~811 tokensUpdated 1 mo ago
    Auto-check passed
  • Context Budget Check

    poshan0126/dotclaude

    Estimates the per-turn token cost of a project's .claude folder and CLAUDE.md, split into always-loaded, path-scoped and invoked-only files, and flags what runs over budget.

    870 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Codebase Onboarding Tour

    poshan0126/dotclaude

    Builds a quick mental model of an unfamiliar codebase by dispatching read-only Explore subagents and merging their findings into one brief.

    870 GitHub stars~858 tokensUpdated 1 mo ago
    Auto-check passed
  • Parallel Specialist PR Review

    poshan0126/dotclaude

    Reviews a pull request, staged changes or a file by sending the diff to specialist reviewer agents in parallel, then merges their findings into one compact report.

    870 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • dotclaude Project Setup

    poshan0126/dotclaude

    Scans a codebase, interviews you, and installs only the justified Claude Code rules, hooks, agents and skills, tailored to the project's stack.

    870 GitHub stars~3.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Ship Changes

    poshan0126/dotclaude

    Walks through commit, push and pull request creation for the current changes, asking you to confirm the files, message, push and PR text at each step.

    870 GitHub stars~953 tokensUpdated 1 mo ago
    Auto-check: notes

Categories

Questions about TDD

What does TDD do?

Test-Driven Development loop. An agent skill from poshan0126/dotclaude. TDD is an agent skill from poshan0126/dotclaude. Test-Driven Development loop.

When should I use TDD?

TDD fits situations like: tasks that involve Test-driven development.

How do I install TDD in Claude Code?

Run `npx skills add poshan0126/dotclaude --skill tdd -a claude-code`. Or copy the skill folder (skills/tdd in poshan0126/dotclaude) into .claude/skills/tdd in your project. Claude Code loads it when a task matches its description.

How do I install TDD in Codex?

Run `npx skills add poshan0126/dotclaude --skill tdd -a codex`. Or copy the skill folder (skills/tdd in poshan0126/dotclaude) into .agents/skills/tdd in your project. Codex loads it when a task matches its description.

Can I use TDD in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add poshan0126/dotclaude --skill tdd -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tdd, .gemini/skills/tdd, .github/skills/tdd and .opencode/skills/tdd in your project.

What does TDD need to run?

SKILL.md names no scripts, command-line tools or credentials: TDD is instructions for the agent only.

Does TDD access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is TDD safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does TDD use?

TDD is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does TDD use?

About 779 tokens (SKILL.md is roughly 3.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to TDD?

Skills that share tags, products or a category with TDD: TDD (pietheinstrengholt/rssmonster, 564 stars), TDD Workflow (hellangleZ/burn-in-cceverywhere-ralph, 112 stars), TDD (sanity-io/sanity, 6.4k stars) and Test Driven Development (farm-fe/farm, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains TDD?

poshan0126 (a GitHub user) maintains it in poshan0126/dotclaude, which has 870 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on August 27, 2026.

Source: poshan0126/dotclaude on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.