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

OpenClaw Local Agent Implementation with TurboQuant Caching for Mid-Range Hardware
A one-click app for OpenClaw with local models now runs on mid-range devices like MacBook Air with 16GB RAM using TurboQuant caching and context warming. The implementation patches llama.cpp for reliable tool calling and achieves 10-15 tokens per second with Gemma 4 and QWEN 3.5.
mcp-memory: SQLite FTS5 + Google's OKF for Fast Agent Memory
mcp-memory is an MCP server that gives AI agents persistent memory using Google's OKF format and SQLite FTS5 for sub-20ms lookups. Includes four tools: memory_store, memory_retrieve, memory_search, and memory_get_last.

Claw Code Agent: Python Reimplementation of Claude Code Architecture for Local Models
Claw Code Agent is a Python reimplementation of the Claude Code agent architecture that runs with local open-source models through OpenAI-compatible backends like vLLM and Ollama, featuring tool calling, slash commands, and tiered permissions.

Text Adventure Game Engine Skill for Claude Desktop
A text adventure game engine runs entirely inside Claude Desktop as a skill with no servers, apps, or code to run. It includes full RPG mechanics, 3D dice rendering, 19 expansion modules, and portable save files.