

[Example Dashboard] [Glossay-Annotated Dashboard]
Historically, the task of improving software has been performed by humans who knew
too much about how computers worked. As punishment knowing too much about them,
the computers become better than us at this task (and soon everything).
Auto-optimization is the process by which agents iteratively find improvements
to a codebase which optimize a given performance measure (or set of such measures).
Almost all agentic systems can perform the core mechanics of auto-optimization via
simple looping without the need for a skill, but the specifics of the process, the
logging, and the monitoring, will change run to run. Accordingly, the majority of
this skill is not about optimization itself, but everything surrounding that
process, e.g., setting up a consistent file system and drafting a PR with the
changes. This repository implements auto-optimization with all of the
quality-of-life features I always wished I had in the past to force robust statistics,
deterministic behavior, layout + logging + hooks, and pretty dashboards. These
features also focus on making the skill extensible to work in whatever systems you
already have in place, e.g., your own dashboards for monitoring processes.
Conceptually, there are many things you may wish to auto-optimize, with performance
of a machine learning model being the most popular. Each thing has a slightly
different shape and so will have a separate skill. Currently, this repository only
ships with auto-optimize-code, which focuses on optimizing the speed and memory
usage of code (including model inference!) subject to identical outputs or other
reasonable relaxed gates. As a random note, I have found that Sonnet 5.5 is very
good at this task and produced better outputs much faster than Opus 5.5 with xhigh
thinking. This may depend on your setup, though. More will be coming soon!
An interesting note about optimizing code speed via auto-optimize is that overfitting
is good! Now, instead of having to produce a general-purpose implementation that
works for everyone, regardless of compiler and hardware (including GPU type), you can
fit the software to your specific device. As long as the outputs are identical,
using a different set of CUDA kernels optimized for your specific GPU, or inlined
functions that work with your specific compiler, is no problem.
You are free to use the outputs of this process however you would like, including
for commercial use, without requirements for attribution. However, finding a way
to support our work, even in small ways such as shout-outs, is always appreciated
so we can continue to do this in the future.
Developed at the Programmable Genomics Laboratory @ UMass Chan Medical School.
Everything below this is Claude-generated and human-reviewed. It is verbose, but
also comprehensive documentation of a non-trivial tool.
Requirements
- Claude Code. The skill spawns subagents and asks you questions, so it needs
Claude Code's Agent and AskUserQuestion tools; the orchestrator, itself a
subagent, spawns the iteration subagents.
- Linux, Python 3.9 or later as
python3, git and tar. The skill's scripts use
only the standard library.
- For the dashboard in a notebook: JupyterLab, IPython and plotly; psutil for
the host and process panels.
- For a benchmark that uses GPUs:
CUDA_VISIBLE_DEVICES set by the machine's
GPU allocator, which the interview asks about.
auto-optimize doctor checks these once the installer is available (below).
Install
The skill is one folder, skills/auto-optimize-code/. Each method below puts
that folder where Claude Code looks for skills; use one of them.
As a Claude Code plugin. In Claude Code:
/plugin install auto-optimize --marketplace jmschrei/auto-optimize
or, in two steps, /plugin marketplace add jmschrei/auto-optimize and then
/plugin install auto-optimize@auto-optimize. From a shell, claude plugin marketplace add jmschrei/auto-optimize and then claude plugin install auto-optimize@auto-optimize. The skill shows as
auto-optimize:auto-optimize-code. Update it with claude plugin update auto-optimize@auto-optimize.
With the installer, no clone. With uv:
uvx auto-optimize install # into ~/.claude/skills/, for every project
uvx auto-optimize install --project # into ./.claude/skills/, for this project only