claude-pilot: Skill for Claude Code

.claude/skills/tdd/SKILL.md

tdd is a skill for Claude Code from changoo89/claude-pilot. It costs 54 tokens per session (697 once invoked), scanned A, original, MIT.

A test-first development workflow called Test-Driven Development, or TDD, that writes a failing test, adds the smallest code needed to pass it, and then improves the code.

In plain words
What is it for?
Use it for new features, bug fixes, and refactoring when working in an agent team with automated tests.
Why use it?
It gives each feature or bug fix a test before implementation, helping catch regressions while keeping the change focused.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is changoo89/claude-pilot's own configuration. It tells Claude Code how to work on claude-pilot 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 claude-pilot configures →

Part of the claude-pilot plugin — 32 skills, 11 commands, 14 agents, 2 MCP servers shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to changoo89/claude-pilot. 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/changoo89/claude-pilot/main/.claude/skills/tdd/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/changoo89/claude-pilot

Made for: Claude Code.

Or install claude-pilot, the plugin that ships this one along with the rest of its 32 skills, 11 commands, 14 agents, 2 MCP servers.

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/changoo89/claude-pilot/tdd.svg)](https://agentmods.dev/skills/changoo89/claude-pilot/tdd)
Your own site
<a href="https://agentmods.dev/skills/changoo89/claude-pilot/tdd"><img src="https://agentmods.dev/badge/skills/changoo89/claude-pilot/tdd.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 697 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.
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.00054 $0.00697
Opus 5 $0.00027 $0.00349
Sonnet 5 $0.00011 $0.00139
Haiku 4.5 $0.00005 $0.00070

Measured 8d ago against content hash 22adbdf309f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 8d 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 · 79 lines

How it starts

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

SKILL: Test-Driven Development (TDD)

Purpose: Execute TDD Red-Green-Refactor cycle for feature implementation Target: Coder teammates implementing features with test-first methodology in Agent Teams ⚠️ Teammates Only: This skill is for coder teammates in Agent Teams. Team Lead delegates via teammate spawn.


Quick Start

When to Use This Skill

  • Implement new feature with test coverage
  • Fix bug with regression tests
  • Refactor code with test safety net

Quick Reference

# Red: pytest tests/test_feature.py -k "SC-1"  # FAIL
# Green: [Implement feature]
# Refactor: [Refactor code]
# Verify: pytest  # ALL PASS

What This Skill Covers

In Scope

  • Red-Green-Refactor cycle execution
  • Test-first development methodology
  • Minimal implementation for Green phase

Out of Scope

  • Test framework selection → @.claude/skills/tdd/REFERENCE.md
  • Coverage thresholds → @.claude/skills/ralph-loop/SKILL.md
  • Code quality standards → @.claude/skills/vibe-coding/SKILL.md

Core Concepts

The TDD Cycle: Red-Green-Refactor

Phase 1: Red - Write Failing Test

def test_add_two_numbers():
    result = calculator.add(2, 3)
    assert result == 5

Run test → Confirm it FAILS (❌)

Phase 2: Green - Minimal Implementation

def add(a, b):
    return a + b  # Just enough to pass

Run test → Confirm it PASSES (✅)

Phase 3: Refactor - Improve Quality

def add(a: int, b: int) -> int:
    """Add two integers with type safety."""
    return a + b

Run ALL tests → Confirm ALL PASS (✅)

Why TDD Matters

  • Tests drive design: API designed from usage perspective
  • Regression safety: Refactor without fear
  • Living documentation: Tests show intended behavior
  • Fast feedback: Catch issues immediately

Further Reading

Internal: @.claude/skills/tdd/REFERENCE.md - Advanced TDD concepts, patterns, and examples | @.claude/skills/ralph-loop/SKILL.md - Autonomous completion loop | @.claude/skills/vibe-coding/SKILL.md - Code quality standards | @.claude/skills/tdd/REFERENCE.md - Test framework detection

Read the full file on GitHub · 79 lines

Files

What ships with it

1 file 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. 8d ago First seen · 79 lines · 54 tokens per session scan A 22adbdf309f4

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository changoo89/claude-pilot (20 stars, last pushed 7mo ago), licensed MIT. It adds 54 tokens to every session and 697 once invoked, about $0.0003 per session on Opus 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.