fix-until-green

fix-until-green is a skill for Claude Code from ivy00johns/Skill-Madness. It costs 197 tokens per session (2,569 once invoked), scanned A, original, MIT.

An automated repair loop for a project whose tests, lint checks, or type checks are failing.

In plain words
What is it for?
Use it when a build or continuous-integration check is red and you want to bring tests, linting, and type checking back to passing.
Why use it?
It repeatedly fixes one underlying problem at a time and reruns the complete quality check, helping avoid quick changes that only hide failures.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the skill-madness plugin — 80 skills shipped together

Good fit Use it when a build or continuous-integration check is red and you want to bring tests, linting, and type checking back to passing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ivy00johns/skill-madness/fix-until-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 ivy00johns/Skill-Madness --skill fix-until-green
Clone the repo
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness

Made for: Claude Code.

Or install skill-madness, the plugin that ships this one along with the rest of its 80 skills.

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 fix-until-green

README.md
[![agentmods](https://agentmods.dev/badge/skills/ivy00johns/skill-madness/fix-until-green/github.svg)](https://agentmods.dev/skills/ivy00johns/skill-madness/fix-until-green)
Your own site
<a href="https://agentmods.dev/skills/ivy00johns/skill-madness/fix-until-green"><img src="https://agentmods.dev/badge/skills/ivy00johns/skill-madness/fix-until-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 fix-until-green

Your own site · 80×15
<a href="https://agentmods.dev/skills/ivy00johns/skill-madness/fix-until-green"><img src="https://agentmods.dev/badge/skills/ivy00johns/skill-madness/fix-until-green.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 197 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,569 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.00197 $0.02569
Opus 5 $0.00098 $0.01285
Sonnet 5 $0.00039 $0.00514
Haiku 4.5 $0.00020 $0.00257

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

Security

Grade A, and why

fix-until-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 10d 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/loops/fix-until-green/SKILL.md · 181 lines

How it starts

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

fix-until-green

A configuration of [loop-controller]. That skill supplies the loop machinery — primitive selection, the full guardrail stack, state externalization. This skill supplies the two things specific to "get the build green": a mechanical proof (three exit codes) and the fix discipline that keeps the loop from cheating its way there. Read loop-controller for the guardrails; they're inherited, not repeated here.

Why disable-model-invocation: this loop edits and commits code on its own until a gate passes. You want to type /fix-until-green (or have the orchestrator dispatch it) — not have Claude start an autonomous edit loop because a test happened to fail.

The 5-part contract

Part This loop
trigger red suite / CI, a failed build wave, or an explicit /fix-until-green (optionally scoped to a path)
action run the whole gate → read the highest-signal failure → fix one root cause → re-run the whole gate
proof test exits 0 AND lint exits 0 AND typecheck exits 0 — default-FAIL (assume red until all three are observed clean in the same run)
memory fix_plan.md (live TODO of remaining failures + the failure→fix log) once the loop runs past one iteration or has to escalate — a single trivial mechanical fix doesn't need the ceremony; plus a git checkpoint per green-ward step
stop all three clean OR iteration cap OR no-progress for 3 rounds OR budget cap

The proof: three exit codes, default-FAIL

"Green" is not "the test I was looking at passes." It is all three of test, lint, and typecheck exiting 0 in the same run, with no test removed or weakened to get there. Assume red until you have observed all three clean together — that's the default-FAIL stance. A loop that calls it done after fixing the one visible failure ships the other two broken.

Some stacks fold lint/typecheck into the test command or omit one (a dynamically typed project may have no typecheck step). Detect what actually exists (Step 1); a step that genuinely doesn't exist passes vacuously, but don't assume — absence must be confirmed, not guessed.

Read the full file on GitHub · 181 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 181 lines · 197 tokens per session scan A ec224d3ff89e

Subscribe to this mod's changes

fix-until-green is a skill published in the GitHub repository ivy00johns/Skill-Madness (11 stars, last pushed 2d ago), licensed MIT. It adds 197 tokens to every session and 2,569 once invoked, about $0.0010 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

systematic-debugging

4-phase root cause debugging: understand bugs before fixing.

NousResearch/hermes-agent · 16 tokens

langsmith-observability

LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.

davila7/claude-code-templates · 45 tokens

experimental-code-coverage-local-debugger

Runs code coverage locally via Universal Test Runner (UTR) or helper scripts, mimicking LUCI trybots. Activate when CQ tryjobs fail or underreport coverage, to test local GN/recipe repairs before uploading, or to debug hermetic crashes.

chromium/chromium · 59 tokens

adversarial-reviewer

Adversarial code review that assumes bugs exist and hunts for them. Use when asked to review code, find bugs, audit for correctness, stress-test a PR, or when someone says "tear this apart" or "what's wrong with this". Give no benefit of the doubt — every line is guilty until proven innocent.

emdash-cms/emdash · 71 tokens

cli-e2e

Write, modify, or debug Docker-based Composio CLI end-to-end tests under ts/e2e-tests/cli, including binary invocation, fixture isolation, output assertions, and package manifests. Use for CLI E2E test suites only; use cli-command for CLI source implementation.

ComposioHQ/composio · 62 tokens

work

Deliver one maintainer-approved EmDash issue, choosing the bug-fix path for a defect and the direct implementation path for an enhancement or task.

emdash-cms/emdash · 31 tokens