# Prompt optimize

> Prompt optimize is an open-source agent skill for ai models and llm tooling. Use when the user has a prompt that feeds a system they can already score, and wants that prompt automatically improved to raise the score a. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/gaasher/Agent-Loop-Skills/tree/main/loops/prompt-optimize
- **Repository:** https://github.com/gaasher/agent-loop-skills
- **GitHub stars:** 183
- **License:** MIT
- **Skill name:** prompt-optimize
- **Collection:** https://github.com/gaasher/Agent-Loop-Skills
- **Categories:** AI models and LLM tooling
- **Listing updated:** 2026-11-17

## About

Use when the user has a prompt that feeds a system they can already score, and wants that prompt automatically improved to raise the score against their own evaluation command. Makes one targeted quality edit per iteration — clarity, context, specificity, structure, examples, decomposition, guardrails — re-runs the user's eval to measure the metric, and keeps the edit only if the metric improves, else reverts; loops to a target, plateau, or budget. The metric is whatever the user's eval command prints (task accuracy, an LLM-judge score, a pass rate, a tool-call success rate); the loop is metric-agnostic and never edits the eval. Not for writing a prompt from scratch, not for tuning model weights or hyperparameters, and not for one-off manual prompt edits without a score.

## When your agent uses it

> Use when the user has a prompt that feeds a system they can already score, and wants that prompt automatically improved to raise the score against their own evaluation command. Makes one targeted quality edit per iteration — clarity, context, specificity, structure, examples, decomposition, guardrails — re-runs the user's eval to measure the metric, and keeps the edit only if the metric improves, else reverts; loops to a target, plateau, or budget. The metric is whatever the user's eval command prints (task accuracy, an LLM-judge score, a pass rate, a tool-call success rate); the loop is metric-agnostic and never edits the eval. Not for writing a prompt from scratch, not for tuning model weights or hyperparameters, and not for one-off manual prompt edits without a score.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/gaasher/Agent-Loop-Skills/tree/HEAD/loops/prompt-optimize)
- [License: MIT](https://github.com/gaasher/Agent-Loop-Skills/tree/HEAD/loops/prompt-optimize)

## Install

### Claude Code

This skill ships in the `agent-loops` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add gaasher/Agent-Loop-Skills
/plugin install agent-loops@agent-loop-skills
```

Or copy only this skill to `~/.claude/skills/prompt-optimize`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/gaasher/Agent-Loop-Skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/prompt-optimize &&
cp -R "$tmp/loops/prompt-optimize" ~/.claude/skills/prompt-optimize &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/prompt-optimize` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/prompt-optimize` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/gaasher/Agent-Loop-Skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/prompt-optimize &&
cp -R "$tmp/loops/prompt-optimize" ~/.agents/skills/prompt-optimize &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/prompt-optimize` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/prompt-optimize` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/gaasher/Agent-Loop-Skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/prompt-optimize &&
cp -R "$tmp/loops/prompt-optimize" ~/.cursor/skills/prompt-optimize &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/prompt-optimize` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/gaasher/Agent-Loop-Skills.git --path loops/prompt-optimize
```

Or copy the folder to `~/.gemini/skills/prompt-optimize` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/prompt-optimize`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/gaasher/Agent-Loop-Skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/prompt-optimize &&
cp -R "$tmp/loops/prompt-optimize" ~/.copilot/skills/prompt-optimize &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/prompt-optimize` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/gaasher/Agent-Loop-Skills.git
```

Then copy `Agent-Loop-Skills/loops/prompt-optimize` into your agent's skills folder as `prompt-optimize`. Agents that support SKILL.md read one folder per skill.

## FAQ

### How do I install Prompt optimize in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/prompt-optimize to use it in all your projects, or to .claude/skills/prompt-optimize in one project. Or install the agent-loops plugin, which includes it: /plugin marketplace add gaasher/Agent-Loop-Skills, then /plugin install agent-loops@agent-loop-skills.

### Does Prompt optimize run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Prompt optimize?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Prompt optimize?

The closest alternatives to Prompt optimize are Academy guide, MCP builder, Claude API, Nano banana pro openrouter and Generate image.

## Alternatives

- [Academy guide](https://ai-powered.com/skills/academy-guide): Academy guide is an agent skill for ai models and llm tooling.
- [MCP builder](https://ai-powered.com/skills/mcp-builder): MCP builder is an agent skill for ai models and llm tooling.
- [Claude API](https://ai-powered.com/skills/claude-api): Claude API is an agent skill for ai models and llm tooling.
- [Nano banana pro openrouter](https://ai-powered.com/skills/nano-banana-pro-openrouter): Nano banana pro openrouter is an open-source agent skill for design and media.
- [Generate image](https://ai-powered.com/skills/generate-image): Generate image is an open-source agent skill for design and media.
- [Phoenix evals](https://ai-powered.com/skills/phoenix-evals): Phoenix evals is an open-source agent skill for ai models and llm tooling.
- [Tldr prompt](https://ai-powered.com/skills/tldr-prompt): Tldr prompt is an open-source agent skill for ai models and llm tooling.
- [Arize AI provider integration](https://ai-powered.com/skills/arize-ai-provider-integration): Arize AI provider integration is an open-source agent skill for ai models and llm tooling.

---
Source: https://ai-powered.com/skills/prompt-optimize
