Optimize

Automate iterative optimization loops using metrics or LLM-guided evaluations.

1|Updated Jun 10, 2026
One-click install
npx skills add https://github.com/starlink-awaken/pai-universal --skill optimize-starlink-awaken
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Optimize
Source: https://github.com/starlink-awaken/pai-universal/tree/main/templates/packs/Optimize/src
Command: npx skills add https://github.com/starlink-awaken/pai-universal --skill optimize-starlink-awaken

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates an autonomous optimization loop that iteratively improves a target using either a measurable metric or LLM-guided eval.

Core Features & Use Cases

  • Metric Mode and Eval Mode enable targeting both codebases with quantifiable metrics and qualitative evaluations of skills/prompts/agents.
  • The workflow follows a seven-phase loop (OBSERVE, THINK, PLAN, BUILD, EXECUTE, VERIFY, LEARN) to systematically search, test, and apply improvements, with sandboxing, resume, and status reporting.
  • Use cases include optimizing performance, latency, bundle size, or quality of prompts/agents, across code, prompts, or agent workflows.

Quick Start

Run the optimize tool with a target or metric 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 automate an optimization loop to iteratively improve code or prompts?

An autonomous optimization loop iteratively improves a target by cycling through seven phases: OBSERVE, THINK, PLAN, BUILD, EXECUTE, VERIFY, and LEARN. You can run it using a measurable metric or LLM-guided evaluation to systematically search and apply improvements.

Can I use LLM-guided evaluation to optimize agent workflows and prompts?

Yes, LLM-guided evaluation supports optimizing qualitative targets like skills, prompts, and agent workflows. Eval mode applies automated evaluation criteria to iteratively refine and enhance the quality of your autonomous agent workflows.

How do I set up sandboxed experiments for autonomous code optimization?

Autonomous code optimization runs sandboxed experiments by applying CLI arguments like --target and --metric. This isolates tests during the EXECUTE and VERIFY phases, ensuring safe iterative improvements without destabilizing your main environment.

What is the difference between metric mode and eval mode for iterative target optimization?

Metric mode targets codebases using quantifiable metrics like performance or bundle size, while eval mode targets qualitative evaluations of skills and prompts. Both modes drive the seven-phase autonomous optimization loop to improve the target.

How do I resume an interrupted autonomous optimization loop?

An interrupted autonomous optimization loop can be resumed using built-in status checks and resume functionality. This allows the workflow to continue from its last known state without losing prior experimental progress or learned data.

What budget constraints can I set for an autonomous optimization workflow?

You can define budget constraints and limits using CLI arguments like --budget and --max-experiments. These parameters restrict the number of iterative testing cycles the autonomous optimization loop executes before stopping.