Skip to content
Skill

Perf loop

Loops a benchmark-driven fix cycle until every measured path meets its budget

Perf loop is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
12
Last commit
License
MIT
Listing updated

Similar skills

About Perf loop

Perf Loop drives an AI coding agent through repeated optimize-and-measure rounds until a performance metric such as latency, page load, bundle size, memory or test-suite time falls under its target on every measured path. Each round benchmarks the whole measured set under fixed conditions, picks the single biggest hotspot or regression, changes one thing, then re-benchmarks everything and re-runs the functional test suite. Changes that speed up one path while slowing another, or that break tests, are rejected.

The skill sets strict proof rules: warm-up runs are discarded, multiple runs are recorded with their variance, and the agent assumes a path is over budget until a repeatable measurement shows otherwise. Progress is kept in a per-path baseline file and a progress log, with a git checkpoint for each measured improvement. The loop stops when all paths pass, when an iteration cap is reached, after three rounds without progress beyond noise, or when a budget cap is hit.

The skill expects a project with a defined budget and a benchmark command, which can come from a profile file or be confirmed with the user. It is built for Claude Code, relies on a companion loop skill for guardrails, and is intended to be invoked manually rather than started automatically.

When your agent uses it

Optimize a metric under its budget: benchmark the whole set under fixed conditions, fix the biggest hotspot, re-benchmark, until every measured path is under target with no functional regression. Use for latency, throughput, page-load, bundle-size, memory or test-speed targets. Trigger on "optimize until under Nms", "get page load under budget", "shrink the bundle", "perf loop".

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 2 files (19 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the skill-madness plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ivy00johns/Skill-Madness
/plugin install skill-madness@skill-madness

Or copy only this skill to ~/.claude/skills/perf-loop:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/perf-loop &&
cp -R "$tmp/skills/loops/perf-loop" ~/.claude/skills/perf-loop &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/perf-loop inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/perf-loop to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/perf-loop &&
cp -R "$tmp/skills/loops/perf-loop" ~/.agents/skills/perf-loop &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/perf-loop inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/perf-loop to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/perf-loop &&
cp -R "$tmp/skills/loops/perf-loop" ~/.cursor/skills/perf-loop &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/perf-loop inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/ivy00johns/Skill-Madness.git --path skills/loops/perf-loop

Or copy the folder to ~/.gemini/skills/perf-loop yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/perf-loop:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/perf-loop &&
cp -R "$tmp/skills/loops/perf-loop" ~/.copilot/skills/perf-loop &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/perf-loop inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git

Then copy Skill-Madness/skills/loops/perf-loop into your agent's skills folder as perf-loop. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Whole-set benchmarking
Measures every target path under fixed conditions before and after each change.
Single-hotspot optimization
Changes one highest-leverage hotspot per round so the effect on the metric stays clear.
Noise-aware measurement
Discards warm-up runs, records multiple runs and tracks variance before trusting a result.
Functional regression gate
Re-runs the test suite after every change and rejects speedups that break behavior.
Baseline and progress log
Stores per-path numbers in a baseline file and logs each hotspot, change and delta.
Iteration and stall limits
Stops on an iteration cap, three rounds without meaningful progress, or a budget cap.

Good for

  • Get a page load under a set millisecond budget
  • Shrink a web app's JavaScript bundle below a size limit
  • Bring API p95 latency under a target without breaking tests
  • Reduce peak memory usage of a service to a set ceiling
  • Speed up a slow test suite to a target wall-clock time

Perf loop FAQ

When does Perf loop trigger?

It is meant to be invoked explicitly, for example with /perf-loop, or when phrases such as optimize until under a given number of milliseconds, get page load under budget, shrink the bundle or perf loop are used. Automatic invocation is disabled.

What does Perf loop need to run?

It requires Claude Code. A performance budget and a benchmark command are needed; these can be read from a project profile file or confirmed with the user before the loop starts.

How does Perf loop avoid faking results?

It forbids weakening the benchmark, loosening targets without approval or reporting a single lucky run. Speedups must keep the functional test suite passing.

Does Perf loop include scripts or extra files?

The folder has two files and no scripts. A reference document covers the benchmark checklist, per-stack tooling and the regression rule.

How do I install Perf loop in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/perf-loop to use it in all your projects, or to .claude/skills/perf-loop in one project. Or install the skill-madness plugin, which includes it: /plugin marketplace add ivy00johns/Skill-Madness, then /plugin install skill-madness@skill-madness.

Does Perf loop run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Perf loop?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Perf loop?

The closest alternatives to Perf loop are Benchmark optimization loop, Optimize loop, Benchmark checklist, Performance reasoning and Optimize.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from ivy00johns/Skill-Madness

  1. Finds merged and stale git branches, then deletes them only after your confirmation

    • Open source
    • 12 GitHub stars
    • Developer tools
  2. Finds and removes git worktrees whose changes are already merged into main

    • Open source
    • 12 GitHub stars
    • Developer tools
  3. Bulk-scans a skill ecosystem for consistency, quality gaps and ownership conflicts

    • Open source
    • 12 GitHub stars
    • Developer tools
  4. Runs a single-skill quality review covering structure, triggering and output checks

    • Open source
    • 12 GitHub stars
    • Developer tools
  5. Turns skill review or audit reports into a prioritized list of concrete SKILL.md fixes

    • Open source
    • 12 GitHub stars
    • Developer tools
  6. Applies planned edits to SKILL.md files, validates them, and offers to sync

    • Open source
    • 12 GitHub stars
    • Developer tools