gaia: Skill for Claude Code

.claude/skills/tdd/SKILL.md

tdd is a skill for Claude Code from gaia-react/gaia. It costs 48 tokens per session (2,661 once invoked), scanned A, original, MIT.

A test-first development method called Test-Driven Development, or TDD. You write a failing test, make it pass with code, then improve the code while keeping the test passing.

In plain words
What is it for?
Building features or fixing bugs with integration-style tests that describe real behavior through public interfaces.
Why use it?
It helps catch bugs early and keeps tests focused on what users can do instead of on internal implementation details.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions subagents; names the AskUserQuestion tool.

This is gaia-react/gaia's own configuration. It tells Claude Code how to work on gaia itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything gaia configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node .gaia/scripts/classifier/classify-determinism.mjs <repo-relative-source-path>.

Reuse

Borrowing it

Nothing to install: this file belongs to gaia-react/gaia. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gaia-react/gaia/main/.claude/skills/tdd/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/gaia-react/gaia

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/gaia-react/gaia/tdd/github.svg)](https://agentmods.dev/skills/gaia-react/gaia/tdd)
Your own site
<a href="https://agentmods.dev/skills/gaia-react/gaia/tdd"><img src="https://agentmods.dev/badge/skills/gaia-react/gaia/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/gaia-react/gaia/tdd"><img src="https://agentmods.dev/badge/skills/gaia-react/gaia/tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,661 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 167
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00048 $0.02661
Opus 5.5 $0.00019 $0.01064
Sonnet 5.5 $0.00010 $0.00532
Haiku 4.5 $0.00005 $0.00266

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

.claude/skills/tdd/SKILL.md · 175 lines

How it starts

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

Test-Driven Development

Contents: Selecting a Stack Reference; Philosophy; Anti-Pattern: Horizontal Slices; Workflow; Checklist Per Cycle.

Selecting a Stack Reference

Before writing the first red test, consult the reference for your stack:

  • React / Vitest / MSW / Storybook → the tdd-react skill (frontend/.claude/skills/tdd-react/SKILL.md)

Add a new stack reference (a skill or a references/tests-{stack}.md) when adopting a new stack. The stack reference covers concrete patterns, test layers, mocking rules, and good/bad examples specific to that environment.

Philosophy

Core principle: tests verify behavior through public interfaces, not implementation details. Good tests are integration-style: they exercise real code paths through public APIs, read like a specification ("user submits a valid form and sees a success toast"), and survive refactors. A test that breaks on a behavior-preserving refactor is coupled to implementation.

Anti-Pattern: Horizontal Slices

DO NOT write all tests first, then all implementation. This is "horizontal slicing", treating RED as "write all tests" and GREEN as "write all code."

Tests written in bulk test imagined behavior, not actual behavior. You outrun your headlights, committing to structure before understanding the implementation, producing tests insensitive to real changes.

Correct approach: vertical slices via tracer bullets. One test → one implementation → repeat.

WRONG (horizontal):
  RED:   test1, test2, test3, test4, test5
  GREEN: impl1, impl2, impl3, impl4, impl5

RIGHT (vertical):
  RED→GREEN: test1→impl1
  RED→GREEN: test2→impl2
  RED→GREEN: test3→impl3
  ...

Plan-rendered UAT specs (test.fail()) are the orchestrator's, not a horizontal slice; your phase removes test.fail() when its UAT passes.

Workflow

1. Planning

Before writing any code:

  • Confirm which layer owns this test (see stack reference for layer breakdown)
  • Confirm which behaviors to test (prioritize)
  • Identify opportunities for deep modules, small interface, deep implementation
  • Design interfaces for testability
  • List the behaviors to test (not implementation steps)
  • Get user approval on the plan with AskUserQuestion: Approve the plan (Recommended) or Revise

Read the full file on GitHub · 175 lines

Files

What ships with it

3 files 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 Changed · -4 lines cece937769d0
  2. 11d ago Changed e465b19c9503
  3. 12d ago Changed c556ee96c51e
  4. 13d ago Changed d6e1bfc750e8
  5. 14d ago Changed · +2 lines b349b420cfc0
  6. 21d ago Changed · +3 tokens per session d032624704a2
  7. 24d ago Changed · -10 lines 638e684e0440
  8. 25d ago Changed f1776122749d
  9. 26d ago Changed 2d8ca6f54299
  10. 2mo ago First seen · 187 lines · 45 tokens per session scan A d78c6c059544

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository gaia-react/gaia (26 stars, last pushed 4d ago), licensed MIT. It adds 48 tokens to every session and 2,661 once invoked, about $0.0002 per session on Opus 5.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

verify-bug

Post-merge UAT verification workflow. Walks JIRA reproduce steps, performs comparative audits (Before/After), attaches evidence to JIRA, and transitions status on PASS.

HoangNguyen0403/agent-skills-standard · 39 tokens

fixing-flaky-tests

Guides an agent through reproducing, root-causing, fixing, and validating flaky tests in the PostHog monorepo. Use when a test fails intermittently in CI but passes on rerun or locally, when hogli ci:insights or the debugging-ci-failures skill classifies a failure as a flaky test, when given a GitHub Actions URL for a…

PostHog/posthog · 220 tokens

test-electron-app

Drive the real running PostHog Electron app (live tRPC, workspace-server, real data) over CDP with agent-browser. Connect to the running app on port 9222, test desktop changes against a local Django stack, snapshot the accessibility tree, inspect network requests, and screenshot only when explicitly asked. Use when…

PostHog/posthog · 112 tokens

extending-hobby-smoke-tests

Design, extend, review, or debug PostHog Hobby end-to-end smoke tests in bin/hobby-ci.py and .github/workflows/ci-hobby.yml. Use when adding an ingestion round trip, deciding whether a product belongs in Hobby CI, changing the CI Hobby service topology or API-key scopes, or diagnosing a smoke test that captures data…

PostHog/posthog · 83 tokens

extending-personhog-test-harness

When and how to add scenarios, chaos events, and invariants to the personhog e2e test harness (rust/personhog-test-harness). Use after fixing a bug or regression in the personhog leader path (leader, router, writer, replica, coordination protocol) so the fix gets a permanent regression scenario; when adding a new…

PostHog/posthog · 134 tokens

agent-upkeep

Perform one small, scoped maintenance improvement to the Elements monorepo and open a single reviewable pull request. Use this skill for scheduled or unattended upkeep runs that improve unit test coverage for one file, fix one behavioral bug in one module, or move one off ESLint rule toward enforcement to reduce…

NVIDIA/elements · 115 tokens