/skill-madness:perf-loopfrom skill-madness
Iteratively benchmarks and optimizes a metric (latency, throughput, page-load, bundle-size, memory, test-speed) under a fixed budget. Each round measures all paths, fixes the biggest hotspot, re-benchmarks, and verifies no functional regression. Trigger with "/perf-loop" or "optimize until under Nms".
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 "make it hit the budget": a measured proof under repeatable conditions (a named benchmark artifact, default-FAIL) and the measurement discipline that keeps a noisy benchmark from lying to the loop. Readloop-controllerfor the guardrails; they're inherited, not repeated here.Why
disable-model-invocation: this loop edits and commits code on its own and spends real time re-running benchmarks until a metric is under target. You want to type/perf-loop(or have the orchestrator dispatch it) — not have Claude start an autonomous optimize loop because a number looked slow.
| Part | This loop |
|---|---|
| trigger | a metric is over its budget (a slow path, a perf regression, a too-big bundle), or an explicit /perf-loop (optionally scoped to one path/benchmark) |
| action | ONE iteration: benchmark the whole measured set under fixed conditions → identify the single highest-leverage hotspot/regression → optimize one thing → re-benchmark the WHOLE set → re-run the functional suite |
| proof | the metric is under target on EVERY measured path in the benchmark output AND the functional suite still exits 0 — default-FAIL: assume over-budget until the benchmark, run under repeatable conditions, proves otherwise |
| memory | perf_baseline.json (the per-path measured numbers + variance, the durable baseline), PROGRESS.md (hotspot → change → delta log), a git checkpoint per measured improvement |
| stop | metric under target on every path AND suite green OR iteration cap OR no-progress for 3 rounds OR budget cap |
"Fast enough" is not "the profiler looked better" or "the one path I touched sped up." It is every measured path under its target in the benchmark output, re-measured across the whole set, with the functional suite still green — and the benchmark must be reproducible, or the number is noise, not proof. Assume over-budget until you have that artifact. A loop that declares victory off a single fast run on a warm cache ships a regression the next cold start exposes.
Two rules make the proof trustworthy:
references/benchmark-discipline.md.fix-until-green, don't re-implement the
gate. A change that drops latency but reds a test is not an improvement; it's a
regression that happens to be fast. The functional gate is part of the proof,
not a separate concern.Resolve, for this project, three things before looping — from
.claude/profile.yaml when present (so the same loop works across projects
without hard-coding):
If the profile doesn't declare them, detect the stack's benchmark/profiling
tooling (references/benchmark-discipline.md has the per-stack table) and
confirm the target with the human — an unstated budget is not a proof. Record
all three in perf_baseline.json so every iteration measures the identical thing
the identical way.
Run the benchmark across every measured path under the fixed conditions from
Step 1 (warm-up discarded, multiple runs, variance recorded), and write the
per-path numbers to perf_baseline.json. This whole-set baseline is what "no
regression elsewhere" is checked against — a single-path benchmark cannot prove
the loop didn't slow down a neighbor.
From the profile, pick the one change with the best expected delta-per-effort
— the dominant hotspot or worst regression against baseline, not the first slow
line you see. Optimize one thing per iteration (loop-controller Step 5):
batching destroys the signal about which change moved the number, and perf changes
routinely interact. Log the chosen hotspot + hypothesis in PROGRESS.md.
Re-run the entire benchmark from scratch — not just the path you touched.
This is loop-controller's "restart the streak": an optimization that speeds one
path while regressing another has made the set worse, and only a whole-set
re-measure catches it. Then re-run the functional suite via fix-until-green:
no green suite, no accepted improvement.
On a measured improvement (a path closer to budget, nothing regressed, suite
green), commit a checkpoint naming the hotspot fixed and the before/after
delta — the git trail is the loop's undo and its post-mortem. When every measured
path is under target and the suite is green, the loop is done; report the final
perf_baseline.json and benchmark output as evidence.
Inherits the full stack from loop-controller → references/safety.md. The
caps this loop sets:
.claude/profile.yaml if set). Hitting the cap is a stop-and-escalate: some
budgets aren't reachable without an architectural change, which is a human
decision, not a license to fake the number.loop-controller
guardrail 6, specialized to a measured proof.)fix-until-green re-run — that gate is non-negotiable.loop-controller guardrail 4).Per loop-controller Step 1, by how you're running it:
/goal: the proof is provable from the benchmark output you
surface each turn, so /goal "the benchmark reports every measured path under its target with run-to-run variance below the margin, and the functional suite exits 0 — or stop after N turns." The evaluator reads the benchmark numbers you
surface; remember /goal has no native budget, so embed the turn cap.stop_hook_active guard pattern is in loop-controller's references/safety.md.This is the performance-role inner loop (archetype 8). The orchestrator
dispatches it to drive a path under budget; it delegates the functional gate to
fix-until-green and the deep profiling judgment to performance-agent. The
orchestrator does not override a stuck loop — if perf-loop escalates after
no-progress or the cap, that's a real budget blocker (often an architectural one),
not a number to paper over. A satisfied perf_baseline.json informs the build;
the qe-agent's qa-report.json still decides the gate (loop-controller's
rule: the loop informs, the gate decides).
fix-until-green — its proof is exit codes (correctness); this loop's
is a measured number under repeatable conditions (speed). perf-loop composes
fix-until-green as its no-regression check — speed on top of, never instead of,
green.references/benchmark-discipline.md — the repeatable-benchmark checklist
(warm-up, fixed environment, multiple runs, variance, the noise floor), the
per-stack profiling/benchmark tooling table (web/page-load, backend latency,
bundle size, memory, test-suite speed), and the no-functional-regression rule
(how perf-loop delegates to fix-until-green).What SKILL.md sets; muted values are Claude Code's defaults
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".
/architecture-rescueFind deepening opportunities in a codebase (shallow modules, missing seams, leaky abstractions) and present them as numbered candidates for a grilling session before any interface is proposed. Use when the code feels tangled or hard to test. Trigger on "improve architecture", "rescue this codebase", "find refactoring opportunities", "ball of mud", "shallow modules"./artifact-publishPublish a visual or interactive result as a Claude Code Artifact: a self-contained HTML or Markdown page on a private, shareable claude.ai link instead of a local file. Use when a dashboard, report, chart, diagram or prototype reads better as a page. Not the claude.ai design canvas (claude-design-brief). Trigger on "publish this as an artifact", "make a shareable link", "give me a link to this"./babysitKeep an open PR healthy on a schedule: poll for review activity, auto-address bot and Copilot nits and routine rebases, re-run the gate, until the PR is mergeable. HITL on anything irreversible; never auto-merges. The scheduled loop around git-pr-feedback, run as "/loop 5m /babysit". Trigger on "babysit my PR", "watch this PR", "keep my PR green", "keep the PR rebased"./backend-agentBuild API servers, business logic and data layers against authored contracts. Use in native orchestrator dispatch or explicitly requested solo backend implementation; load it when the orchestrator assigns this role or the user asks for it.Other plugins' skills for the same job