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

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it when building a feature, changing an existing function, or fixing a bug that should have a test.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/furkangonel/cowrangler/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 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/github.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/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/furkangonel/cowrangler/test-driven-development"><img src="https://agentmods.dev/badge/skills/furkangonel/cowrangler/test-driven-development.svg" alt="Reviewed on agentmods" width="80" 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. 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.00019 $0.02406
Opus 5.5 $0.00008 $0.00962
Sonnet 5.5 $0.00004 $0.00481
Haiku 4.5 $0.00002 $0.00241

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

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. 1mo 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 (1 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 2,406 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-31.

Related

Other skills, from other repositories

software-test-creation

Write failing tests for a TDD slice based on acceptance criteria and codebase conventions. Use when the "red" phase of red-green-refactor requires tests that define expected behavior before implementation exists. Discovers codebase test conventions first, writes test files that compile or parse but fail because the…

stencila/stencila · 82 tokens

tdd-workflow

Drive implementation through a test-first loop: write a failing test, make it pass with the simplest change, then refactor under a green suite. Use when the user asks for TDD or test-driven development, wants tests written before the code, is adding behaviour to code that has tests, is fixing a bug and wants a…

personamanagmentlayer/pcl · 97 tokens

test-driven-development

Write the test first, watch it fail, write minimal code to pass.

bobmatnyc/claude-mpm · 18 tokens

implement

Implement a technical design by decomposing it into dependency-ordered vertical slices, executing each with TDD red-green, reviewing each via an isolated sub-agent, and persisting progress to a state file so work survives session restarts. Use when the user has a tech design (doc or settled conversation) and says…

open-octo/octo-agent · 97 tokens

testing-expert

Expert-level software testing with unit tests, integration tests, E2E tests, TDD/BDD, and testing best practices. Use when the user mentions TDD, BDD, unit tests, integration tests, or end-to-end tests, or when the task involves Testing Fundamentals, Unit Testing, Integration Testing, or End-to-End Testing.

personamanagmentlayer/pcl · 73 tokens

tdd

Test-driven development workflow with philosophy guide - plan → write tests → implement → validate.

parcadei/Continuous-Claude-v3 · 19 tokens