test-driven-development

test-driven-development is a skill for Claude Code, Codex from isaacsight/kernel. It costs 24 tokens per session (667 once invoked), scanned A, original, MIT.

A test-first development workflow in which a failing test is written before the code that adds or changes behavior. TDD, or test-driven development, follows a Red, Green, Refactor cycle.

In plain words
What is it for?
It helps write a small failing test, implement the minimum code needed to pass it, and then safely improve the code while keeping the tests passing.
Why use it?
It forces the intended behavior and interface to be defined before implementation. A test that first fails and then passes provides evidence that the change works.

Skill for Claude CodeCodex

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

Good fit It helps write a small failing test, implement the minimum code needed to pass it, and then safely improve the code while keeping the tests passing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/isaacsight/kernel/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 isaacsight/kernel --skill test-driven-development
Clone the repo
git clone --depth 1 https://github.com/isaacsight/kernel

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/isaacsight/kernel/test-driven-development/github.svg)](https://agentmods.dev/skills/isaacsight/kernel/test-driven-development)
Your own site
<a href="https://agentmods.dev/skills/isaacsight/kernel/test-driven-development"><img src="https://agentmods.dev/badge/skills/isaacsight/kernel/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/isaacsight/kernel/test-driven-development"><img src="https://agentmods.dev/badge/skills/isaacsight/kernel/test-driven-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 667 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 warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 53
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 74
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 54
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
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.00024 $0.00667
Opus 5.5 $0.00010 $0.00267
Sonnet 5.5 $0.00005 $0.00133
Haiku 4.5 $0.00002 $0.00067

Measured 1mo ago against content hash 24ec33a662ed, 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 1mo 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.

packages/kbot/skills/software-development/test-driven-development/SKILL.md · 75 lines

How it starts

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

Test-Driven Development

Iron Law

THE FIRST COMMIT ON ANY BEHAVIOR CHANGE IS A FAILING TEST.

No exceptions. Not "I'll add tests after." Not "this is too small." The failing test proves you understood the behavior before you wrote it.

Why

  • Writing the test first forces you to design the interface, not the implementation.
  • A failing test that turns green is the only honest proof the fix works.
  • Tests written after the fact confirm what you already did, not what you should have done.
  • Coverage that grows alongside code never has a "we should add tests" backlog.

The Cycle

RED

  1. Decide what the new behavior is, in one sentence.
  2. Write the smallest test that would fail if the behavior is missing.
  3. Run it. Confirm it fails for the right reason (not a typo, not a missing import).

GREEN

  1. Write the minimum code that makes the test pass.
  2. No extra features. No refactoring yet. No "while I'm here."
  3. Run the test. Confirm green.

REFACTOR

  1. Now — and only now — clean up the implementation.
  2. Rename, extract, deduplicate. Tests still green the whole time.
  3. If a refactor turns a test red, you changed behavior — revert and think.

kbot Toolchain

  • Framework: Vitest (.test.ts next to source).
  • Runner: npx vitest run (one-shot) or npx vitest (watch).
  • Typecheck gate: npx tsc --noEmit before every commit. Strict mode is non-negotiable.
  • UI tests: @testing-library/react.
  • E2E: Playwright (npm run test:e2e).

Mocking Policy

  • Mock Supabase. Never call the real API in tests.
  • Mock the Claude proxy. Never call the real API in tests.
  • Do NOT mock your own pure functions — test them directly.
  • Do NOT mock file I/O — use tmpdir() fixtures.

Anti-Patterns

  • Tests that assert implementation details (internal method calls) instead of observable behavior.
  • Tests that share state between cases. Each test starts clean.
  • Test names like it('works'). Name the behavior: it('rejects unauthenticated requests').
  • "Fix the test" when the test correctly catches a regression. Fix the code.

Read the full file on GitHub · 75 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. 1mo ago First seen · 75 lines · 24 tokens per session scan A 24ec33a662ed

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository isaacsight/kernel (16 stars, last pushed 1mo ago), licensed MIT. It adds 24 tokens to every session and 667 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-09-03.