aithy: Skill for Claude Code

.claude/skills/ax-gepa/SKILL.md

ax-gepa is a skill for Claude Code from dosco/aithy. It costs 71 tokens per session (2,526 once invoked), scanned A, a copy of ax-gepa, Apache-2.0.

A coding guide for using AxGEPA, a method for improving prompts and examples for AI programs with one or more goals, through the @ax-llm/ax library.

In plain words
What is it for?
Use it when writing code to tune an AI generator, workflow, or agent tree with AxGEPA or related GEPA tools.
Why use it?
It helps avoid incorrect optimizer setup and unclear choices about validation data, cost limits, and single versus multiple goals.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is dosco/aithy's own configuration. It tells Claude Code how to work on aithy itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything aithy configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/vr/src/ax/src/examples/optimize.ts.

Reuse

Borrowing it

Nothing to install: this file belongs to dosco/aithy. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dosco/aithy/main/.claude/skills/ax-gepa/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/dosco/aithy

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 ax-gepa

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/dosco/aithy/ax-gepa"><img src="https://agentmods.dev/badge/skills/dosco/aithy/ax-gepa.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,526 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.
Origin 95% copy Near-identical to another mod 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.00071 $0.02526
Opus 5 $0.00036 $0.01263
Sonnet 5 $0.00014 $0.00505
Haiku 4.5 $0.00007 $0.00253

Measured 5d ago against content hash 3918cd644aa4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

ax-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 5d 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.

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.

Origin

This is a copy

95% identical to ax-gepa — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/ax-gepa/SKILL.md · 265 lines

How it starts

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

GEPA Optimization Codegen Rules (@ax-llm/ax)

Use this skill to generate GEPA optimization code. Prefer the top-level optimize(...) helper for normal code, and use direct AxGEPA / AxBootstrapFewShot only when the user needs low-level optimizer control.

Use These Defaults

  • Use optimize(program, train, metric, { studentAI, teacherAI, ... }) for normal generator and flow tuning.
  • Prefer ai(), ax(), and flow() for new code.
  • Use a strong teacherAI and a cheaper studentAI.
  • Pass validationExamples when you have a holdout set.
  • Set maxMetricCalls to bound optimizer cost; optimize(...) defaults it to 100.
  • Use scalar metrics for one objective and object metrics for Pareto optimization.
  • Apply results with program.applyOptimization(result.optimizedProgram!).
  • For tree-wide runs, expect optimizedProgram.componentMap.
  • Persist artifacts with axSerializeOptimizedProgram(...) and restore them with axDeserializeOptimizedProgram(...) so the same flow works in browsers and Node.
  • optimize(...) runs AxBootstrapFewShot -> AxGEPA for small starter sets by default, preserving the demos in result.optimizedProgram.demos.

Critical Rules

  • optimize(...) and AxGEPA.compile() work for a single generator and for tree-aware roots such as flows or agents with registered optimizable descendants.
  • There is no separate flow-only GEPA optimizer. Use AxGEPA for flows too.
  • The metric may return either number or Record<string, number>.
  • Keep metrics deterministic and cheap by default.
  • Avoid extra LLM calls inside the metric unless the user explicitly wants judge-based evaluation.
  • If the user needs LLM-as-judge scoring for a non-agent GEPA run, prefer a plain typed AxGen evaluator instead of writing a custom judge abstraction.
  • maxMetricCalls must be large enough to cover the initial validation pass over validationExamples.
  • GEPA optimizes generic string components exposed by getOptimizableComponents(). If a tree exposes no components, optimization will fail.
  • Use held-out validation examples for selection. Do not reuse the training set as validationExamples.
  • result.optimizedProgram is the easy-to-apply best candidate. result.paretoFront is the full trade-off set for multi-objective runs.
  • Direct AxGEPA still has its own bootstrap option, but top-level optimize(...) composes the existing AxBootstrapFewShot optimizer before GEPA instead.

Read the full file on GitHub · 265 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. 5d ago Changed 3918cd644aa4
  2. 9d ago First seen · 265 lines · 71 tokens per session scan A f5a55ee703bf

Subscribe to this mod's changes

ax-gepa is a skill published in the GitHub repository dosco/aithy (107 stars, last pushed 8d ago), licensed Apache-2.0. It adds 71 tokens to every session and 2,526 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to ax-gepa, differing in 2 lines, and is treated as a copy.