Auto-optimize: A Claude Code Plugin for Autonomous Performance Optimization

auto-optimize is a Claude Code plugin that automates the performance optimization cycle: profile, find bottlenecks, write fixes, benchmark, and repeat. The developer, a performance engineer working on a high-performance Java hash table, created it to eliminate manual optimization work.
How It Works
The plugin runs an autonomous loop per experiment with these steps:
- Profile — runs async-profiler and parses flamegraph output
- Plan — structured reasoning before touching code, including Step-Back (identifying bottleneck type abstractly), Chain-of-Thought (enumerating strategies with trade-off analysis), and Pre-mortem (assuming the plan already failed to identify potential issues)
- Implement — writes and applies the change
- Benchmark — runs JMH and compares against baseline
- Reflect — writes reflexion.md documenting what was surprising, what failed, and what to try next
Each subsequent experiment reads reflexion.md before profiling to avoid reproposing previously dropped experiments. Without this, the agent would "repropose the same dropped experiment two iterations later with equally confident reasoning — it had no way to know what it had already learned."
Sub-agent Architecture
Each experiment runs in a dedicated sub-agent. Raw profiling output, disassembly, diffs, and benchmark logs never touch the main context. The orchestrator only sees structured return values: what changed, what the numbers showed, and what to try next.
This architecture prevents context pollution: "When the main context fills up, agent behavior degrades in subtle ways — outputs still look coherent, but it starts reasoning about the wrong problem. Moving everything into sub-agents keeps the orchestrator clean indefinitely."
Installation and Usage
Install with:
claude plugin marketplace add bluuewhale/auto-optimize
claude plugin install auto-optimize@auto-optimize
Then run: /auto-optimize
You provide a goal, a benchmark command, and a success threshold. In one case, the developer prompted the plugin once and got a 27% faster hash table across all benchmark scenarios in approximately 3 hours.
📖 Read the full source: r/ClaudeAI
👀 See Also

Memctl: Open Source MCP Server for Persistent Memory in AI Coding Agents
Memctl is an open source MCP server that provides AI coding agents with persistent memory across sessions, machines, and IDEs. Built primarily with Claude Code in two weeks, it stores project context and serves it back in subsequent sessions.

Be brief beats caveman plugin in Claude Code compression benchmark
A 24-prompt benchmark shows Claude Code's caveman compression plugin produces the same token counts and quality as simply prepending 'be brief.' — but the plugin's consistent output shape and safety escape rules offer structural advantages.

Holaboss AI Runtime Moves to TypeScript, Implements Persistent MCP Ports
The Holaboss AI local agent runtime has been refactored to use TypeScript exclusively, eliminating Python dependencies and reducing bundle size. It now persists MCP server ports in SQLite with UNIQUE(port) constraints to prevent collisions across restarts.

McPherson AI releases two new QSR operations skills on ClawHub: food cost diagnostics and labor leak auditing
Two new free skills have been published on ClawHub: qsr-food-cost-diagnostic catches COGS issues weekly with a four-lever diagnostic, and qsr-labor-leak-auditor provides daily labor tracking with mid-week alerts to prevent overspend.