Agent skill

TDD

by pproenca in pproenca/dot-skills

Test-Driven Development methodology and red-green-refactor workflow (formerly test-tdd).

MITAuto-check passedTesting & QA

Install TDD

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

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

GitHub CLI
$ gh skill install pproenca/dot-skills 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/pproenca/dot-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/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
214
Token cost
~1.4k tokens
SKILL.md length
513 words
Files
48 (incl. references, assets)
Skills in repo
182
Repo updated
First seen
Licence
MIT

At a glance

Test-Driven Development methodology and red-green-refactor workflow (formerly test-tdd).

  • Works in 8 steps: Red-Green-Refactor Cycle (CRITICAL) → Test Design Principles (CRITICAL) → Test Isolation & Dependencies (HIGH) → …
  • Write tests first
  • SKILL.md covers When to Apply, TDD Workflow, Rule Categories by Priority and Quick Reference, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

TDD is an agent skill from pproenca/dot-skills. Test-Driven Development methodology and red-green-refactor workflow (formerly test-tdd). This skill should be used when practicing TDD, writing tests first, designing tests before implementation, or reviewing test-first approaches. Triggers on "write tests first", "test before code", "red green refactor", "test driven development". This skill does NOT cover Vitest framework specifics (use vitest skill) or API mocking with MSW (use msw skill).

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 50 other files, including reference files and assets (for example `AGENTS.md`, `README.md` and `assets/templates/_template.md`).

It sits in Testing & QA, covering Test-driven development. It works with Vitest. The repository describes itself as: A collection of AI agent skills following the Agent Skills open format. The licence is MIT.

When your agent uses it

  • Write tests first
  • Test before code
  • Red green refactor
  • Test driven development

Example prompts

  • “write tests first”
  • “test before code”
  • “red green refactor”
  • “/tdd”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Red-Green-Refactor Cycle (CRITICAL)
  2. Test Design Principles (CRITICAL)
  3. Test Isolation & Dependencies (HIGH)
  4. Test Data Management (HIGH)
  5. Assertions & Verification (MEDIUM)
  6. Test Organization & Structure (MEDIUM)
  7. Test Performance & Reliability (MEDIUM)
  8. Test Pyramid & Strategy (LOW)

What it can do on your machine

Read from SKILL.md and the folder at commit cf93c57. 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 1.4k tokens when it runs, and up to ~24k if it reads all its reference files. Until then it costs about 113 tokens; SKILL.md has 513 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~113
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~24k

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 pproenca/dot-skills at commit cf93c57, republished under its MIT licence (© pproenca). 513 words, ~1,379 tokens.

Download SKILL.mdSave it as .claude/skills/tdd/SKILL.md (or your agent's skills folder). This skill also uses 47 other files; get the full folder from GitHub.
name
tdd
description
Test-Driven Development methodology and red-green-refactor workflow (formerly test-tdd). This skill should be used when practicing TDD, writing tests first, designing tests before implementation, or reviewing test-first approaches. Triggers on "write tests first", "test before code", "red green refactor", "test driven development". This skill does NOT cover Vitest framework specifics (use vitest skill) or API mocking with MSW (use msw skill).

Community Test-Driven Development Best Practices

Comprehensive guide to Test-Driven Development practices, designed for AI agents and LLMs. Contains 42 rules across 8 categories, prioritized by impact to guide test writing, refactoring, and code generation.

When to Apply

Reference these guidelines when:

  • Writing new tests using TDD workflow
  • Implementing the red-green-refactor cycle
  • Designing test structure and organization
  • Creating test data and fixtures
  • Reviewing or refactoring existing test suites

TDD Workflow

  1. RED: Write a failing test that defines desired behavior
  2. GREEN: Write minimal code to make the test pass
  3. REFACTOR: Clean up code while keeping tests green
  4. Repeat for each new behavior

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Red-Green-Refactor CycleCRITICALcycle-
2Test Design PrinciplesCRITICALdesign-
3Test Isolation & DependenciesHIGHisolate-
4Test Data ManagementHIGHdata-
5Assertions & VerificationMEDIUMassert-
6Test Organization & StructureMEDIUMorg-
7Test Performance & ReliabilityMEDIUMperf-
8Test Pyramid & StrategyLOWstrat-

Quick Reference

1. Red-Green-Refactor Cycle (CRITICAL)
  • cycle-write-test-first - Write the Test Before the Implementation
  • cycle-minimal-code-to-pass - Write Only Enough Code to Pass the Test
  • cycle-refactor-after-green - Refactor Immediately After Green
  • cycle-verify-test-fails-first - Verify the Test Fails Before Writing Code
  • cycle-small-increments - Take Small Incremental Steps
  • cycle-maintain-test-list - Maintain a Test List
2. Test Design Principles (CRITICAL)
  • design-test-behavior-not-implementation - Test Behavior Not Implementation
  • design-one-assertion-per-test - One Logical Assertion Per Test
  • design-descriptive-test-names - Use Descriptive Test Names
  • design-aaa-pattern - Follow the Arrange-Act-Assert Pattern
  • design-test-edge-cases - Test Edge Cases and Boundaries
  • design-avoid-logic-in-tests - Avoid Logic in Tests
3. Test Isolation & Dependencies (HIGH)
  • isolate-mock-external-dependencies - Mock External Dependencies
  • isolate-no-shared-state - Avoid Shared Mutable State Between Tests
  • isolate-deterministic-tests - Write Deterministic Tests
  • isolate-prefer-stubs-over-mocks - Prefer Stubs Over Mocks for Queries
  • isolate-use-dependency-injection - Use Dependency Injection for Testability
4. Test Data Management (HIGH)
  • data-use-factories - Use Factories for Test Data Creation
  • data-minimal-setup - Keep Test Setup Minimal
  • data-avoid-mystery-guests - Avoid Mystery Guests
  • data-unique-identifiers - Use Unique Identifiers Per Test
  • data-builder-pattern - Use Builder Pattern for Complex Objects
Show full SKILL.md (206 more words)Show less
5. Assertions & Verification (MEDIUM)
  • assert-specific-assertions - Use Specific Assertions
  • assert-error-messages - Assert on Error Messages and Types
  • assert-no-assertions-antipattern - Every Test Must Have Assertions
  • assert-custom-matchers - Create Custom Matchers for Domain Assertions
  • assert-snapshot-testing - Use Snapshot Testing Judiciously
6. Test Organization & Structure (MEDIUM)
  • org-group-by-behavior - Group Tests by Behavior Not Method
  • org-file-structure - Follow Consistent Test File Structure
  • org-setup-teardown - Use Setup and Teardown Hooks Appropriately
  • org-test-utilities - Extract Reusable Test Utilities
  • org-parameterized-tests - Use Parameterized Tests for Variations
7. Test Performance & Reliability (MEDIUM)
  • perf-fast-unit-tests - Keep Unit Tests Under 100ms
  • perf-avoid-network-calls - Eliminate Network Calls in Unit Tests
  • perf-fix-flaky-tests - Fix Flaky Tests Immediately
  • perf-parallelize-tests - Parallelize Independent Tests
  • perf-avoid-sleep - Avoid Arbitrary Sleep Calls
8. Test Pyramid & Strategy (LOW)
  • strat-test-pyramid - Follow the Test Pyramid
  • strat-mutation-testing - Use Mutation Testing to Validate Test Quality
  • strat-coverage-targets - Set Meaningful Coverage Targets
  • strat-integration-boundaries - Test Integration at Service Boundaries
  • strat-e2e-critical-paths - Limit E2E Tests to Critical User Paths

How to Use

Read individual reference files for detailed explanations and code examples:

  • For Vitest framework specifics, see vitest skill
  • For API mocking with MSW, see msw skill

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

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

Files

SKILL.md and 47 other files (references, assets) in skills/.curated/tdd of pproenca/dot-skills.

  • SKILL.md
  • AGENTS.md
  • README.md
  • assets/templates/_template.md
  • metadata.json
  • references/_sections.md
  • references/assert-custom-matchers.md
  • references/assert-error-messages.md
  • references/assert-no-assertions-antipattern.md
  • references/assert-snapshot-testing.md
  • references/assert-specific-assertions.md
  • references/cycle-maintain-test-list.md
  • references/cycle-minimal-code-to-pass.md
  • references/cycle-refactor-after-green.md
  • references/cycle-small-increments.md
  • references/cycle-verify-test-fails-first.md
  • references/cycle-write-test-first.md
  • references/data-avoid-mystery-guests.md
  • … and 30 more

Open the folder on GitHubat commit cf93c57

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 skillpproenca/dot-skills214—~1.4kAutomated safety check: PassMIT
Agent Harness Testing Methodologyhuiliyi37/Tianshu-harness1.1k—~1kAutomated safety check: NotesApache-2.0
MoAI TDD Workflowmodu-ai/moai-adk1.2k—~3.1kAutomated safety check: PassApache-2.0
Test Coveragescott-fryxell/brayness124—~1.6kAutomated safety check: PassMIT
Odc TestingDouglasNeuroInformatics/OpenDataCapture119—~1.5kAutomated safety check: NotesApache-2.0
Test-Driven Development Enforcerzereight/gitlab-mcp2k1 repos~904Automated safety check: PassMIT

Similar skills

  • Agent Harness Testing Methodology

    huiliyi37/Tianshu-harness

    Guides an agent through probing an unfamiliar project's test setup, then choosing a red-light-first testing strategy matched to the task type.

    1.1k GitHub stars~1k tokensUpdated 2 days ago
    Testing & QAAuto-check: notes
  • MoAI TDD Workflow

    modu-ai/moai-adk

    Drives test-first development through the RED, GREEN, REFACTOR cycle, with a config switch that selects between TDD and a DDD workflow for existing code.

    1.2k GitHub stars~3.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Test Coverage

    scott-fryxell/brayness

    Write Vitest specs for Vue 3 JavaScript (Vite Plus, happy-dom, @vue/test-utils) and analyze V8 coverage + Fallow health to prioritize test-first refactors.

    124 GitHub stars~1.6k tokensUpdated 9 days ago
    Testing & QAAuto-check passed
  • Odc Testing

    DouglasNeuroInformatics/OpenDataCapture

    Test a change in Open Data Capture. An agent skill from DouglasNeuroInformatics/OpenDataCapture.

    119 GitHub stars~1.5k tokensUpdated today
    Testing & QAAuto-check: notes
  • Enforces strict red-green-refactor, with a failing test first, the minimum code to pass it, then cleanup, and a quick reference for common test runners.

    2k GitHub starsUsed in 1 repo~904 tokens
    Testing & QAAuto-check passed
  • Building

    romiluz13/cc10x

    Implementation skill for writing production code with TDD. An agent skill from romiluz13/cc10x.

    164 GitHub stars~2.6k tokensUpdated 7 days ago
    Testing & QAAuto-check: notes

More from pproenca/dot-skills

All 182 skills in this repo
  • Audio Voice Recovery

    pproenca/dot-skills

    Audio forensics and voice recovery guidelines for CSI-level audio analysis.

    214 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Codemod React Pipeline

    pproenca/dot-skills

    Guided, scripted pipeline for running JSX/TSX/React codemods safely across large legacy codebases.

    214 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Dev Rfc

    pproenca/dot-skills

    Create well-structured RFCs and technical proposals for software projects.

    214 GitHub stars~3.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Dx Harness

    pproenca/dot-skills

    Developer-experience friction auditing and fixing — slow onboarding, repeated manual setup steps, missing bootstrap/reset/seed scripts, undiscoverable conventions.

    214 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Language Spec Author

    pproenca/dot-skills

    Turn a rough idea for a language into a complete, implementable specification — a DSL, query, config/data, template, or protocol language — by interviewing the author dimension by dimension until…

    214 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Python Pep Author

    pproenca/dot-skills

    Drafting Python Enhancement Proposals (PEPs) — proposing a Python language feature, a standard library change, an interoperability standard, or an informational/process document for the Python…

    214 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about TDD

What does TDD do?

Test-Driven Development methodology and red-green-refactor workflow (formerly test-tdd). TDD is an agent skill from pproenca/dot-skills. Test-Driven Development methodology and red-green-refactor workflow (formerly test-tdd).

When should I use TDD?

TDD fits situations like: write tests first; test before code; red green refactor; test driven development.

How do I install TDD in Claude Code?

Run `npx skills add pproenca/dot-skills --skill tdd -a claude-code`. Or copy the skill folder (skills/.curated/tdd in pproenca/dot-skills) 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 pproenca/dot-skills --skill tdd -a codex`. Or copy the skill folder (skills/.curated/tdd in pproenca/dot-skills) 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 pproenca/dot-skills --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 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 23k tokens, read only when the agent opens those files.

What are the alternatives to TDD?

Skills that share tags, products or a category with TDD: Agent Harness Testing Methodology (huiliyi37/Tianshu-harness, 1.1k stars), MoAI TDD Workflow (modu-ai/moai-adk, 1.2k stars), Test Coverage (scott-fryxell/brayness, 124 stars) and Odc Testing (DouglasNeuroInformatics/OpenDataCapture, 119 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains TDD?

pproenca (a GitHub user) maintains it in pproenca/dot-skills, which has 214 GitHub stars. The repository holds 182 skills in this directory. The repository was last updated on August 15, 2026.

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