# Benchmark optimization loop

> Benchmark optimization loop is an open-source agent skill for developer tools. Runs a bounded, measured loop to improve an implementation against a fixed benchmark. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/smartworldarafath/REA_Skill/tree/main/.agents/skills/benchmark-optimization-loop
- **Repository:** https://github.com/smartworldarafath/rea_skill
- **GitHub stars:** 66
- **License:** MIT
- **Skill name:** benchmark-optimization-loop
- **Collection:** https://github.com/smartworldarafath/REA_Skill
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill guides an agent through a repeatable improvement cycle for a stated goal such as correctness, quality, reliability, speed or cost. Before changing anything, the agent has to pin down the success threshold, hard constraints, primary metric, representative inputs, expected results and search budget, then record a reproducible baseline.

The workflow measures the baseline, tests variants that each carry a single hypothesis, and rejects any variant that breaks correctness, safety or reproducibility. The best admissible variant is promoted, its winning path is codified in a script, command, test or doc, and baseline and winner are rerun to confirm the delta. Every run is kept in a ledger with exact commands, versions, case counts and failure rates, and the skill includes guidance on recursive search, such as keeping independent acceptance cases separate from tuning data and stopping when gains fall within noise.

The skill itself is a set of instructions with reference material and no bundled scripts. It relies on the host's existing Read, Write, Edit, Bash, Grep and Glob tools and does not grant new permissions. Users supply their own benchmark, evaluator and test data.

## When your agent uses it

> Turn a user's improvement goal into a bounded benchmark-guided loop: define success and hard constraints, establish a baseline, test one-hypothesis variants, and promote the best measured admissible result with reproducible commands. Use for repeated measured improvements to correctness, quality, task completion, reliability, speed, or cost, including recursive optimization and implementation comparisons.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/smartworldarafath/REA_Skill/tree/HEAD/.agents/skills/benchmark-optimization-loop)
- [License: MIT](https://github.com/smartworldarafath/REA_Skill/tree/HEAD/.agents/skills/benchmark-optimization-loop)

## Features

- **Goal and constraint setup:** Defines the success threshold, hard constraints and primary metric before any optimization begins.
- **Baseline measurement:** Establishes a reproducible starting point with recorded implementation, input and environment versions.
- **One-hypothesis variants:** Tests each candidate change against a single hypothesis under comparable conditions.
- **Admissibility gating:** Rejects variants that fail correctness, safety or reproducibility regardless of speed or score.
- **Run ledger:** Logs every run with commands, results, failures, retries and keep or reject decisions.
- **Promotion checklist:** Requires repeated deltas, rollback readiness and source-controlled encoding before a winner becomes default.

## Good for

- Make a data import job faster without changing its output
- Compare several implementations of a parser and keep the most accurate one
- Reduce flaky failures in a test suite with measured reruns
- Cut the cost per task of an LLM pipeline while keeping quality above a set bar
- Verify that a reconciliation fix produces correct totals across all periods

## Install

### Claude Code

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

```sh
/plugin marketplace add smartworldarafath/REA_Skill
/plugin install rea-skills@smartworldarafath
```

Or copy only this skill to `~/.claude/skills/benchmark-optimization-loop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/benchmark-optimization-loop &&
cp -R "$tmp/.agents/skills/benchmark-optimization-loop" ~/.claude/skills/benchmark-optimization-loop &&
rm -rf "$tmp"
```

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

### Codex

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/benchmark-optimization-loop &&
cp -R "$tmp/.agents/skills/benchmark-optimization-loop" ~/.agents/skills/benchmark-optimization-loop &&
rm -rf "$tmp"
```

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

### Cursor

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/benchmark-optimization-loop &&
cp -R "$tmp/.agents/skills/benchmark-optimization-loop" ~/.cursor/skills/benchmark-optimization-loop &&
rm -rf "$tmp"
```

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

### Gemini CLI

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

```sh
gemini skills install https://github.com/smartworldarafath/REA_Skill.git --path .agents/skills/benchmark-optimization-loop
```

Or copy the folder to `~/.gemini/skills/benchmark-optimization-loop` yourself.

### VS Code

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/benchmark-optimization-loop &&
cp -R "$tmp/.agents/skills/benchmark-optimization-loop" ~/.copilot/skills/benchmark-optimization-loop &&
rm -rf "$tmp"
```

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

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git
```

Then copy `REA_Skill/.agents/skills/benchmark-optimization-loop` into your agent's skills folder as `benchmark-optimization-loop`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need before Benchmark optimization loop starts optimizing?

It requires the user task, the operation being optimized, a success threshold, hard constraints, a primary metric, representative inputs with independent expected results, a reproducible baseline and a search budget. It asks the user to decide on missing thresholds rather than guessing.

### Does Benchmark optimization loop install tools or change permissions?

No. It uses the host's already-authorized tools and states that loading the workflow does not grant tools or expand permissions. It also does not install a scheduler or grant release authority.

### When should the loop not be used?

The skill says to reuse an existing adequate regression check for a one-off fix and not to add a search loop without a reason. Plan-only requests stay plans.

### Are scripts included?

No. The skill folder contains instructions and reference material only, and it does not ship any scripts.

### How do I install Benchmark optimization loop in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/benchmark-optimization-loop to use it in all your projects, or to .claude/skills/benchmark-optimization-loop in one project. Or install the rea-skills plugin, which includes it: /plugin marketplace add smartworldarafath/REA_Skill, then /plugin install rea-skills@smartworldarafath.

### Does Benchmark optimization 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 Benchmark optimization loop?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Benchmark optimization loop?

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

## Where this comes from

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

## Alternatives

- [Optimize](https://ai-powered.com/skills/optimize-jasgujral): Optimize is an open-source agent skill for developer tools.
- [Performance reasoning](https://ai-powered.com/skills/performance-reasoning): Performance reasoning is an open-source agent skill for developer tools.
- [Benchmark checklist](https://ai-powered.com/skills/benchmark-checklist): Benchmark checklist is an open-source agent skill for developer tools.
- [Optimize loop](https://ai-powered.com/skills/optimize-loop): Optimize loop is an open-source agent skill for developer tools.
- [Benchmark](https://ai-powered.com/skills/benchmark): Benchmark is an open-source agent skill for developer tools.
- [Performance](https://ai-powered.com/skills/performance): Performance is an open-source agent skill for developer tools.
- [Benchmarks](https://ai-powered.com/skills/benchmarks): Benchmarks is an open-source agent skill for developer tools.
- [Write kaggle benchmarks](https://ai-powered.com/skills/write-kaggle-benchmarks): Write kaggle benchmarks is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/benchmark-optimization-loop
