gepa

gepa is a skill for Claude Code from skillberry-ai/cap-evolve. It costs 111 tokens per session (2,630 once invoked), scanned A, original, Apache-2.0.

An optimization method called GEPA that searches for better AI-agent instructions using feedback from evaluation runs; its paper is identified as arXiv:2507.19457.

In plain words
What is it for?
Running reflective search where proposals pass through a cheaper training check and then a validation gate, while retaining useful task-specific candidates.
Why use it?
It preserves candidates that perform well on different individual tasks instead of keeping only the one with the best average score.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Running reflective search where proposals pass through a cheaper training check and then a validation gate, while retaining useful task-specific candidates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skillberry-ai/cap-evolve/gepa
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add skillberry-ai/cap-evolve --skill gepa
Clone the repo
git clone --depth 1 https://github.com/skillberry-ai/cap-evolve

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gepa

README.md
[![agentmods](https://agentmods.dev/badge/skills/skillberry-ai/cap-evolve/gepa/github.svg)](https://agentmods.dev/skills/skillberry-ai/cap-evolve/gepa)
Your own site
<a href="https://agentmods.dev/skills/skillberry-ai/cap-evolve/gepa"><img src="https://agentmods.dev/badge/skills/skillberry-ai/cap-evolve/gepa/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gepa

Your own site · 80×15
<a href="https://agentmods.dev/skills/skillberry-ai/cap-evolve/gepa"><img src="https://agentmods.dev/badge/skills/skillberry-ai/cap-evolve/gepa.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,630 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 141
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00111 $0.02630
Opus 5.5 $0.00044 $0.01052
Sonnet 5.5 $0.00022 $0.00526
Haiku 4.5 $0.00011 $0.00263

Measured 3mo ago against content hash 962bd00bb617, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gepa scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/_bootstrap.py, scripts/abstract.py, scripts/check.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/algorithms/gepa/SKILL.md · 173 lines

How it starts

The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.

algorithms/hill-climb owns the mechanics every algorithm shares: parent → proposal → val gate → commit, specified once in algorithms/hill-climb/references/run-step.md. Read that first. This page states only what GEPA (Agrawal et al., 2025) does differently, and why those differences are the paper's actual contribution rather than decoration. A thin wrapper over cap_evolve.gepa.gepa_loop.

The two mechanisms, and why removing either turns GEPA back into hill-climb

1. The parent is sampled from per-instance winners, not from the global best. A mean is a lossy summary. A candidate that fixes one genuinely hard task while regressing three easy ones has a worse mean than the incumbent, so a best-parent rule discards it — and with it the only text in the pool that has ever solved that task. GEPA instead scores per val instance and samples frequency-weighted over candidates that (co-)win at least one, so specialists and stepping-stones stay reachable as parents while their mean is still behind. That is the quality-diversity argument (MAP-Elites): keep the set that covers the task distribution, not the single champion. Sampling is stochastic and seeded, so the exploration is reproducible.

2. A cheap train minibatch pre-gates the expensive val evaluation. Rollouts dominate cost and a full-val eval costs |val| · n_trials of them. Most proposals are bad; paying full price to find that out is what makes naive reflective search unaffordable, and GEPA's headline "~35× fewer rollouts" comes almost entirely from not paying it. So parent and child are evaluated on the same small train minibatch (2 · minibatch-size rollouts, eval-cached) and the child is dropped unless sum(child) > sum(parent). The minibatch never decides acceptance — it decides whether acceptance is worth measuring.

A side benefit of (2): reflection reads train traces, so the proposer never sees the split its gate is computed on.

Read the full file on GitHub · 173 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 173 lines · 111 tokens per session scan A 962bd00bb617

Subscribe to this mod's changes

gepa is a skill published in the GitHub repository skillberry-ai/cap-evolve (71 stars, last pushed today), licensed Apache-2.0. It adds 111 tokens to every session and 2,630 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

gepa compared with skills from other repositories

gepa next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gepaskillberry-ai/cap-evolveSkill71todayApache-2.0A111Claude Code
kermt-pretrain-scratchNVIDIA/skillsSkill4.2ktodayApache-2.0A82Claude Code, Codex
cdf-auto-labelingNVIDIA/skillsSkill4.2ktodayApache-2.0A96Claude Code, Codex
prompt-engineeringericrisco/rsc-harnessSkill6915d agoMITA83Claude Code, Codex
llm-runtimeWrongStack/WrongStackSkill446todayMITA97Claude Code, Codex
chain-of-thought-promptsa5c-ai/babysitterSkill1.9k29d agoMITA21Claude Code
few-shot-example-gena5c-ai/babysitterSkill1.9k29d agoMITA16Claude Code