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.
curl -O https://raw.githubusercontent.com/dosco/aithy/main/.claude/skills/ax-agent-optimize/SKILL.mdgit clone --depth 1 https://github.com/dosco/aithyWrote 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.
[](https://agentmods.dev/skills/dosco/aithy/ax-agent-optimize)<a href="https://agentmods.dev/skills/dosco/aithy/ax-agent-optimize"><img src="https://agentmods.dev/badge/skills/dosco/aithy/ax-agent-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.
<a href="https://agentmods.dev/skills/dosco/aithy/ax-agent-optimize"><img src="https://agentmods.dev/badge/skills/dosco/aithy/ax-agent-optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00057 | $0.04156 |
| Opus 5.5 | $0.00023 | $0.01662 |
| Sonnet 5.5 | $0.00011 | $0.00831 |
| Haiku 4.5 | $0.00006 | $0.00416 |
Grade A, and why
ax-agent-optimize 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 1mo 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.
This is a copy
98% identical to ax-agent-optimize — 5 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.
How it starts
The opening of the file, as written. The whole thing — 369 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AxAgent Optimize Codegen Rules (@ax-llm/ax)
Use this skill for agent.optimize(...) workflows. Prefer short, modern, copyable patterns. Do not repeat general agent-authoring guidance unless the user needs it. For generic ax(...) or flow(...) tuning with top-level optimize(...), use the ax-gepa skill instead.
Your job is to help the model choose a good optimization setup for the user's actual goal:
- If the user wants better tool use, prefer action-aware tasks and either a deterministic metric or the built-in judge depending on how objective the scoring is.
- If the user wants better wording only, responder optimization may be enough.
- If the user wants reusable improvements, include artifact save/load.
- If the user wants cost, tool-use, or child-agent delegation behavior improved, make the eval tasks expose those tradeoffs explicitly.
Use These Defaults
- Use
agent.optimize(...)only after the agent is already configured and runnable. - Prefer the built-in judge path first for normal agent tuning. Most users should start with tasks that include
inputandcriteria, then letagent.optimize(...)use its default actor target and judge-based metric. - Keep top-level
optimize(program, train, metric, options)for non-agent generators and flows; do not rewrite normal agent task-record examples to the generic helper. - Prefer a deterministic custom
metriconly when success is easy to score from the prediction and task record. - Add
judgeAIplusjudgeOptionswhen the judge should run on a stronger or separate model than the agent runtime model. - Only reach for a plain typed
AxGenevaluator when the user needs LLM-as-judge behavior outside the built-inagent.optimize(...)flow. - Default optimize target is the actor path; do not surface
targetunless the user clearly wants responder-only tuning or explicit program IDs. - Use eval-safe tools or in-memory mocks because optimization replays tasks many times.
- Prefer precise tool return schemas such as
f.object(...)over vaguef.json(...)whenever the agent must reason about returned fields. - Prefer task wording with canonical entity names like "the Atlas project" instead of ambiguous labels like "Atlas" when ambiguity could trigger pointless clarification.
- Save artifacts with
axSerializeOptimizedProgram(result.optimizedProgram!), then restore withaxDeserializeOptimizedProgram(saved)andagent.applyOptimization(...). - For browser-safe persistence, let the caller store the serialized JSON anywhere they want such as localStorage, IndexedDB, or a backend.
- If
bootstrapis enabled, bootstrapped demos are persisted insideresult.optimizedProgram.demos; raw failed traces are not saved in v1. - Auto-promoted context fields (large undeclared inputs kept runtime-only by
autoUpgrade) appear in captured traces/demos as their truncated preview string, not the full value — same as declared truncate-stylecontextFields. This is expected; do not treat the shortened value as a bug in the saved demos. - For first examples, pass a plain task array instead of splitting into
trainandvalidationunless the user already has a holdout set. - GEPA-backed
agent.optimize(...)now optimizes generic components exposed by the selected target programs;target: 'actor'only tunes actor components,target: 'responder'only tunes responder components, andtarget: 'all'broadens the component set. result.optimizedProgram.componentMapis the canonical saved artifact for agent GEPA runs. It may include actor instructions, descriptions, tool descriptions/names, templates, or runtime primitives depending on what the selected target exposes.- When child-agent delegation matters, expose the child agents as named functions and tune against realistic call/no-call tasks.
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.
- 1mo ago Changed · +8 lines 2cee84aa66ee
- 1mo ago First seen · 361 lines · 57 tokens per session scan A 1b65e7cc0e98
ax-agent-optimize is a skill published in the GitHub repository dosco/aithy (108 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 57 tokens to every session and 4,156 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 98% identical to ax-agent-optimize, differing in 5 lines, and is treated as a copy.
Other skills, from other repositories
research-paper-writing
Pipeline for ML/AI research papers — lit review to LaTeX submission.
arxiv
Search and download arXiv papers (no API key needed).
metrillm
Find the best local LLM for your machine. Tests speed, quality and RAM fit, then tells you if a model is worth running on your hardware.
metrillm-guide
Background context about MetriLLM benchmark tool. Activates when the user asks about local LLM performance, model comparison, hardware fitness, or benchmarking. Provides guidance on using MetriLLM CLI and interpreting results.
mle-workflow
Production machine-learning engineering workflow for data contracts, reproducible training, model evaluation, deployment, monitoring, and rollback. Use when building, reviewing, or hardening ML systems beyond one-off notebooks.
llava
Vision-language chat: VQA, captioning, image dialogue.