Optimize

Run iterative optimization loops for code and AI models.

17.4k|2.3k|Updated Sep 8, 2025
One-click install
npx skills add https://github.com/danielmiessler/LifeOS --skill optimize-danielmiessler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Optimize
Source: https://github.com/danielmiessler/LifeOS/tree/main/LifeOS/install/skills/Optimize
Command: npx skills add https://github.com/danielmiessler/LifeOS --skill optimize-danielmiessler

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of optimizing code and AI models, saving time and effort in the iterative improvement process.

Core Features & Use Cases

  • Autonomous Optimization Loop: Automatically modifies a target, measures the result, and repeats until improvements are no longer found.
  • Metric Mode: Optimizes code targets that produce a number (e.g., latency, bundle size).
  • Eval Mode: Optimizes skills, prompts, or agents judged by LLM-as-judge binary evals.
  • Use Case: Optimize the performance of a web application by automatically adjusting code to improve page load time.

Quick Start

Run the optimize skill to start an optimization loop for your target, using the following command:

/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

Frequently Asked Questions about Optimize

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

FAQPage Schema
How do I automate code optimization for specific metrics like bundle size?

You can automate code optimization by running an iterative loop that modifies target files, measures the result using a specified shell command, and repeats until improvements stop. This metric mode optimizes targets that produce a number, like bundle size or latency.

Can I use LLM-as-judge evaluations to optimize AI prompts automatically?

Yes, you can optimize AI prompts automatically using eval mode. This mode runs an iterative process that modifies prompts or agents and measures success using LLM-as-judge binary evaluations, repeating until no further improvements are found.

What is an autonomous optimization loop for AI models and how does it work?

An autonomous optimization loop for AI models automatically modifies a target, measures the result against an evaluation metric, and repeats the process iteratively. It halts the loop when successive modifications no longer yield measurable improvements.

Do I need specific shell commands to measure success when optimizing code?

Yes, you need specific shell commands to measure success when optimizing code. The optimization loop requires a defined shell command to execute the target and a jq extraction command to pull the numerical metric from the output.

How do I stop an automated optimization loop from running indefinitely?

You can stop an automated optimization loop from running indefinitely by setting a budget parameter. The loop naturally terminates when iterative modifications no longer produce measurable improvements or when the defined budget is exhausted.