Source profileQuality 84/100Review permissions

skillberry-ai/cap-evolve/skills/algorithms/gepa/SKILL.md

gepa

Runs the real GEPA optimization loop (arXiv:2507.19457) — sample-efficient reflective Pareto search. Use when rollouts are expensive and the scorer gives informative per-task feedback, and you want the most quality per evaluation. Each iteration samples a parent from a per-instance Pareto frontier, evaluates it on a cheap minibatch of train tasks with full traces, builds a reflective dataset over the failures, asks the optimizer for one targeted component edit, re-checks the child on the same mi

Source repository stars
36
Declared platforms
0
Static risk flags
1
Last source update
2026-08-04
Source checked
2026-08-04

Decision brief

What it does—and where it fits

GEPA (Agrawal et al., 2025, arXiv:2507.19457) is the highest-ceiling member of the family. Its power comes from a two-stage economy that spends cheap rollouts to decide whether a candidate is worth an expensive honest evaluation, plus reflection on traces (not scalars) and a per…

Best for

  • GEPA's economy (minibatch gate + frontier) pays off precisely when evaluations are costly and feedback is informative; otherwise the bookkeeping doesn't earn its keep.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/skillberry-ai/cap-evolve --skill "skills/algorithms/gepa"
Safe inspection promptEditorial

Inspect the Agent Skill "gepa" from https://github.com/skillberry-ai/cap-evolve/blob/4bb97c4e190c4795326d1834b3a5cea3cd3d499a/skills/algorithms/gepa/SKILL.md at commit 4bb97c4e190c4795326d1834b3a5cea3cd3d499a. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    How to run

    Requires baseline first (reads the seed's full-val result from baseline.json). Reports the frontier/pool, best candidate, accepts, merges, and metric-calls spent; test stays sealed for finalize.

    Requires baseline first (reads the seed's full-val result from baseline.json). Reports the frontier/pool, best candidate, accepts, merges, and metric-calls spent; test stays sealed for finalize.
  2. 02

    The loop

    1. Select a parent by sampling the per-instance Pareto frontier frequency- weighted — each non-dominated candidate's weight is how many val instances it is best at, so a specialist that uniquely tops one task is kept (seeded RNG, logged). 2. Sample a minibatch of --minibatch-siz…

    Select a parent by sampling the per-instance Pareto frontier frequency-Sample a minibatch of --minibatch-size (default 4) train ids.Eval the parent on the minibatch with traces (cheap; eval-cached).
  3. 03

    When to use vs. hill-climb / skillopt

    GEPA's economy (minibatch gate + frontier) pays off precisely when evaluations are costly and feedback is informative; otherwise the bookkeeping doesn't earn its keep.

    GEPA's economy (minibatch gate + frontier) pays off precisely when evaluations are costly and feedback is informative; otherwise the bookkeeping doesn't earn its keep.
  4. 04

    Focus modes

    For a single-file / monolithic capability there is only one component; round-robin and all coincide, and the system-aware merge skips gracefully (nothing independent to recombine) rather than producing a degenerate child.

    --component-selector roundrobin (default): each iteration focuses ONE--component-selector all: list every component in FOCUS.md; the optimizer- --component-selector roundrobin (default): each iteration focuses ONE component (cycled across the parent's editable files), so every proposal is a small, attributable change — the unit the merge later recombines. - -…
  5. 05

    Key hyperparameters

    --max-metric-calls (default 0 = unlimited): PRIMARY budget — total rollouts.

    --max-metric-calls (default 0 = unlimited): PRIMARY budget — total rollouts.--max-iterations (default 50): secondary cap on propose→gate iterations.--minibatch-size (default 4): train ids per cheap local gate.

Permission review

Static risk signals and limitations

Runs scripts

medium · line 85

The documentation asks the agent to run terminal commands or scripts.

python scripts/check.py # behavioral, offline (mock optimizer + synthetic adapter)

Runs scripts

medium · line 86

The documentation asks the agent to run terminal commands or scripts.

python scripts/run.py --run-dir .capevolve/run_X --project .capevolve/project \

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score84/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars36SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
skillberry-ai/cap-evolve
Skill path
skills/algorithms/gepa/SKILL.md
Commit
4bb97c4e190c4795326d1834b3a5cea3cd3d499a
License
Apache-2.0
Collected
2026-08-04
Default branch
main
View the original SKILL.md

gepa — the real sample-efficient reflective Pareto loop

GEPA (Agrawal et al., 2025, arXiv:2507.19457) is the highest-ceiling member of the family. Its power comes from a two-stage economy that spends cheap rollouts to decide whether a candidate is worth an expensive honest evaluation, plus reflection on traces (not scalars) and a per-instance Pareto frontier that keeps specialists alive. This skill is a thin wrapper over cap_evolve.gepa.gepa_loop; all honesty-critical machinery (splits, gate, seal, stats, cache) is the engine's.

The loop

  1. Select a parent by sampling the per-instance Pareto frontier frequency- weighted — each non-dominated candidate's weight is how many val instances it is best at, so a specialist that uniquely tops one task is kept (seeded RNG, logged).
  2. Sample a minibatch of --minibatch-size (default 4) train ids.
  3. Eval the parent on the minibatch with traces (cheap; eval-cached).
  4. Build a reflective dataset over the parent's FAILING minibatch tasks — input
    • the agent's output/trajectory + feedback — written as REFLECTION.md in the optimizer workdir, plus a round-robin component focus as FOCUS.md. Invoke the optimizer.
  5. Eval the child on the SAME minibatch; local gate sum(child) > sum(parent). This is the economy: a proposal that doesn't even help the minibatch is rejected here, before any full-val cost.
  6. On local-gate pass only, pay for a full-val eval and apply the honest significance gate (paired, val-only — the same gate hill-climb uses). On accept, the child joins the pool and the per-instance frontier.
  7. System-aware merge (every --merge-cadence accepts, up to --max-merges): find two frontier dominators sharing a common ancestor both beat, recombine component-by-component (each component from whichever descendant changed it), minibatch-gate, then full-val + standard gate.

Budget is in rollouts/metric-calls (--max-metric-calls, primary) — both minibatch and full-val evals count — with --max-iterations as a secondary cap. The test split is never touched; minibatch/merge evals draw from train/val only.

When to use vs. hill-climb / skillopt

SituationUse
Rich per-task feedback + expensive rollouts; want max quality/evalgepa
First run / need a yardstick baselinehill-climb (--focus all)
Binary pass/fail, no diagnosis in feedbackhill-climb (reflection has little to chew on)
Tiny task set (frontier collapses to 1–2 points)hill-climb
Want a fixed edit-budget schedule + epoch slow-updateskillopt
Single global-best lineage is fine and merges add no valuehill-climb / skillopt

GEPA's economy (minibatch gate + frontier) pays off precisely when evaluations are costly and feedback is informative; otherwise the bookkeeping doesn't earn its keep.

Focus modes

  • --component-selector round_robin (default): each iteration focuses ONE component (cycled across the parent's editable files), so every proposal is a small, attributable change — the unit the merge later recombines.
  • --component-selector all: list every component in FOCUS.md; the optimizer may edit anywhere. Use for monolithic capabilities or when changes must span files.

For a single-file / monolithic capability there is only one component; round-robin and all coincide, and the system-aware merge skips gracefully (nothing independent to recombine) rather than producing a degenerate child.

Key hyperparameters

  • --max-metric-calls (default 0 = unlimited): PRIMARY budget — total rollouts.
  • --max-iterations (default 50): secondary cap on propose→gate iterations.
  • --minibatch-size (default 4): train ids per cheap local gate.
  • --n-trials (default 1): rollouts/task on the full-val eval (raise under noise so the significance gate is trustworthy).
  • --component-selector (round_robin | all), --selection-strategy (default pareto_per_instance), --max-merges (default 2), --merge-cadence (default 3).
  • --gate-mode / --k-se: the val acceptance bar (paired significance by default).
  • --no-regression: reject a child that breaks any previously-passing val task.
  • --seed: seeds the parent-sampling + minibatch RNG (logged for reproducibility).
  • --resume: reconstruct the pool/lineage/frontier from the run dir (a gepa_state.json checkpoint + each accepted candidate's rollouts) and continue the Pareto search where it stopped, instead of restarting from the seed. Preserved spend keeps the budget honest; the parent-sampling RNG stream restarts (selection is stochastic by design, so the resumed run is not byte-identical).

How to run

python scripts/check.py    # behavioral, offline (mock optimizer + synthetic adapter)
python scripts/run.py --run-dir .capevolve/run_X --project .capevolve/project \
  --optimizer 'python .../run-optimizer/scripts/run.py --name mock --workdir {workdir} --prompt {prompt}' \
  --max-metric-calls 400 --minibatch-size 4 --component-selector round_robin

Requires baseline first (reads the seed's full-val result from baseline.json). Reports the frontier/pool, best candidate, accepts, merges, and metric-calls spent; test stays sealed for finalize.

Agent-mode loop

When orchestration_mode: agent, drive gepa yourself: maintain the candidate pool/Pareto frontier; each round pick a parent (per gepa's selection), reflect on its val feedback to propose an edit, evaluate on val via cap-evolve, gate Δ>k·SE, accept→snapshot & add to the frontier / reject→drop. Metric-calls is the primary budget. Log rounds to the run dir; between rounds verify rollouts+results landed so the dashboard reflects the frontier. Re-read stop_condition; stop on it/budget. Seal once with cap-evolve finalize, then report.

References

  • references/concepts.md — the GEPA economy, reflective dataset / actionable side information, per-instance frequency-weighted frontier, system-aware merge, the metric-call budget, and the relation to the hill-climb / skillopt siblings. Cites arXiv:2507.19457.