claude-pilot: Skill for Claude Code

.claude/skills/test-driven-development/SKILL.md

test-driven-development is a skill for Claude Code from changoo89/claude-pilot. It costs 29 tokens per session (1,180 once invoked), scanned A, original, MIT.

A coding workflow that writes a test before the code, then makes the test pass and cleans up the implementation. This cycle is called test-driven development (TDD).

In plain words
What is it for?
Use it to guide feature work, bug fixes, refactoring, and other changes through failing tests, minimal implementations, and cleanup.
Why use it?
It checks the intended behavior early and keeps tests passing as code changes. This helps catch regressions while implementing features, fixing bugs, or refactoring.

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/test-driven-development/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 test-driven-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/changoo89/claude-pilot/test-driven-development/github.svg)](https://agentmods.dev/skills/changoo89/claude-pilot/test-driven-development)
Your own site
<a href="https://agentmods.dev/skills/changoo89/claude-pilot/test-driven-development"><img src="https://agentmods.dev/badge/skills/changoo89/claude-pilot/test-driven-development/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 test-driven-development

Your own site · 80×15
<a href="https://agentmods.dev/skills/changoo89/claude-pilot/test-driven-development"><img src="https://agentmods.dev/badge/skills/changoo89/claude-pilot/test-driven-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,180 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.00029 $0.01180
Opus 5.5 $0.00012 $0.00472
Sonnet 5.5 $0.00006 $0.00236
Haiku 4.5 $0.00003 $0.00118

Measured 2mo ago against content hash 39c472823bd3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-driven-development 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 2mo 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/test-driven-development/SKILL.md · 198 lines

How it starts

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

SKILL: Test-Driven Development

Purpose: Red-Green-Refactor cycle for reliable code with tests Target: Coder agent implementing features or bugfixes


Quick Start

When to Use This Skill

  • Implementing new features
  • Fixing bugs
  • Refactoring existing code
  • Adding new functionality

Quick Reference

Phase Action Verify
RED Write failing test npm test → FAIL
GREEN Minimal implementation npm test → PASS
REFACTOR Clean up code npm test && npm run lint → PASS
REPEAT Until criteria met All quality gates pass

Core Concepts

The TDD Cycle

Step 1: RED - Write a failing test

// src/auth.service.test.ts
describe('AuthService', () => {
  it('should authenticate valid user', async () => {
    const service = new AuthService();
    const result = await service.authenticate('[email protected]', 'password');
    expect(result).toBe(true);
  });
});

Verify test fails: npm test → FAIL: AuthService is not defined

Step 2: GREEN - Write minimal code to pass

// src/auth.service.ts
export class AuthService {
  async authenticate(email: string, password: string): Promise<boolean> {
    return true;  // Minimal implementation
  }
}

Verify test passes: npm test → PASS

Step 3: REFACTOR - Clean up

// src/auth.service.ts
export class AuthService {
  constructor(private users: UserRepository) {}

  async authenticate(email: string, password: string): Promise<boolean> {
    const user = await this.users.findByEmail(email);
    if (!user) return false;
    return await user.verifyPassword(password);
  }
}

Verify tests still pass: npm test && npm run lint → PASS


Test Patterns

Arrange-Act-Assert

it('should calculate total with discount', () => {
  const cart = new Cart();  // Arrange
  cart.applyDiscount('SUMMER20');  // Act
  expect(cart.total).toBe(80);  // Assert
});

Read the full file on GitHub · 198 lines

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. 2mo ago First seen · 198 lines · 29 tokens per session scan A 39c472823bd3

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository changoo89/claude-pilot (20 stars, last pushed 8mo ago), licensed MIT. It adds 29 tokens to every session and 1,180 once invoked, about $0.0001 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

typescript-testing

Select and run TypeScript SDK verification for packages, examples, type checks, linting, builds, Vitest suites, Effect v4 CLI tests, and runtime E2E tests. Use when adding tests, diagnosing TypeScript CI, choosing a focused test command, validating TypeScript package changes, or writing/porting CLI tests against…

ComposioHQ/composio · 91 tokens

bug-fixing

Fix defects in the Composio SDK repository with focused reproduction, root-cause analysis, regression tests, and narrow verification. Use when the user reports a bug, failing test, CI regression, runtime defect, or incorrect SDK behavior. Do not use for new feature design or broad refactors.

ComposioHQ/composio · 63 tokens

python-testing

Select and run Python SDK verification with nox, Makefile targets, Ruff, mypy, pytest markers, sanity tests, type inference checks, and build checks. Use when adding Python tests, diagnosing Python CI, or validating Python SDK/provider changes. Do not use for TypeScript-only checks.

ComposioHQ/composio · 62 tokens

potpie-debug-memory

Use while debugging or troubleshooting failures, flaky tests, incidents, production alerts, CI failures, local dev setup issues, repeated bugs, prior fixes, failed attempts, and verification history.

potpie-ai/potpie · 41 tokens

resolve-author-fix

Find the root cause, implement a focused fix, and prove behavior with targeted tests and recordings.

omnigent-ai/omnigent · 24 tokens

resolve-repro-audit

Audit a recovered repro patch, assertions, and behavioral baseline before authoring or reviewing.

omnigent-ai/omnigent · 23 tokens