red-synthesize-green

red-synthesize-green is a skill for Claude Code, Codex from SebastienDegodez/copilot-instructions. It costs 21 tokens per session (1,223 once invoked), scanned A, original, Apache-2.0.

A guide for using TDD, or test-driven development, through a failing behavior test followed by a clean implementation that makes it pass.

In plain words
What is it for?
Use it when adding a feature or fixing a bug: first prove the behavior fails, then confirm the test design before implementing the solution.
Why use it?
It prevents implementation from being written before the intended behavior has been clearly tested and reviewed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it when adding a feature or fixing a bug: first prove the behavior fails, then confirm the test design before implementing the solution.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sebastiendegodez/copilot-instructions/red-synthesize-green
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 SebastienDegodez/copilot-instructions --skill red-synthesize-green
Clone the repo
git clone --depth 1 https://github.com/SebastienDegodez/copilot-instructions

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-synthesize-green

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/sebastiendegodez/copilot-instructions/red-synthesize-green"><img src="https://agentmods.dev/badge/skills/sebastiendegodez/copilot-instructions/red-synthesize-green.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,223 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 pass 7 Sept 2026
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.00021 $0.01223
Opus 5 $0.00010 $0.00611
Sonnet 5 $0.00004 $0.00245
Haiku 4.5 $0.00002 $0.00122

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

Security

Grade A, and why

red-synthesize-green 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 11d 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.

plugins/superpowers-whetstone/skills/red-synthesize-green/SKILL.md · 126 lines

How it starts

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

RED → SYNTHESIZE GREEN (AI TDD Cycle)

Overview

2-step cycle replacing traditional 3-step TDD. Optimized for AI synthesis.

  • Traditional (3 steps): RED → green (dirty) → Refactor
  • AI-Optimized (2 steps): RED (behavior failure) → SYNTHESIZE GREEN (clean synthesis)

Architectural guidance is mandatory between steps.

Hard rule: No implementation code before RED is a clean behavior failure.

Step 1: RED (Behavior Failure Only)

Write the failing test. Run it.

  • Compilation errors = wishful thinking phase → implement stubs/empty returns to compile, rerun
  • Assertion/behavior failure = RED ✓ → proceed to Step 2
  • Never treat compilation errors as RED

Programming by Wishful Thinking: When your test won't compile, you're discovering the API you need. Stub just enough to compile, then confirm the test fails on behavior.

Between Steps: Architectural Guidance (MANDATORY)

Hard rule: This step is not skippable. Do not proceed to SYNTHESIZE GREEN without completing it.

Developer must review and explicitly validate the test before continuing. AI pauses here and waits for developer confirmation that the test correctly captures the intended behavior.

Orient design before synthesis:

  • Which pattern? (specification, factory, builder)
  • Which layer owns the logic?
  • Immutability, return values vs mutations?

Step 2: SYNTHESIZE GREEN (Clean Synthesis)

Implement complete, clean, production-ready solution in one shot.

  • Follows all architectural rules and coding standards
  • No dirty-then-refactor — synthesize properly from the start
  • Idiomatic code, domain semantics, SOLID principles
  • If test was misunderstood → revise test, restart from RED

No iteration after SYNTHESIZE GREEN unless RED was wrong or architectural guidance changed.

Common Rationalizations

Excuse Reality
"Compilation error IS red" No. Compilation = wishful thinking. RED = behavior failure.
"I'll write dirty code then refactor" That's 3-step TDD. SYNTHESIZE GREEN produces clean code.
"I can skip RED, I know it'll fail" Run it. RED proves your test catches real failures.

Read the full file on GitHub · 126 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. 11d ago First seen · 126 lines · 21 tokens per session scan A 14752fcdabc7

Subscribe to this mod's changes

red-synthesize-green is a skill published in the GitHub repository SebastienDegodez/copilot-instructions (193 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 21 tokens to every session and 1,223 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-30.

Related

Other skills, from other repositories

testing

TDD/BDD testing principles. Use when writing tests, reviewing test coverage, setting up testing, or discussing test strategy and test architecture.

TheBeardedBearSAS/claude-craft · 30 tokens

workflow-analysis

Workflow d'Analyse Obligatoire. Use when working with workflow analysis.

TheBeardedBearSAS/claude-craft · 17 tokens

outside-in-tdd

Use when an approved scenario, Gherkin example, worked example, or expected result has to become working software through outside-in / double-loop TDD -- start from an acceptance or application-boundary test, get a trustworthy RED before implementation, let domain logic emerge only from failing behavior, and drive one…

SebastienDegodez/skraft-plugin · 173 tokens

quality-gates-dotnet

Use when the active repository is a .NET solution (.sln / .csproj present) and the software-engineer must produce falsifiable evidence for the quality gates. Most gates are captured at the end of the COMMIT phase; the G10 RED capture is taken at RED, before any production code, and cannot be reconstructed later.…

SebastienDegodez/skraft-plugin · 104 tokens

quality-gates-evidence-contract

Use when producing or verifying the structured evidence log that attests quality gates (tests, build, mutation, commits, RED/GREEN integrity). Tech-agnostic schema. Loaded by software-engineer (writer) at COMMIT phase and by quality-gates-lens (reader) during review.

SebastienDegodez/skraft-plugin · 66 tokens

tdd-workflow

Test-Driven Development workflow principles. RED-GREEN-REFACTOR cycle.

ashrafmusa/agenticana · 21 tokens