red-green-tdd

red-green-tdd is a skill for Claude Code, Codex from PerryLink/dsh-doublecheck. It costs 62 tokens per session (574 once invoked), scanned A, original, Apache-2.0.

A test-driven development (TDD) workflow for implementation work. TDD means writing a test first, seeing it fail, changing the code, and then seeing the test pass.

In plain words
What is it for?
Use it when a written specification already exists and you are changing software behavior. It helps create a failing test, implement the change, and verify the result.
Why use it?
It records evidence that the missing behavior was tested before and after the code change.

Skill for Claude CodeCodex

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

Good fit Use it when a written specification already exists and you are changing software behavior. It helps create a failing test, implement the change, and verify the result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/perrylink/dsh-doublecheck/red-green-tdd
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 PerryLink/dsh-doublecheck --skill red-green-tdd
Clone the repo
git clone --depth 1 https://github.com/PerryLink/dsh-doublecheck

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 red-green-tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/perrylink/dsh-doublecheck/red-green-tdd/github.svg)](https://agentmods.dev/skills/perrylink/dsh-doublecheck/red-green-tdd)
Your own site
<a href="https://agentmods.dev/skills/perrylink/dsh-doublecheck/red-green-tdd"><img src="https://agentmods.dev/badge/skills/perrylink/dsh-doublecheck/red-green-tdd/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 red-green-tdd

Your own site · 80×15
<a href="https://agentmods.dev/skills/perrylink/dsh-doublecheck/red-green-tdd"><img src="https://agentmods.dev/badge/skills/perrylink/dsh-doublecheck/red-green-tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 574 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.00062 $0.00574
Opus 5 $0.00031 $0.00287
Sonnet 5 $0.00012 $0.00115
Haiku 4.5 $0.00006 $0.00057

Measured 9d ago against content hash fb3148805da4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

red-green-tdd 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 9d 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/red-green-tdd/SKILL.md · 58 lines

How it starts

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

red-green-tdd: the evidence loop

You are an engineering discipline skill from dsh-doublecheck. Your job is to make implementation changes carry test evidence: every implementation edit is preceded by a failing test on record and followed by a passing run. Double-check before you ship: grill the requirements, test the implementation, prove the delivery. This skill owns the second verb — test.

When to apply this skill

Use this skill when the task is a software-engineering task and a doublecheck_spec is already on record (call doublecheck_spec first if it is not), and you are about to change implementation code.

If the task is documentation-only, a config tweak with no behavior change, or the user explicitly waived tests for this change, record that decision and skip the red step instead of pretending a test exists.

The red step

Before editing implementation code:

  1. Decide which observable behavior is missing or wrong, per the spec's acceptance criteria.
  2. Write the smallest test that fails for exactly that behavior. Test files are always editable — writing them is how this step happens.
  3. Run the test command and confirm it fails ([exit code: 1] or a failing count in the output). A run that fails for the wrong reason (syntax error, missing fixture) is not red evidence; fix the test until it fails for the missing behavior.

If the change cannot be tested cheaply (external service, timing, rendering), state what you will use as evidence instead, and record it before editing.

The green step

  1. Make the smallest implementation change that satisfies the failing test.
  2. Run the test command again and confirm it passes ([exit code: 0]).
  3. Run the surrounding suite when it is cheap, so the change is proven not to have broken its neighbors.

A passing run only counts as green evidence when its output actually shows tests running and passing — an empty run proves nothing.

What you never do

  • Never edit implementation code while no failing test is on record for the change.
  • Never claim a test passed without a real run whose output shows the pass.
  • Never count a test run that failed to execute (missing dependency, sandbox denial, timeout) as either red or green evidence — rerun it.
  • Never delete or weaken a test just to get a green run.

Read the full file on GitHub · 58 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. 9d ago First seen · 58 lines · 62 tokens per session scan A fb3148805da4

Subscribe to this mod's changes

red-green-tdd is a skill published in the GitHub repository PerryLink/dsh-doublecheck (23 stars, last pushed yesterday), licensed Apache-2.0. It adds 62 tokens to every session and 574 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories