/skill-madness:fix-until-greenfrom skill-madness
Drives a failing build to passing by running the full gate (tests, lint, typecheck), fixing one root cause per round, and re-running until all three exit clean. Prevents cheating the gate with hard caps and no-progress detection.
Ships in skill-madness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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. Readloop-controllerfor the guardrails; they're inherited, not repeated here.Why
disable-model-invocation: this loop edits 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.
| 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 |
"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.
Find the three commands for this project before looping. Precedence:
.claude/profile.yaml if present — use ci_cd.test_command and
ci_cd.lint_command verbatim. The profile has no typecheck key; resolve that
one from step 2 or 3.package.json scripts, Makefile targets,
pyproject.toml / tox.ini, Cargo.toml, go.mod, composer.json. Prefer
the project's own named script (npm run test, make check) over a raw tool
invocation, so you run what CI runs.references/gate-commands.md.Record the three resolved commands in fix_plan.md so every iteration runs the
identical gate. Running a different command than CI is the most common way a
"green" loop produces a still-red PR.
Run all three commands, capture exit codes and output. Then pick one root-cause failure to fix — not the first line of the stack trace, the cause. Twenty failures with one shared cause is one fix, not twenty. Don't shotgun edits across many failures in a single iteration; that destroys the signal about what actually moved the gate.
diagnose-loop rather than guessing. Its Phase-1 discipline (build a fast,
deterministic, binary-signal reproduction first) is exactly what a fix loop
needs and exactly what gets skipped under pressure to go green.Re-run all three commands from scratch — not just the one you touched. A fix that greens the failing test but reds typecheck has made the gate worse, and only a full re-run catches it. This is the "restart the streak" rule: the proof is about the whole, re-checked after every change.
On a green-ward step (strictly fewer failures, nothing new broken), checkpoint
it: when the owner has authorized commits, commit with a message naming the root
cause fixed; otherwise record the diff and the gate output in fix_plan.md. That
trail is the loop's undo and its post-mortem. When all three exit 0 together, the loop is
done; report the final gate output as evidence.
Inherits the full stack from loop-controller → references/safety.md. The
caps this loop sets:
skip-ping a failing test, weakening an assertion, adding an
ignore directive (// eslint-disable, # type: ignore, @ts-expect-error) to
silence rather than fix, or relocating a violation into the checker's blind
spot. If a test is genuinely wrong, that's a human decision — surface it, don't
unilaterally delete it. (Anthropic's harness, verbatim: "It is unacceptable to
remove or edit tests.")test+lint+typecheck exiting 0
against a stubbed DB, a fake API, or a mock provider proves the mocked build
is internally consistent, not that the product works. That's a real result
worth having (it compiles, the wiring type-checks), and a perfectly good gate
for this loop. It is not "done" for anything whose value depends on the
real path. When that's the situation, say so out loud — "three exit codes green
against the mock; the real <X> path is unexercised" — and route the gap to
qe-agent / coverage-loop; don't let a green badge imply the product runs.
See loop-controller Step 2, measure the goal, not a stand-in.Per loop-controller Step 1, by how you're running it:
/goal: the proof is provable from command output, so
/goal "the test, lint, and typecheck commands for this project all exit 0 in the same run, with no test removed or weakened — or stop after N turns." The
/goal evaluator reads the gate output you surface each turn. Remember the
embedded turn cap — /goal has no native budget.stop_hook_active guard are in
references/stop-hook.md.claude -p (Ralph) for a long, greenfield, fresh-context-per-iteration run
— sandboxed, with an external iteration/token counter.This is the QE inner loop and a natural wave gate. When the orchestrator
dispatches it (or wires the Stop-hook into a wave), failures route back to the
owning agent by file: a red typecheck in src/api/ goes to the backend
agent, not a generic "fix it." The orchestrator does not override a stuck
loop — if fix-until-green escalates after no-progress, that's a real blocker for
the QA gate, not a number to paper over. The relationship to the QA gate is
exactly loop-controller's rule: the loop informs, the qe-agent's
qa-report.json still decides.
references/gate-commands.md — per-stack detection of the test / lint /
typecheck commands (node, python, rust, go, ruby, java, php, …) and how to
compose three exit codes into one pass/fail.references/stop-hook.md — the Stop-hook gate that ships with this skill: the
script, the stop_hook_active guard, and how to wire it into a build or have a
role skill inherit it.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ivy00johns/skill-madness --plugin skill-madness87 skills in this plugin
/accessibility-auditAudit and fix web accessibility against WCAG 2.2 AA, Section 508 and the ADA: axe scan, keyboard, screen-reader and zoom checks, plain-language content and PDFs, source fixes, and an honest conformance report (ACR/VPAT draft). Use for any a11y review, fix or compliance question. Trigger on "accessibility audit", "is this ADA compliant", "Section 508", "WCAG", "VPAT", "a11y"./andonRun work through a live Andon board (the kanban that dispatches cards to Claude Code, Codex and Gemini on your machines): push a plan's cards with the skills each run must load, read the board, answer what needs you, administer a machine, and refresh this skill when Andon changes. Trigger on "/andon", "put this plan on andon", "what needs me on andon", "why isn't my card running".
/Other plugins' skills for the same job