test-driven-development

test-driven-development is a skill for Claude Code, Codex from pantheon-org/tekhne. It costs 87 tokens per session (1,278 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.

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 with agentmods
npx agentmods add skills/pantheon-org/tekhne/test-driven-development
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

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

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,278 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.01278
Opus 5.5 $0.00035 $0.00511
Sonnet 5.5 $0.00017 $0.00256
Haiku 4.5 $0.00009 $0.00128

Measured 4d ago against content hash 5d5ff1f7d349, 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 4d 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. 4d ago Changed 5d5ff1f7d349
  2. 21d ago Changed f94ea34583ed
  3. 1mo 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 5d ago), licensed MIT. It adds 87 tokens to every session and 1,278 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories