tdd-workflow

tdd-workflow is a skill for Claude Code, Codex from drvoss/everything-copilot-cli. It costs 34 tokens per session (2,106 once invoked), scanned A, original, MIT.

A development method called test-driven development, or TDD, where failing tests are written before the smallest implementation needed to pass them.

In plain words
What is it for?
It helps build or change business logic, parsers, and data transformations by following the Red-Green-Refactor cycle with a test framework.
Why use it?
It clarifies expected behavior early and helps prevent new features, bug fixes, and refactors from breaking existing behavior.

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/drvoss/everything-copilot-cli/tdd-workflow
Any agent
npx skills add drvoss/everything-copilot-cli --skill tdd-workflow
Clone the repo
git clone --depth 1 https://github.com/drvoss/everything-copilot-cli

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 tdd-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/drvoss/everything-copilot-cli/tdd-workflow.svg)](https://agentmods.dev/skills/drvoss/everything-copilot-cli/tdd-workflow)
Your own site
<a href="https://agentmods.dev/skills/drvoss/everything-copilot-cli/tdd-workflow"><img src="https://agentmods.dev/badge/skills/drvoss/everything-copilot-cli/tdd-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,106 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.00034 $0.02106
Opus 5 $0.00017 $0.01053
Sonnet 5 $0.00007 $0.00421
Haiku 4.5 $0.00003 $0.00211

Measured yesterday against content hash 2c914ad307d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tdd-workflow 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 yesterday.

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/development/tdd-workflow/SKILL.md · 248 lines

How it starts

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

TDD Workflow

When to Use

  • Building new features where correctness is critical
  • Fixing bugs where a regression test should be written first
  • Refactoring code that lacks test coverage
  • Working on business logic, parsers, or data transformations

Prerequisites

  • Test framework installed and configured (Jest, pytest, Go test, etc.)
  • Ability to run tests from the command line
  • Understanding of the feature requirements or bug to reproduce
Language Common frameworks Example commands
JavaScript / TypeScript Jest, Vitest npm test, npx vitest
Python pytest pytest
Go go test go test ./...
Ruby RSpec, Minitest bundle exec rspec, ruby -Itest test/
PHP PHPUnit ./vendor/bin/phpunit
Rust cargo test cargo test

tdd-guard users: v1.7.0 improves SDK validation error handling, reduces response tokens for allow-operation, and refactors hook-payload parsing. After bundle add tdd-guard, re-check its framework detection before relying on automatic enforcement.

Workflow

0. Choose the Thinnest Slice First

Before you write or change anything, shrink the task to the smallest meaningful behavior that can go through one Red → Green → Refactor loop.

Good first slices usually have all three properties:

  • one visible behavior change
  • one main assertion path
  • one reason it could fail

If the first test needs multiple branches, multiple modules, or a large fixture to make sense, shrink it again. After each Green phase, pause long enough to confirm the direction before stacking more behavior on top.

1. Pre-Check — Does a Test Already Exist?

Before writing a new test, verify you are not duplicating existing coverage.

glob pattern="**/*.{test,spec}.{js,jsx,ts,tsx}"
glob pattern="**/{test_*,*_test}.py"
glob pattern="**/*_test.go"
rg pattern="<function-or-behavior-name>" path="."

If an equivalent test already exists, extend or correct it instead of creating a duplicate. If not, proceed to write the failing test.

Read the full file on GitHub · 248 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. yesterday First seen · 248 lines · 34 tokens per session scan A 2c914ad307d1

Subscribe to this mod's changes

tdd-workflow is a skill published in the GitHub repository drvoss/everything-copilot-cli (45 stars, last pushed 8d ago), licensed MIT. It adds 34 tokens to every session and 2,106 once invoked, about $0.0002 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.