Optimize

Runs autonomous hill-climbing loops that mutate code or prompts, measure outcomes, and keep only winning changes.

Updated Sep 3, 2026
One-click install
npx skills add https://github.com/ruban-s/DevOS --skill optimize-ruban-s
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Optimize
Source: https://github.com/ruban-s/DevOS/tree/main/skills/Optimize
Command: npx skills add https://github.com/ruban-s/DevOS --skill optimize-ruban-s

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manual performance tuning and prompt refinement require dozens of tedious edit-measure-revert cycles, and most people stop at "good enough" far below the real ceiling. This Skill mechanizes the entire loop so improvements are kept only when they measurably win. ## Core Features & Use Cases - Metric Mode: Optimizes code targets against a shell command that emits a number, such as Lighthouse scores, bundle size, or ML validation loss, with configurable budgets, targets, and locked files. - Eval Mode: Optimizes skills, prompts, and agents using LLM-as-judge binary evals, auto-generating eval criteria and test inputs for approval before the loop starts. - Guard Rails and Recovery: Enforces ISC criteria as perpetual guard rails with automatic revert on violation, plus resume, status, and structured learnings extraction. - Use Case: Point it at a slow page with --metric lighthouse_perf --target 95 and it autonomously experiments on your source files until the score goal is reached or gains plateau. ## Quick Start Ask the agent to optimize your prompt file or skill directory with a target path, or provide a metric name, measurement command, and editable file globs to start an autonomous optimization loop.

Frequently Asked Questions about Optimize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize code performance with an autonomous agent loop?▼

Invoke metric mode with a metric name, a shell command that produces the measurement, and the file globs the agent may modify. The loop hypothesizes changes, measures each experiment, keeps improvements, and reverts regressions until gains plateau or a target value is reached.

How to optimize a prompt or skill using LLM-as-judge evals?▼

Use eval mode by passing a target path to a skill directory, prompt file, or agent definition. The system auto-generates 3-6 binary eval criteria and 3-5 test inputs for your approval, then runs the optimization loop scored by LLM-as-judge across multiple runs per experiment.

What is the difference between metric mode and eval mode?▼

Metric mode optimizes quantifiable targets like latency or bundle size using a shell command that emits a number, running about 12 experiments per hour. Eval mode handles qualitative targets like prompt quality using LLM-as-judge scoring, which is slower at roughly 6-8 experiments per hour.

Can I prevent the optimizer from modifying certain files?▼

Yes, use the --locked argument with a glob pattern to mark files the agent must not modify, and --constraints to add rules like requiring all tests to pass. Guard rail violations trigger an automatic revert regardless of score improvement.

What are the limitations of hill-climbing optimization?▼

Hill-climbing can get stuck in local optima, so if the score plateaus you may need to reset with different initial conditions. Regression tolerance should not be set to zero, since minor secondary regressions are acceptable when the primary metric improves significantly.