cyrusnuevodia/gepa-research/optimize
Claude Code and agent skill by cyrusnuevodia/gepa-research
- community
Checking that the SKILL.md file is still in the repository.
Optimize the project's target file using the GEPA algorithm. Hands the seed candidate and evaluator to gepa.optimize_anything; each candidate GEPA proposes is evaluated inside an isolated git worktree with gates enforced. Runs until budget or stall is reached.
Install
npx vskill@latest install cyrusnuevodia/gepa-research/optimizeSKILL.md
Run the GEPA-backed optimization loop. The plugin calls gepa.optimize_anything under the hood; each candidate it proposes is applied in a fresh git worktree, the benchmark is run, gates are checked, and the result is backported into .gepa-research/<run>/graph.json so the dashboard continues to render the lineage DAG.
Host conventions
- Slash commands shown in user-facing copy (e.g.
/gepa-research:optimize) — translate to your host's mention syntax when speaking to the user (e.g.$gepa-research optimizeon Codex — plugin namespace then skill name, separated by a space).
Configuration
All arguments are optional. Invoked as /optimize [max-metric-calls=N] [stall=N] [reflection-lm=MODEL].
- max-metric-calls — GEPA evaluator-call budget for this run (default:
50). - stall — consecutive iterations without improvement before auto-stopping (default:
5). - reflection-lm — model string passed to
ReflectionConfig.reflection_lm(default: gepa's default, currentlyopenai/gpt-5.1). Use e.g.anthropic/claude-opus-4-7for Claude.
The legacy subagents, budget, and per-subagent knobs are no longer accepted — GEPA owns the search strategy.
Prerequisites
- Workspace must be initialized (
gepa-research statusshould succeed). - A baseline experiment must be committed (run
/discoverfirst). GEPA's
seed candidate is read from the current best committed node's target file.
- The
gepalibrary on the Python path (auto-installed as a transitive dependency when the CLI is installed from GitHub:uv tool install "git+https://github.com/CyrusNuevoDia/gepa-research#subdirectory=plugins/gepa-research"). - A reflection LM API key in the environment (OpenAI/Anthropic/etc., depending
on the reflection-lm value). Without this the first GEPA iteration will fail.
Architecture
side_info returned to gepa includes:
experiment_id— so diagnostics reference.gepa-research/<run>/experiments/<id>/stdout/stderr— trailing 4 KB of eachbenchmark_result— parsed JSON (score + per-task breakdown, when available)task_traces— contents oftask_*.jsonfrom the SDK, when instrumentedgate_failures— list of gate names that rejected the candidate
GEPA uses this side_info in its reflection prompt to propose the next candidate. For that to work well, your benchmark must write diagnostic output (stack traces, task-level failure reasons, etc.) rather than just a terminal score.
The loop
Run once per /optimize invocation:
1. Verify prerequisites
If status shows no committed node, stop and tell the user to run /discover first.
2. Resolve the reflection LM
If the user passed reflection-lm=…, use that value verbatim. Otherwise, read config.json for a reflection_lm field. If neither is set, leave it unset — GEPA will use its own default (currently openai/gpt-5.1).
Before handing off to GEPA, verify the corresponding API key is in the environment (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.). If missing, stop and tell the user which env var to export; do not try to proceed — GEPA will burn the metric budget failing to call the LM.
3. Invoke GEPA via the plugin command
The optimize entry point wraps the full call:
This resolves parent_id = best_committed_node(graph, metric) internally, builds the seed candidate from that node's target file, and calls run_gepa_optimize from gepa_research.gepa_adapter. Each candidate GEPA proposes allocates a new worktree under .gepa-research/<run>/worktrees/.
4. Stream progress
While the loop is running, the dashboard (if started) auto-refreshes as new experiment nodes appear in graph.json, and the BUDGET / STALL hero cards update from .gepa-research/<run>/progress.json. Surface the URL to the user if they don't already have it.
Do not run multiple gepa-research optimize invocations concurrently against the same workspace — they would race on graph/meta file locks and corrupt the lineage.
5. Final summary
When gepa-research optimize exits, print:
- Best score and the experiment id that produced it
- Total candidates evaluated (from GEPA's
total_metric_calls) - The winning diff:
gepa-research diff <best_exp_id> - Whether the stop was due to budget, stall, or user interrupt
Suggest follow-up actions: raise the budget, switch reflection LM, or introduce additional gates if the winning candidate regressed something the objective didn't capture.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/gepa-research/skills/optimize/SKILL.md
Popularity
- Repository stars
- 95
- Repository forks
- 6
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cyrusnuevodia/gepa-research/optimize)