gepa-optimize

gepa-optimize is a skill for Claude Code, Codex from indexedlabs/pydantic-ai-gepa. It costs 101 tokens per session (8,686 once invoked), scanned B, original, MIT.

A workflow for improving a pydantic-ai agent’s instructions, tool descriptions, output format, and inputs using the GEPA command-line tool.

In plain words
What is it for?
Use it to optimize an agent against a dataset, compare instruction variants, preserve evaluation history, and coordinate separate code candidates.
Why use it?
It uses evaluation failures and saved traces to guide prompt and interface changes, so you can improve an agent based on observed results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to optimize an agent against a dataset, compare instruction variants, preserve evaluation history, and coordinate separate code candidates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/indexedlabs/pydantic-ai-gepa/gepa_optimize
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 indexedlabs/pydantic-ai-gepa --skill gepa_optimize
Clone the repo
git clone --depth 1 https://github.com/indexedlabs/pydantic-ai-gepa

Made for: Claude Code, Codex.

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-optimize

README.md
[![agentmods](https://agentmods.dev/badge/skills/indexedlabs/pydantic-ai-gepa/gepa_optimize/github.svg)](https://agentmods.dev/skills/indexedlabs/pydantic-ai-gepa/gepa_optimize)
Your own site
<a href="https://agentmods.dev/skills/indexedlabs/pydantic-ai-gepa/gepa_optimize"><img src="https://agentmods.dev/badge/skills/indexedlabs/pydantic-ai-gepa/gepa_optimize/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-optimize

Your own site · 80×15
<a href="https://agentmods.dev/skills/indexedlabs/pydantic-ai-gepa/gepa_optimize"><img src="https://agentmods.dev/badge/skills/indexedlabs/pydantic-ai-gepa/gepa_optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,686 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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: 4 findings, 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 Tool Misuse · line 174
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high System Prompt Leakage · line 641
    Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
    Fix: Remove any instructions that reveal, print, or output system prompts or internal rules. System instructions should never be exposed to end users.
  • high System Prompt Leakage · line 642
    Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
    Fix: Remove any instructions that reveal, print, or output system prompts or internal rules. System instructions should never be exposed to end users.
  • high System Prompt Leakage · line 643
    Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
    Fix: Remove any instructions that reveal, print, or output system prompts or internal rules. System instructions should never be exposed to end users.
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.00101 $0.08686
Opus 5 $0.00051 $0.04343
Sonnet 5 $0.00020 $0.01737
Haiku 4.5 $0.00010 $0.00869

Measured 11d ago against content hash 529ab4b1418f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

gepa-optimize scanned grade B with 1 finding 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 11d ago.

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.

Asks the agent to reveal its instructionsmediumSystem prompt leakage

Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.

gepa components show instructions
src/pydantic_ai_gepa/skills/gepa_optimize/SKILL.md · 748 lines

How it starts

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

gepa-optimize

You are the reflection model. The gepa CLI is a small toolkit that handles minibatches, trace/report persistence, candidate evaluation, comparison, and history bookkeeping; you read failure reports and traces, edit component slots or source code, and continue until the run completes.

There is no propose or reflect verb on the CLI because that's the work you do — while gepa run is paused, or between manual gepa eval invocations — by editing files.

Outer Omni protocol for code candidates

gepa run --lanes is intentionally a single-parent managed run. Do not try to turn its lane count into a multi-parent Omni plan. For independently explored git/code candidates, a root orchestrator drives the separate durable outer controller and routes packets without reading reflection text:

gepa omni start --plan ./omni-plan.json
gepa omni next <omni-id> --json
# create only the workspace named in child_ready/phase2_ready, then launch your worker
gepa omni child-dispatched <omni-id> --receipt ./dispatch.json
gepa omni child-submit <omni-id> --receipt ./child-result.json
gepa omni compare-submit <omni-id> --receipt ./comparison.json
gepa omni reporting-submit <omni-id> --receipt ./report.json  # only if reporting was planned
gepa omni ack <omni-id> <event-id>

The plan uses SHA-256-pinned seed/minibatch/test artifacts, evaluator identity and digest, equal phase-one metric-call slices, an explicit repeated comparison budget, and a fresh phase-two workspace. Workspace paths may be intended paths at start; create or verify the exact isolated directory before submitting the dispatch receipt. A child_ready packet is all the worker needs: its child/engine ID, isolated workspace, immutable seed and minibatch paths/hashes, opaque SHA-pinned driver manifest, and reserved metric calls. The controller never executes the manifest; the orchestrator reads it to choose its engine adapter. Submit only immutable receipts with those same identities. The controller, not child self-reported scores, chooses a Pareto provisional winner, then accepts it only when the shared confidence-interval/practical-delta comparison clears the frozen threshold against seed/incumbent. Rejected, equivalent, or inconclusive votes retain the baseline; an optional bounded max_repetitions can collect more matched samples only for an inconclusive vote. Events redeliver unacked work after restart.

Read the full file on GitHub · 748 lines

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. 11d ago First seen · 748 lines · 101 tokens per session scan B 529ab4b1418f

Subscribe to this mod's changes

gepa-optimize is a skill published in the GitHub repository indexedlabs/pydantic-ai-gepa (35 stars, last pushed 16d ago), licensed MIT. It adds 101 tokens to every session and 8,686 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.

Related

Other skills, from other repositories

research-engineer

An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.

davila7/claude-code-templates · 43 tokens

tika-eval-compare

Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".

apache/tika · 50 tokens

neuron-evaluation-engineer

Create and run AI evaluations with datasets, assertions, and output drivers in Neuron AI. Use this skill whenever the user mentions evaluation, testing AI systems, creating evaluators, dataset-driven testing, assertion-based validation, or wants to measure AI system performance. Also trigger for tasks involving…

neuron-core/neuron-ai · 77 tokens

jetson-validate-image

Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.

NVIDIA/skills · 50 tokens

atmos-validation

Validate Atmos projects, components, arbitrary JSON Schema inputs, EditorConfig, and GitHub Actions; use affected-file selection and native CI annotations.

cloudposse/atmos · 31 tokens

skill-benchmark

Benchmark AI skill effectiveness by measuring implementation quality against legacy constraints.

HoangNguyen0403/agent-skills-standard · 16 tokens