Agent skill

Test Driven Development

by cbrock84 in cbrock84/headcount

Drives implementation by writing a failing test first, then the smallest code that passes it.

MITAuto-check passedTesting & QA

Install Test Driven Development

skills CLI
$ npx skills add cbrock84/headcount --skill test-driven-development -a claude-code

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

GitHub CLI
$ gh skill install cbrock84/headcount test-driven-development --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/cbrock84/headcount.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/technology/skills/test-driven-development .claude/skills/test-driven-development && 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
test-driven-development
GitHub stars
2k
Token cost
~672 tokens
SKILL.md length
381 words
Files
1
Skills in repo
175
Repo updated
First seen
Licence
MIT

At a glance

Drives implementation by writing a failing test first, then the smallest code that passes it.

  • Works in 3 steps: Red — write one test that fails for the… → Green — the smallest change that makes… → Refactor — clean up with the test green.…
  • Decide what is worth testing and what is not
  • SKILL.md covers The loop, What to test, Bugs and Rules, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Test Driven Development is an agent skill from cbrock84/headcount. Drives implementation by writing a failing test first, then the smallest code that passes it. Use this before writing implementation code for any feature or bugfix, when a bug needs a regression test, when existing code is hard to change safely, or when someone asks whether a change is covered. Also use to decide what is worth testing and what is not.

Its SKILL.md is about 670 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: An agent organization structured as a company — 15+ departments, 125+ skills, each independently installable, citing the standards and regulators that settle the question. Runs… The licence is MIT.

When your agent uses it

  • Decide what is worth testing and what is not
  • Tasks that involve Test-driven development

Example prompts

  • “Use the test-driven-development skill to drive implementation by writing a failing test first, then the smallest code that passes it”
  • “/test-driven-development”

Workflow steps

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

  1. Red — write one test that fails for the right reason. Run it. A test that passes immediately
  2. Green — the smallest change that makes it pass. Ugly is fine here.
  3. Refactor — clean up with the test green. If it goes red, you changed behavior, not structure.

What it can do on your machine

Read from SKILL.md and the folder at commit 98d1c17. 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

Test Driven Development loads about 672 tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 381 words of instructions outside code blocks.

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

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 cbrock84/headcount at commit 98d1c17, republished under its MIT licence (© cbrock84). 381 words, ~672 tokens.

Download SKILL.mdSave it as .claude/skills/test-driven-development/SKILL.md (or your agent's skills folder).
name
test-driven-development
description
Drives implementation by writing a failing test first, then the smallest code that passes it. Use this before writing implementation code for any feature or bugfix, when a bug needs a regression test, when existing code is hard to change safely, or when someone asks whether a change is covered. Also use to decide what is worth testing and what is not.

Test-driven development

The loop

  1. Red — write one test that fails for the right reason. Run it. A test that passes immediately is testing nothing; a test that errors instead of failing is testing the wrong thing.
  2. Green — the smallest change that makes it pass. Ugly is fine here.
  3. Refactor — clean up with the test green. If it goes red, you changed behavior, not structure.

Never skip step 1. Writing the test after the code produces a test shaped to the implementation, which is the one shape that cannot catch the implementation being wrong.

What to test

Test behavior at the boundary a caller actually depends on. For each unit ask: if this broke silently, who notices and how? If the answer is nobody, delete the code rather than test it.

  • Test: branching logic, boundary conditions, error paths, anything with a past bug, contracts between modules.
  • Do not test: getters, framework behavior, private helpers reachable only through a public path already covered, exact wording of log lines.

Bugs

Every bug gets a failing test before the fix, reproducing it at the smallest scope that shows it. That test is the proof the bug existed and the guard that it stays fixed. A fix without one is a claim.

Show full SKILL.md (171 more words)Show less

Rules

  • One behavior per test. A test asserting five things tells you almost nothing when it fails.
  • The test name states the behavior, not the method: rejects_expired_token, not test_auth.
  • Never weaken an assertion to get green. If a test is inconvenient, the design is telling you something.
  • Never mock what you own — mock the network and the clock, not your own modules. Mocking your own code tests the mock.

Never

  • Write the test after the code and call it test-driven. You will test what you built rather than what was required.
  • Skip watching the test fail. A test that has never failed proves nothing.
  • Delete or skip a failing test to unblock a release. Fix it, or revert what broke it.
  • Treat a coverage number as the goal. It counts lines executed, not behavior pinned down.

Return contract

Report the tests added, what each pins down, what is deliberately untested and why, and the actual command you ran with its output. "Tests pass" without the command output is not a result.

© cbrock84, 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 plugins/technology/skills/test-driven-development of cbrock84/headcount.

Open the folder on GitHubat commit 98d1c17

Compare with similar skills

Test Driven Development 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.

Test Driven Development compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Driven Development this skillcbrock84/headcount2k—~672Automated 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…

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

More from cbrock84/headcount

All 175 skills in this repo
  • Agent Hierarchy

    cbrock84/headcount

    Designs orchestrator-and-subagent hierarchies for a repository — splitting agents by exclusive write surface, pairing every producer with an independent auditor, and enforcing the split with a…

    2k GitHub stars~1.2k tokensUpdated 21 days ago
    Auto-check passed
  • Access And Identity

    cbrock84/headcount

    Designs and audits who can reach what — authentication, authorization models, privileged access, service credentials, and joiner-mover-leaver process.

    2k GitHub stars~1.1k tokensUpdated 21 days ago
    Auto-check passed
  • Account Based Marketing

    cbrock84/headcount

    Concentrates marketing and sales effort on a named set of accounts rather than on volume — qualifying whether the model fits your economics at all, building the account list and the buying group…

    2k GitHub stars~1.2k tokensUpdated 21 days ago
    Auto-check passed
  • Activation

    cbrock84/headcount

    Gets new users from signup to first real value — signup flow, onboarding, time-to-value, and the early experience that determines whether someone becomes a user or a lapsed account.

    2k GitHub stars~865 tokensUpdated 21 days ago
    Auto-check passed
  • AI Research Analyst

    cbrock84/headcount

    Produces executive-level research — market sizing, competitor mapping, trend analysis, and strategic intelligence — grounded in cited sources with the confidence in each claim made explicit.

    2k GitHub stars~916 tokensUpdated 21 days ago
    Auto-check passed
  • AI Search Optimization

    cbrock84/headcount

    Optimizes for AI assistants and AI-generated answers — being retrievable, being cited, and being represented accurately when a model answers on your behalf.

    2k GitHub stars~829 tokensUpdated 21 days ago
    Auto-check passed

Categories

Questions about Test Driven Development

What does Test Driven Development do?

Drives implementation by writing a failing test first, then the smallest code that passes it. Test Driven Development is an agent skill from cbrock84/headcount. Drives implementation by writing a failing test first, then the smallest code that passes it.

When should I use Test Driven Development?

Test Driven Development fits situations like: decide what is worth testing and what is not; tasks that involve Test-driven development.

How do I install Test Driven Development in Claude Code?

Run `npx skills add cbrock84/headcount --skill test-driven-development -a claude-code`. Or copy the skill folder (plugins/technology/skills/test-driven-development in cbrock84/headcount) into .claude/skills/test-driven-development in your project. Claude Code loads it when a task matches its description.

How do I install Test Driven Development in Codex?

Run `npx skills add cbrock84/headcount --skill test-driven-development -a codex`. Or copy the skill folder (plugins/technology/skills/test-driven-development in cbrock84/headcount) into .agents/skills/test-driven-development in your project. Codex loads it when a task matches its description.

Can I use Test Driven Development 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 cbrock84/headcount --skill test-driven-development -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-driven-development, .gemini/skills/test-driven-development, .github/skills/test-driven-development and .opencode/skills/test-driven-development in your project.

What does Test Driven Development need to run?

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

Does Test Driven Development 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 Test Driven Development 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 Test Driven Development use?

Test Driven Development 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 Test Driven Development use?

About 672 tokens (SKILL.md is roughly 2.7k 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 Test Driven Development?

Skills that share tags, products or a category with Test Driven Development: 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 Test Driven Development?

cbrock84 (a GitHub user) maintains it in cbrock84/headcount, which has 2,007 GitHub stars. The repository holds 175 skills in this directory. The repository was last updated on September 17, 2026.

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