test-driven-development

test-driven-development is a skill for Claude Code, Codex from furkangonel/cowrangler. It costs 19 tokens per session (2,406 once invoked), scanned A, original, MIT.

A test-driven development workflow, where TDD means writing a failing test first, adding enough code to pass it, and then cleaning up the code. The cycle repeats for each behavior.

In plain words
What is it for?
Use it when building a feature, changing an existing function, or fixing a bug that should have a test.
Why use it?
It checks the intended behavior while you build and helps prevent bugs from returning when code changes.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/furkangonel/cowrangler/test-driven-development
Any agent
npx skills add furkangonel/cowrangler --skill test-driven-development
Clone the repo
git clone --depth 1 https://github.com/furkangonel/cowrangler

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/furkangonel/cowrangler/test-driven-development.svg)](https://agentmods.dev/skills/furkangonel/cowrangler/test-driven-development)
Your own site
<a href="https://agentmods.dev/skills/furkangonel/cowrangler/test-driven-development"><img src="https://agentmods.dev/badge/skills/furkangonel/cowrangler/test-driven-development.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,406 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00019 $0.02406
Opus 5 $0.00010 $0.01203
Sonnet 5 $0.00004 $0.00481
Haiku 4.5 $0.00002 $0.00241

Measured 4d ago against content hash 85f78c6c3e7c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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.

bundled_skills/software-development/test-driven-development/SKILL.md · 337 lines

How it starts

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

Test-Driven Development (TDD) SOP

Write a failing test, write just enough code to pass it, then refactor. Repeat. This SOP covers the full Red → Green → Refactor cycle with concrete examples.

When to Use

  • User wants to build a feature with test coverage from the start
  • User wants to practice TDD on an existing or new function
  • User is adding behavior to an existing module and wants to do it safely
  • User is fixing a bug and wants to prevent regression

The TDD Cycle

  ┌─────────────────────────────────────────────────────┐
  │                                                     │
  │   RED ──────→ GREEN ──────→ REFACTOR ──────→ RED   │
  │                                                     │
  │   Write a   Make it pass   Clean it up   Next test  │
  │   failing   with minimal   without        (repeat)   │
  │   test      code           breaking tests            │
  └─────────────────────────────────────────────────────┘

Non-negotiable rules:

  1. Never write production code before a failing test
  2. Write only enough production code to make the failing test pass
  3. Never refactor on a red test — only refactor when all tests are green
  4. Run tests after every change, no matter how small

Step 1 — RED: Write a Failing Test

Test Anatomy (Arrange → Act → Assert)

def test_calculate_order_total_applies_discount():
    # Arrange — set up inputs
    items = [
        {"name": "Widget", "price": 10.00, "quantity": 3},
        {"name": "Gadget", "price": 25.00, "quantity": 1},
    ]
    discount_percent = 10

    # Act — call the code under test
    total = calculate_order_total(items, discount_percent)

    # Assert — verify the result
    assert total == 49.50  # (30 + 25) * 0.9

Good test names describe behavior, not implementation:

  • test_calculate_order_total_applies_discount — good
  • test_total_function — bad
  • test_with_10_percent_off_correctly_applies_the_discount_to_three_items — too verbose

Run It — Confirm It Fails

Read the full file on GitHub · 337 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. 4d ago First seen · 337 lines · 19 tokens per session scan A 85f78c6c3e7c

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository furkangonel/cowrangler (2 stars, last pushed 3d ago), licensed MIT. It adds 19 tokens to every session and 2,406 once invoked, about $0.0001 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-31.