What problem does it solve?
The Optimize skill unit helps in automatically optimizing various targets like code, AI models, and tasks. It allows users to either work with quantitative metrics (e.g., performance score, bundle size) or qualitative assessments based on binary evals using an LLM-as-judge system.
Core Features & Use Cases
- Autonomous Optimization Loop: Runs optimization against any target (code, AI, etc.) by adjusting parameters, measuring outcomes, and learning from improvements.
- Metric Mode: Automate performance tuning using specific metrics and measurements (e.g., Lighthouse scores for web pages).
- Eval Mode: Use the LLM's judgment for evaluating skills, prompts, agents, and any text target with custom criteria and test inputs.
- Use Case: Improve a website's load time or the quality of a machine learning model through systematic testing and iterative optimization.
Quick Start
To run the Optimize skill for optimizing performance, type:
/optimize --metric "lighthouse_score" --higher-is-better
--measure "npx lighthouse http://localhost:3000 --output=json"
--extract "jq '.categories.performance.score * 100' lighthouse.json"
--files "src//*.tsx,src//*.css"
--budget 120