Skip to content
Agents tracked: 504 Releases (7d): 733 Agent status: 2 with issuesSince last limit reset: Claude 12d · Codex 10d For AI agents: Markdown Updated Nov 23, 2026

GEPA optimize_anything: auto-improve prompts and code by score

gepa-ai/gepa

Your assistant learns to run GEPA's optimize_anything for you. You give it a starting text (a prompt, a piece of code, a config) and a way to score it. An AI model then proposes better versions and keeps the best one. The skill teaches the assistant how to set the run up, how big a budget to give it and which mistakes to avoid.

Pack description by its author: “Your assistant learns to run GEPA's optimize_anything for you. You give it a starting text (a prompt, a piece of code, a config) and a way to score it. An AI model then proposes better versions and keeps the best one. The skill teaches the assistant how to set the run up, how big a budget to give it and which mistakes to avoid.”

Software engineeringKnowledge and rules for your assistantGives your assistant new abilities with scripts

GitHub

Checked against the pack's files at commit ce5b0d6, on Nov 17, 2026. Tap a verdict to see its source.How we checkedReport an error

Knowledge and rules for your assistantGives your assistant new abilities with scripts

Good for you if

  • You want a prompt, code, config or agent instructions improved automatically against a score you can measure
  • You can write a check that gives a number, or use an AI judge for quality, tone or style
  • You want to compare several optimizers on the same task with the same scoring

Probably not for you if

  • You cannot measure how good the result is: the whole method runs on a score
  • You don't want to pay for AI model calls: every run calls a model with your own key

What you'll notice

  • The assistant asks for a starting text, a scoring function and a budget before it launches anything
  • It installs the gepa Python package and needs an AI provider key (OpenAI by default)
  • It warns that the default budget of 100 scoring calls is often too small
  • Results come back as the best version found, its score, and a run folder with every step

What you need

  • Claude Code, Cursor, VS Code/Copilot, Codex, Gemini CLI
  • Mixed, MIT license
  • Two plugin commands in Claude Code, or open a clone of the repository
  • An API key or account (see below)
  • The free MIT library calls paid AI models with your own provider key; two optional modes also need the Claude Code command-line tool
Words on this page
Skill
A set of written instructions your AI assistant follows. Installing one is like giving it a playbook.
Plugin
A package your assistant installs that can bring skills, commands and hooks together.
API
A way for programs to talk to a service, usually with a key.
CLI
A program you run by typing commands in a terminal.
Repositorygepa-ai/gepa · website
GitHub stars7,530
Skills1 · 1 with scripts
CategorySoftware engineering
LicenseMIT
Last updatedNov 21, 2026 · card checked Nov 17, 2026 at commit ce5b0d6
Install countsgepa-ai/gepa on skills.sh, Vercel's skills directory, which shows installs and security audits per skill

gepa-ai/gepa popularity over time

Most starred skill packs

gepa-ai/gepa: GitHub starstotal over time 7,530
gepa-ai/gepa: new stars per weekGitHub 91

What GEPA optimize_anything does

  • Four pieces: the text to improve, a scoring function that returns a number plus written feedback, an optimizer, and a budget
  • Three modes, picked by the data you pass: one hard problem, many related problems with one shared answer, or an answer that must work on unseen cases
  • Optimizers you switch with one setting: gepa (the default, an AI reflects on feedback and rewrites), autoresearch and meta_harness (a Claude Code session does the research), and best_of_n as a simple baseline
  • Budget rule: let the optimizer try about 15 to 20 versions, so size the scoring calls to the data set, and add a stop score or a dollar cap
  • A checklist of traps: gaming a weak score, over-optimistic picks, noisy single samples, and a seed that is already perfect
  • A preflight script that checks the package, keys and command-line tools before a long run

From the pack's SKILL.md files, summarised by AgentGid.

The skill, explained

gepa-optimize-anything

Sets up and runs an automatic improve-and-score loop on any text you can measure

You give

  • A starting text (or none, with a description of the goal)
  • A scoring function: text in, a number out, plus feedback
  • Examples to train on and, optionally, held-out examples to pick the winner
  • A goal and background rules
  • A budget: number of scoring calls and/or a dollar cap, and a stop score if there is a ceiling

You get

  • The best version found and its score
  • A held-out test score for the seed and the final version, if you gave a test set
  • A run folder with every step, plus per-call JSON, a progress log and a summary
Say: “Use GEPA optimize_anything to improve my system prompt; here is my grading function and 40 examples”

See it in action

The skill defines what its answer looks like. Its own example:

The skill's own example (about 50 lines, in SKILL.md under "Minimal working example"):
a seed prompt, an evaluate(candidate, example) function that returns a score and a feedback dict,
and an optimize_anything call with dataset, valset, test_set, an objective, max_evals=300,
stop_at_score=1.0 and a Claude Sonnet reflection model. It prints the best candidate, its score
and the held-out test score.

From .claude/skills/gepa-optimize-anything/SKILL.md.

When to reach for it

You wantUse
Improve one prompt across many examples so it also works on new onesGeneralization mode: pass dataset and valset
Solve one hard problem such as one fast kernel or one layoutSingle-task mode: no dataset
To see if an optimizer beats plain samplingRun the same task with engine="best_of_n" as a baseline
To check keys and tools before a long runpython scripts/preflight.py (add --engine autoresearch for that mode)
Try it. Install the plugin and the gepa package, set your model key, then ask: "Use GEPA optimize_anything to improve this prompt; here is how to score it." The assistant should ask about mode and budget, run the preflight check, and return the best version with its score.

Skills in gepa-ai/gepa

SkillIn plain wordsChanges files?What it does (author)
gepa-optimize-anything Sets up and runs an automatic improve-and-score loop on any text you can measureYes Automatically improve any text artifact that can be scored — prompts, programs/code, configs, specs, regex/SQL/schemas, agent scaffolds, or encoded search solutions — with optimize_anything, an LLM-driven optimization API: a search backend repeatedly proposes better versions from execution… has scripts
npx skills add gepa-ai/gepa --skill gepa-optimize-anything

The author's descriptions come from each skill's SKILL.md; the plain-words column is AgentGid's.

Good to know before you install

  • It needs an AI provider key. The default proposer model is OpenAI's, so set that key or pass another model id.
  • Runs cost money in model calls. The skill tells the assistant to set a dollar cap, a stop score and a timeout.
  • The autoresearch and meta_harness modes start Claude Code sessions as separate processes; they are sandboxed by default, and turning the sandbox off gives the agent full access to your machine.
  • The default budget is often too small: the run can stop after one proposal and still report a best candidate.
  • If your starting text already passes every example, the default optimizer returns it unchanged.

Before you start

Works in

  • Claude Code: plugin
  • Cursor, VS Code/Copilot, Codex, Gemini CLI: skills folder (.claude/skills/ in a clone)

You will need

  • Python with the gepa package: The skill drives gepa.optimize_anything
  • An AI provider API key: The proposer model is called on every round
  • Claude Code CLI, jq: Only for the autoresearch and meta_harness modes
  • bubblewrap (Linux): The default sandbox for the agentic modes

Steps only you can do

  1. Get an API key from your model provider (OpenAI by default, or Anthropic or AWS Bedrock) and set it as an environment variable (Your model provider's account settings)
    Then: The assistant runs preflight.py and launches the optimization
  2. For autoresearch or meta_harness, install the Claude Code CLI and run claude once to sign in (.claude/skills/gepa-optimize-anything/SKILL.md (Install section))
    Then: The agentic optimizers can start their Claude sessions

Mistakes to avoid

  • Keep the default max_evals of 100 with a large valset
    Size max_evals to about 15 to 20 times the selection set, and check how many proposals actually ran
    Otherwise the run stops after one proposal and still reports a best candidate
  • Score only whether the output is "correct"
    Gate the score on the real goal and return rich feedback, not just a number
    Every optimizer games a weak proxy
  • Switch engine= and keep the old engine_config block
    Swap the engine_config block together with the engine
    Unknown keys raise TypeError at construction
  • Train only on examples the seed already gets right
    Include real failures in the dataset
    The gepa backend then rejects every proposal and returns the seed unchanged
  • Turn on evaluation caching and rely on max_evals alone
    Also set stop_at_score or max_token_cost
    With caching, max_evals counts only cache misses

Which one to pick

If you needPick
You need score-driven optimization of any text through a Python API, with several optimizers behind one callThis pack
You want Claude Code itself to iterate toward a goal in your repo without writing a Python evaluatoruditgoenka/autoresearch
You want a tool that finds what to measure in your codebase and runs the loop on its ownevo-hq/evo
You want to evolve your own skill files with an evaluate, improve, test, keep-or-roll-back loopalchaincyf/darwin-skill

Works well with

  • gepa: The Python package the skill drives
  • litellm: Proposer models are given as LiteLLM ids
  • dspy: The plugin manifest lists dspy among its keywords
  • wandb: The gepa backend can log runs to Weights & Biases

May I use it like this?

UseAnswerCondition
In a commercial app YesMIT: keep the copyright and permission notice
Passing the files on YesMIT: keep the notice in copies
Work for clients YesMIT

What leaves your machine

  • Your candidate texts, the feedback from your scoring function and the task description → The AI provider of the proposer model (OpenAI by default), Every proposal round of a run. Opt out: Pass a self-hosted model function instead of a provider model id
  • Run metrics → Weights & Biases or MLflow, Only when tracking is turned on. Opt out: Leave tracking off

Install GEPA optimize_anything

Official commands from the repository

/plugin marketplace add gepa-ai/gepa
/plugin install gepa-optimize-anything@gepa

Send as two separate prompts. Then the gepa Python package is needed: pip install "gepa[full]".

Or with the open-source skills CLI: npx skills add gepa-ai/gepa. Skills are instructions your agent follows: read them before installing.

What it installs and runs on your machine

Read in the code at commit ce5b0d6, Nov 17, 2026

WhenWhat happens
InstallA skill file, four reference files and one Python script. No hooks.
Before a run (preflight.py)Checks that gepa imports, that a provider key is set in the environment, and that claude, jq and bwrap are on the PATH when needed. Reads environment variables only, writes nothing. With --test-lm it makes one short call to the AI model.
Every optimization runThe gepa library calls the AI provider you chose for every proposed version; your scoring function runs on your machine and may call models too.
Every optimization runWrites per-call JSON, progress_log.jsonl and summary.json to output_dir (default outputs/optimize_anything/...) and an optimizer workspace to run_dir.
autoresearch or meta_harness modeStarts Claude Code (claude --print) as a separate process that posts candidates to a scoring server; sandboxed by default.
Optional trackingLogs runs to Weights & Biases or MLflow when you turn it on.

The author's numbers, as reported

AgentGid did not run these tests

  • Coding agent resolve rate on Jinja rose from 55% to 82% with auto-learned skills. Source
  • 100–500 evaluations vs. 5,000–25,000+ for GRPO (35x faster than RL). Source

Settings

  • OPENAI_API_KEY: Key for the default proposer model
  • ANTHROPIC_API_KEY: Key when you pass an anthropic/ model id
  • GEPA_REFLECTION_LM: Model id preflight.py checks instead of the default
  • max_evals: Cap on scoring calls (default 100)
  • max_token_cost: USD cap on the optimizer's own model spend
  • sandbox: True by default: jails the Claude Code subprocess in agentic modes

Quick answers

Is it free?
The library and skill are MIT-licensed. Runs call AI models with your own key, which costs money.
Which AI model does it use?
By default openai/gpt-5.1 proposes new versions; you can pass another model id, such as a Claude model, or your own model function.
What can it improve?
Any text you can score: prompts, code, configs, regex or SQL, agent instructions.
Does my scoring function crashing stop the run?
Yes, by default. Catch errors yourself and return a low score, or turn the setting off.
How long does a run last?
Until the scoring-call budget (default 100), the dollar cap or the stop score is reached; the skill also suggests a wall-clock timeout.

Checked by AgentGid on Nov 17, 2026 against commit ce5b0d6 of the pack's own files. agent.md for AI agents · Report a mistake

More software engineering skill packs

All software engineering skills

# Install
1
mattpocock/skills CheckedRuns scripts

Gets a set of working habits for building software. It interviews you about a plan before it builds, turns the talk into a spec and small tickets, builds them test-first and reviews the result.

330K +32.5K 39
2
obra/superpowers CheckedRuns scripts

Follows one fixed way of working. Before it builds anything, it asks what you really want and writes a short design for you to approve. Then it writes a step-by-step plan, builds it with tests first, has the work checked and asks how you want to finish.

324K +18.8K 15
3

Gets four rules: think before coding, keep it simple, change only what you asked for, and set a clear goal it can check. It asks before guessing and writes less extra code. The rules come from the README's reading of a public post by Andrej Karpathy; the files do not say he made or reviewed them.

235K +14K 1
4

Stops overbuilding. It does what you asked in the simplest way that works, reuses what your project already has, and ends every answer by telling you what it left out.

197K +27.3K 6
5
Shubhamsaboo/awesome-llm-apps CheckedRuns scripts

This repo is mostly a big collection of AI apps and tutorials. Its agent_skills folder holds seven separate skills you install one at a time. They help your assistant explain why old code exists, check a change or a package list, or find your abandoned side projects. Others test a draft on simulated readers, untangle a voice ramble, or split a big job across several AI models.

145K +3,089 10
6
addyosmani/agent-skills CheckedRuns scripts

Works like a careful senior engineer. It writes down what to build before coding, splits the work into small steps, proves each step with a test and reviews the result before launch. Nine slash commands cover the stages, and 25 skills switch on when a task matches.

120K +11K 26