test-driven-development

test-driven-development is a skill for Claude Code, Codex from pantheon-org/tekhne. It costs 87 tokens per session (1,293 once invoked), scanned A, original, MIT.

A guide to test-driven development, or TDD: write a failing test, make the smallest code change that passes it, then improve the code while keeping tests passing.

In plain words
What is it for?
Use it to write unit tests first, add coverage, fix regressions, change APIs, and follow the red-green-refactor cycle.
Why use it?
It helps reproduce bugs before fixing them and makes feature changes or refactoring safer by preserving expected behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is sh skills/agentic-harness/skill-quality-auditor/scripts/evaluate.sh test-driven-development --json.

Good fit Use it to write unit tests first, add coverage, fix regressions, change APIs, and follow the red-green-refactor cycle.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/pantheon-org/tekhne
agentmods
npx agentmods add skills/pantheon-org/tekhne/test-driven-development

Made for: Claude Code, Codex.

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/pantheon-org/tekhne/test-driven-development/github.svg)](https://agentmods.dev/skills/pantheon-org/tekhne/test-driven-development)
Your own site
<a href="https://agentmods.dev/skills/pantheon-org/tekhne/test-driven-development"><img src="https://agentmods.dev/badge/skills/pantheon-org/tekhne/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/pantheon-org/tekhne/test-driven-development"><img src="https://agentmods.dev/badge/skills/pantheon-org/tekhne/test-driven-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,293 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 pass 7 Sept 2026
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.00087 $0.01293
Opus 5 $0.00044 $0.00647
Sonnet 5 $0.00017 $0.00259
Haiku 4.5 $0.00009 $0.00129

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

skills/testing/test-driven-development/SKILL.md · 196 lines

How it starts

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

Test-Driven Development

Navigation hub for applying TDD in day-to-day implementation work.

When to Use

  • "Write tests first for this feature."
  • "How should I do red-green-refactor here?"
  • "I need to reproduce a bug with a failing test first."
  • "I want to refactor safely while preserving behavior."

When Not to Use

  • End-to-end scenario design across full systems.
  • Performance benchmarking and load testing.
  • Security testing workflows.

Scope

In Scope

  • Unit test design and behavior-driven assertions.
  • Red-Green-Refactor cycle execution.
  • Mock/stub isolation strategy.
  • Naming and organization conventions for maintainable tests.

Out of Scope

  • Full E2E harness setup and browser automation pipelines.
  • Infra-only test framework bootstrapping.
  • Non-deterministic perf profiling.

Workflow

  1. Write the smallest failing test that expresses one behavior.
  2. Run tests and verify failure is for the expected reason.
  3. Implement minimal code to make the test pass.
  4. Refactor while keeping the suite green.
  5. Repeat for next behavior/edge case.

Example: Red-Green-Refactor Cycle (TypeScript)

RED — write the failing test first:

// add.test.ts
import { add } from "./add";

test("add returns the sum of two numbers", () => {
  expect(add(2, 3)).toBe(5);
});
// ❌ Fails: cannot find module './add'

GREEN — implement the minimum code to pass:

// add.ts
export function add(a: number, b: number): number {
  return a + b;
}
// ✅ Test passes

REFACTOR — improve without breaking green:

// add.ts — no logic change needed here, but you might rename,
// extract constants, or improve types while the suite stays green.
export const add = (a: number, b: number): number => a + b;
// ✅ Still green

Example: Elixir variant

# test/math_test.exs  (RED)
test "add/2 returns the sum" do
  assert Math.add(2, 3) == 5
end

# lib/math.ex  (GREEN)
defmodule Math do
  def add(a, b), do: a + b
end

Read the full file on GitHub · 196 lines

Files

What ships with it

60 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. 6d ago First seen · 196 lines · 87 tokens per session scan A b20d3cfc874a

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository pantheon-org/tekhne (10 stars, last pushed yesterday), licensed MIT. It adds 87 tokens to every session and 1,293 once invoked, about $0.0004 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-09-03.

Related

Other skills, from other repositories

testing-expert

Ultimate Kotlin testing skill. Use this whenever writing, reviewing, or debugging ANY Kotlin test — unit, integration, property-based, or coroutine. Covers TDD (RED/GREEN/REFACTOR), Kotest + MockK + Kover, anti-pattern detection, and four-pillar quality framework. Triggers on: write a test, add coverage, why is this…

JosephSanjaya/skills · 115 tokens

python-testing

Python testing patterns with pytest: TDD loop, fixtures, parametrization, mocking, test organization, async testing, coverage, and CI hygiene. Use when writing or reviewing Python tests to improve correctness and reduce flakiness.

AeonDave/malskill · 48 tokens

django-tdd

Django testing strategies with pytest-django, TDD methodology, factoryboy, mocking, coverage, and testing Django REST Framework APIs.

x-cmd/skill · 32 tokens

python-testing

Python testing strategies using pytest, TDD methodology, fixtures, mocking, parametrization, and coverage requirements.

x-cmd/skill · 24 tokens

tdd-guide

Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and Mocha. Use when the user asks to write tests, improve test coverage, practice TDD, generate mocks or stubs, or mentions…

Morningstar202604/awesome-skillkit · 82 tokens

rspec-testing

This skill should be used when writing, reviewing, or improving RSpec tests for Ruby on Rails applications. Use this skill for all testing tasks including model specs, controller specs, system specs, component specs, service specs, and integration tests. The skill provides comprehensive RSpec best practices from…

Shoebtamboli/rails_claude_skills · 68 tokens