Agent skill

Test Driven Development

by ravila4 in ravila4/claude-adhd-skills

(TDD) Use when implementing any feature or bugfix. An agent skill from ravila4/claude-adhd-skills.

MITAuto-check passedTesting & QA

Install Test Driven Development

skills CLI
$ npx skills add ravila4/claude-adhd-skills --skill test-driven-development -a claude-code

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

GitHub CLI
$ gh skill install ravila4/claude-adhd-skills 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/ravila4/claude-adhd-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/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
157
Token cost
~1.2k tokens
SKILL.md length
514 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

(TDD) Use when implementing any feature or bugfix. An agent skill from ravila4/claude-adhd-skills.

  • Works in 2 steps: The Logic Gate — Triage. Does this piece… → The Iron Rule — For everything that…
  • Implementing any feature
  • SKILL.md covers The Two Gates, Gate 1: The Logic Gate, Gate 2: The Iron Rule and Red-Green-Refactor Cycle, plus 4 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 ravila4/claude-adhd-skills. (TDD) Use when implementing any feature or bugfix. Apply the Logic Gate to identify what needs tests, then use the Iron Rule for strict test-first development on logic.

Its SKILL.md is about 1.2k 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: Claude Code skills and hooks for staying organized with AI agents. The licence is MIT.

When your agent uses it

  • Implementing any feature
  • Tasks that involve Test-driven development

Example prompts

  • “/test-driven-development”

Workflow steps

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

  1. The Logic Gate — Triage. Does this piece contain logic?
  2. The Iron Rule — For everything that passes the Logic Gate, strict TDD applies.

What it can do on your machine

Read from SKILL.md and the folder at commit f99e0a3. 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 (its code samples are mermaid).

    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 1.2k tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 514 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
~1.2k

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 ravila4/claude-adhd-skills at commit f99e0a3, republished under its MIT licence (© ravila4). 514 words, ~1,155 tokens.

Download SKILL.mdSave it as .claude/skills/test-driven-development/SKILL.md (or your agent's skills folder).
name
test-driven-development
description
(TDD) Use when implementing any feature or bugfix. Apply the Logic Gate to identify what needs tests, then use the Iron Rule for strict test-first development on logic.

Test-Driven Development (TDD)

The Two Gates

Before writing any code, pass it through two gates:

  1. The Logic Gate — Triage. Does this piece contain logic?
  2. The Iron Rule — For everything that passes the Logic Gate, strict TDD applies.
mermaid
flowchart TD
    A[New code to write] --> B[Decompose into pieces]
    B --> C{{"Logic Gate: Does this piece contain logic?"}}
    C -->|"Conditionals, transformations, validation, state changes, error handling"| D["Iron Rule: TDD"]
    C -->|"Dataclasses, config, thin wrappers, type aliases, formatting"| E[Write directly]
    D --> F["RED: Write failing test"]
    F --> G["GREEN: Minimal implementation"]
    G --> H["REFACTOR: Clean up"]
    H --> I{More pieces?}
    E --> I
    I -->|Yes| C
    I -->|No| J[Done]

Gate 1: The Logic Gate

Decompose the work into its constituent pieces. For each piece, ask: does this contain logic?

Passes the Logic Gate (requires TDD):

  • Conditionals and branching
  • Data transformations and computations
  • Validation and parsing
  • State management and transitions
  • Error handling with recovery logic
  • Business rules and domain logic
  • Algorithm implementations

Does NOT pass the Logic Gate (write directly):

  • Dataclasses, NamedTuples, TypedDicts (pure data declarations)
  • Type aliases and protocol definitions
  • Configuration and constants
  • Thin wrappers that only delegate (no branching, no transformation)
  • Plot formatting and visual styling
  • Boilerplate (__init__.py, module-level setup)
  • String templates and static content

When in doubt: If you can't point to a conditional, transformation, or state change, it probably doesn't pass the Logic Gate.

Triage Output

Before writing code, briefly identify what passes and what doesn't:

  • "These pieces contain logic and need TDD: X, Y"
  • "These are declarations/glue and can be written directly: Z"

Gate 2: The Iron Rule

For code that passes the Logic Gate: never write logic without a preceding failing test.

If logic is written before its test:

  1. Stop — the test you write now can only describe what you already wrote, not verify intended behavior
  2. Delete the logic and restart test-first
  3. This applies to logic specifically, not declarations

Red-Green-Refactor Cycle

RED: Write a Failing Test

Write a single minimal test demonstrating intended behavior:

  • Clear, descriptive name
  • Test actual functionality (not mocks unless necessary)
  • Focus on one behavior
  • If test name contains "and", split into separate tests
Verify RED: Confirm Failure

Run tests and confirm:

  • Test fails for the expected reason (missing feature)
  • Not failing due to syntax errors
  • This verification is non-negotiable
Show full SKILL.md (203 more words)Show less
GREEN: Minimal Implementation

Write the simplest possible code satisfying the test:

  • Avoid feature creep
  • Don't refactor unrelated code
  • Don't over-engineer
Verify GREEN: Confirm Pass

Confirm:

  • The new test passes
  • No existing tests break
REFACTOR: Clean Up

Improve code quality while maintaining green status:

  • Eliminate duplication
  • Improve naming
  • Simplify logic
  • Run tests after each change

Quality Test Attributes

Minimal: Single responsibility per test Clear: Descriptive name revealing behavior Realistic: Demonstrate intended API usage Focused: One assertion per test (generally)

Common Rationalizations to Reject

"I'll test afterward"

  • Tests written post-implementation pass immediately
  • Proves nothing about validation capability

"Manual testing covered edge cases"

  • Lacks systematic documentation
  • Not reproducible

"Tests-after achieve identical goals"

  • Tests-first answer: "What should happen?"
  • Tests-after answer: "What does this do?"
  • Fundamentally different approaches

Verification Checklist

Before considering work complete:

  • Logic Gate triage was performed
  • Every piece containing logic has corresponding tests
  • Each test for logic failed before implementation
  • Failures occurred for expected reasons
  • Code written is minimal
  • All tests pass without errors or warnings
  • Real code tested (mocks only when necessary)
  • Edge cases and error conditions covered for logic

Debugging Integration

Bug found? Write failing test reproducing it. Follow TDD cycle. Test proves fix and prevents regression.

Never fix bugs without a test.

© ravila4, 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/test-driven-development of ravila4/claude-adhd-skills.

Open the folder on GitHubat commit f99e0a3

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 skillravila4/claude-adhd-skills157—~1.2kAutomated safety check: PassMIT
TDDfossasia/eventyay-interpretation1.6k28 repos~1.1kAutomated safety check: PassApache-2.0
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.6k49 repos~2.5kAutomated safety check: PassMIT
Tapd Story PipelineTencentBlueKing/bk-bcs840—~2.6kAutomated safety check: PassCustom licence

Similar skills

  • TDD

    fossasia/eventyay-interpretation

    Test-driven development. An agent skill from fossasia/eventyay-interpretation.

    1.6k GitHub starsUsed in 28 repos~1.1k 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 49 repos~2.5k tokens
    Testing & QAAuto-check passed
  • Tapd Story Pipeline

    TencentBlueKing/bk-bcs

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

    840 GitHub stars~2.6k tokensUpdated 13 days ago
    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 ravila4/claude-adhd-skills

  • Daily Journal

    ravila4/claude-adhd-skills

    Draft, organize, or update development journal entries. An agent skill from ravila4/claude-adhd-skills.

    157 GitHub stars~2.5k tokensUpdated 7 mo ago
    Auto-check passed
  • Obsidian Vault

    ravila4/claude-adhd-skills

    Manage Obsidian vault operations. An agent skill from ravila4/claude-adhd-skills.

    157 GitHub stars~2.3k tokensUpdated 7 mo ago
    Auto-check passed
  • Nudge

    ravila4/claude-adhd-skills

    Nudge the user with time-based reminders (stopping times, meetings, break suggestions).

    157 GitHub stars~680 tokensUpdated 7 mo ago
    Auto-check passed

Categories

Questions about Test Driven Development

What does Test Driven Development do?

(TDD) Use when implementing any feature or bugfix. An agent skill from ravila4/claude-adhd-skills. Test Driven Development is an agent skill from ravila4/claude-adhd-skills. (TDD) Use when implementing any feature or bugfix.

When should I use Test Driven Development?

Test Driven Development fits situations like: implementing any feature; tasks that involve Test-driven development.

How do I install Test Driven Development in Claude Code?

Run `npx skills add ravila4/claude-adhd-skills --skill test-driven-development -a claude-code`. Or copy the skill folder (skills/test-driven-development in ravila4/claude-adhd-skills) 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 ravila4/claude-adhd-skills --skill test-driven-development -a codex`. Or copy the skill folder (skills/test-driven-development in ravila4/claude-adhd-skills) 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 ravila4/claude-adhd-skills --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 1.2k tokens (SKILL.md is roughly 4.6k 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 (fossasia/eventyay-interpretation, 1.6k 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?

ravila4 (a GitHub user) maintains it in ravila4/claude-adhd-skills, which has 157 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on March 1, 2026.

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