Agent skill

TDD

by ccusage in ccusage/ccusage

Guides t-wada Red-Green-Refactor TDD for ccusage logic changes.

Custom licenceAuto-check passedTesting & QA

Install TDD

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

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

GitHub CLI
$ gh skill install ccusage/ccusage 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/ccusage/ccusage.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/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
19k
Token cost
~665 tokens
SKILL.md length
318 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
Custom licence

At a glance

Guides t-wada Red-Green-Refactor TDD for ccusage logic changes.

  • Works in 5 steps: Sketch the behaviors as placeholders —… → Red — write the failing test and confirm… → Green — write the minimum production… → …
  • Implementing a feature
  • SKILL.md covers Cycle and Focused runs
  • Calls just and node

What it does

TDD is an agent skill from ccusage/ccusage. Guides t-wada Red-Green-Refactor TDD for ccusage logic changes. Use when implementing a feature, writing a regression test for a bug, or refactoring Rust or TypeScript behavior test-first.

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. It works with Rust and TypeScript.

When your agent uses it

  • Implementing a feature
  • Writing a regression test for a bug
  • Refactoring Rust
  • TypeScript behavior test-first

Example prompts

  • “Use the tdd skill to guide t-wada Red-Green-Refactor TDD for ccusage logic changes”
  • “/tdd”

Workflow steps

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

  1. Sketch the behaviors as placeholders — it.todo(...) in Node test, #[ignore] in
  2. Red — write the failing test and confirm it fails for the expected reason.
  3. Green — write the minimum production code that passes. Fake it, make it real,
  4. Refactor — clean up test and production code while everything stays green.
  5. Run the affected tests after each green and each refactor step. Full-suite runs are

What it can do on your machine

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

    Shell commands in SKILL.md call:

    • just
    • node

    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 665 tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 318 words of instructions outside code blocks.

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

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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 318 words (~665 tokens).

“Logic changes here — bug fixes, features, refactors — follow t-wada style Red-Green-Refactor. For unfamiliar APIs, prototypes, and data exploration, execute-inspect-adjust first; not every probe needs a test.”

— opening of SKILL.md by ccusage, Custom licence
name
tdd

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/tdd of ccusage/ccusage.

Open the folder on GitHubat commit 5ca8d8e

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 skillccusage/ccusage19k—~665Automated safety check: PassCustom licence
Growing Outside In Systemslexler/skill-factory2391 repos~1.9kAutomated safety check: PassApache-2.0
Testingpikax/verter112—~8kAutomated safety check: PassMIT
Rust TDD Workflowrtk-ai/rtk83k—~753Automated safety check: NotesApache-2.0
RTK Filter TDD in Rustrtk-ai/rtk83k—~1.9kAutomated safety check: NotesApache-2.0
Supercovsupercorp-ai/supercov1501 repos~415Automated safety check: PassMIT

Similar skills

  • Growing Outside In Systems

    lexler/skill-factory

    Drive feature development using Outside-In TDD with Hexagonal Architecture.

    239 GitHub starsUsed in 1 repo~1.9k tokens
    Testing & QAAuto-check passed
  • Testing

    pikax/verter

    Testing patterns, TDD workflow, TypeScript and Rust test conventions, sourcemap testing, and test execution hygiene for Verter

    112 GitHub stars~8k tokensUpdated today
    Testing & QAAuto-check passed
  • Enforces red-green-refactor for Rust work, with idiomatic test patterns, a naming convention and a pre-commit gate of cargo fmt, clippy and test.

    83k GitHub stars~753 tokensUpdated today
    Testing & QAAuto-check: notes
  • Enforces red-green-refactor for new RTK output filters in Rust, using real captured fixtures, snapshot tests with insta and token-savings assertions.

    83k GitHub stars~1.9k tokensUpdated today
    Testing & QAAuto-check: notes
  • Supercov

    supercorp-ai/supercov

    Measures test coverage and code quality in a repository with the supercov CLI, and turns what it finds into small, focused tests or fixes.

    150 GitHub starsUsed in 1 repo~415 tokens
    Testing & QAAuto-check passed
  • TDD Red Green Refactor

    google-labs-code/stitch-sdk

    Official

    Enforces a disciplined Red-Green-Refactor (TDD) workflow in TypeScript/Node.js.

    1.8k GitHub stars~755 tokensUpdated 7 days ago
    Testing & QAAuto-check passed

More from ccusage/ccusage

All 17 skills in this repo
  • Nushell

    ccusage/ccusage

    Guides ccusage Nushell scripts. An agent skill from ccusage/ccusage.

    19k GitHub stars~938 tokensUpdated today
    Auto-check passed
  • Rust Binary Size

    ccusage/ccusage

    Guides Rust binary size reduction for ccusage. An agent skill from ccusage/ccusage.

    19k GitHub stars~591 tokensUpdated today
    Auto-check passed
  • Skill Creator

    ccusage/ccusage

    Guides repo-local skill creation and updates. An agent skill from ccusage/ccusage.

    19k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Commit

    ccusage/ccusage

    Creates atomic Conventional Commits. An agent skill from ccusage/ccusage.

    19k GitHub stars~722 tokensUpdated today
    Auto-check passed
  • Create PR

    ccusage/ccusage

    Runs the full PR lifecycle. An agent skill from ccusage/ccusage.

    19k GitHub stars~646 tokensUpdated today
    Auto-check passed
  • Cmux Debug

    ccusage/ccusage

    Verifies ccusage terminal output in a real cmux pane. An agent skill from ccusage/ccusage.

    19k GitHub stars~466 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about TDD

What does TDD do?

Guides t-wada Red-Green-Refactor TDD for ccusage logic changes. TDD is an agent skill from ccusage/ccusage. Guides t-wada Red-Green-Refactor TDD for ccusage logic changes.

When should I use TDD?

TDD fits situations like: implementing a feature; writing a regression test for a bug; refactoring Rust; typeScript behavior test-first.

How do I install TDD in Claude Code?

Run `npx skills add ccusage/ccusage --skill tdd -a claude-code`. Or copy the skill folder (.agents/skills/tdd in ccusage/ccusage) 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 ccusage/ccusage --skill tdd -a codex`. Or copy the skill folder (.agents/skills/tdd in ccusage/ccusage) 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 ccusage/ccusage --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?

Going by SKILL.md and its folder, TDD needs the command-line tools its instructions call (just and node).

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 has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does TDD use?

About 665 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 TDD?

Skills that share tags, products or a category with TDD: Growing Outside In Systems (lexler/skill-factory, 239 stars), Testing (pikax/verter, 112 stars), Rust TDD Workflow (rtk-ai/rtk, 83k stars) and RTK Filter TDD in Rust (rtk-ai/rtk, 83k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains TDD?

ccusage (a GitHub organization) maintains it in ccusage/ccusage, which has 18,912 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 8, 2026.

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