erstan-agent-optimizer

erstan-agent-optimizer is a skill for Claude Code, Codex from erstanai/erstan-agent-tools-beta. It costs 72 tokens per session (961 once invoked), scanned A, original, Apache-2.0.

Instructions for improving an existing Erstan Agent using its current workflow and evidence from past runs.

In plain words
What is it for?
Improving tool and Skill routing, context use, orchestration, reliability, and protection against unsafe writes.
Why use it?
They help target reliability and efficiency problems without masking defects in Skills, connectors, or the platform.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the erstan-beta plugin — 7 skills, 1 MCP server shipped together

Good fit Improving tool and Skill routing, context use, orchestration, reliability, and protection against unsafe writes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/erstanai/erstan-agent-tools-beta/erstan-agent-optimizer
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 erstanai/erstan-agent-tools-beta --skill erstan-agent-optimizer
Clone the repo
git clone --depth 1 https://github.com/erstanai/erstan-agent-tools-beta

Made for: Claude Code, Codex.

Or install erstan-beta, the plugin that ships this one along with the rest of its 7 skills, 1 MCP server.

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 erstan-agent-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/erstanai/erstan-agent-tools-beta/erstan-agent-optimizer/github.svg)](https://agentmods.dev/skills/erstanai/erstan-agent-tools-beta/erstan-agent-optimizer)
Your own site
<a href="https://agentmods.dev/skills/erstanai/erstan-agent-tools-beta/erstan-agent-optimizer"><img src="https://agentmods.dev/badge/skills/erstanai/erstan-agent-tools-beta/erstan-agent-optimizer/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 erstan-agent-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/erstanai/erstan-agent-tools-beta/erstan-agent-optimizer"><img src="https://agentmods.dev/badge/skills/erstanai/erstan-agent-tools-beta/erstan-agent-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 961 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 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.00072 $0.00961
Opus 5.5 $0.00029 $0.00384
Sonnet 5.5 $0.00014 $0.00192
Haiku 4.5 $0.00007 $0.00096

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

Security

Grade A, and why

erstan-agent-optimizer 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 2mo 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.

plugins/erstan-beta/skills/erstan-agent-optimizer/SKILL.md · 82 lines

How it starts

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

Erstan Agent optimizer

Produce the smallest evidence-backed Agent candidate that improves measured behavior without hiding Skill, connector, or platform defects inside prompt text. Optimization is proposal-only unless the user separately authorizes a saved update, live preview, or publication.

Required protocol

Read the Agent optimization protocol before proposing a candidate or changing an Agent. Before an authorized update, preview, or publication, also read the shared lifecycle and guarded preview rules.

Workflow

  1. Establish the requested stage: analysis, local candidate, saved update, live preview, or publication. Treat each later stage as separate authority.
  2. Call get_agent_builder_guide, the relevant detailed get_agent_node_catalog entries, list_agent_tools, and list_agent_skills. Retrieve the complete current Agent with get_agent and record its ID, current/published versions, opaque revision, graph, policies, bindings, and unknown fields.
  3. Correlate diagnostic evidence by Agent ID and executed version. Use get_run plus every get_run_trace page when accessible. When the user supplies an authorized local diagnostics export, inspect its manifest, traces, transcript, and artifact availability without copying sensitive payloads into the report. A different or absent version supports a drift finding, not a claim about the current graph.
  4. Retrieve every bound workspace Skill with get_agent_skill when readable. Distinguish its current draft from published and run-selected Skill versions; use immutable snapshot identity when present, not the latest package alone. Record system:<key> or inaccessible Skill packages as evidence gaps. Inspecting a Skill does not authorize changing it.
  5. Classify every finding as Agent, Skill, platform, connector/provider, or a split boundary. Change the Agent only for graph topology, node roles, instructions, policies, bindings, approval design, and orchestration it owns.
  6. Assemble a complete candidate graph and a structured baseline-to-candidate diff. Tie each changed field to direct evidence and an expected observable outcome. Preserve unrelated metadata, positions, nodes, edges, opaque fields, approval controls, stable identities, and safe retry behavior.
  7. Call validate_agent against the candidate when the connected app permits non-mutating validation. Stop at a candidate and validation report unless the user explicitly asked for a saved update.
  8. For an authorized update, re-read the Agent, reconcile version drift, and call update_agent with the revision paired with the reconciled baseline and a stable idempotency key for that exact intent. Retain returned content and its guard together. Reconcile ambiguous outcomes before any new write. Do not test the draft or publish it under the update authorization.
  9. Call test_agent only after explicit live-preview authorization. Real integrations and side effects remain possible. Use the selected draft's guards and only explicitly authorized, supported top-level Skill version selections. For writes, independently reconcile effects by stable business identity.
  10. Call publish_agent only after explicit publication approval for the exact validated revision. Report the retained published version after a re-read.

Read the full file on GitHub · 82 lines

Files

What ships with it

2 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. 2mo ago Changed · +8 lines 2598abfb10f5
  2. 3mo ago First seen · 74 lines · 72 tokens per session scan A 73b3623c620b

Subscribe to this mod's changes

erstan-agent-optimizer is a skill published in the GitHub repository erstanai/erstan-agent-tools-beta (0 stars, last pushed 5d ago), licensed Apache-2.0. It adds 72 tokens to every session and 961 once invoked, about $0.0003 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-31.

Related

erstan-agent-optimizer compared with skills from other repositories

erstan-agent-optimizer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
erstan-agent-optimizererstanai/erstan-agent-tools-betaSkill05d agoApache-2.0A72Claude Code, Codex
rowboat-spacesrowboatlabs/rowboatSkill18ktodayApache-2.0A60Claude Code, Codex
deploy-docker-composeomnigent-ai/omnigentSkill12ktodayApache-2.0A84Claude Code, Codex
create-tech-designhumanlayer/humanlayerSkill13k10d agoApache-2.0A16Claude Code, Codex
haikuagno-agi/agnoSkill43ktodayApache-2.0A0Claude Code, Codex
azure-mgmt-botservice-dotnetmicrosoft/skillsSkill3.3kyesterdayMITA78Claude Code
fastapi-router-pymicrosoft/skillsSkill3.3kyesterdayMITA46Claude Code