optimizer

optimizer is a skill for Claude Code, Codex from inclusionAI/AWorld. It costs 18 tokens per session (5,965 once invoked), scanned A, original, MIT.

A tool for reviewing existing coding agents and improving their instructions and tool settings. It also creates a backup before applying code changes.

In plain words
What is it for?
Use it to analyze an agent, suggest or apply prompt and tool-configuration improvements, and safely patch related code.
Why use it?
It helps find ways an agent can work better without manually inspecting every instruction and setting. The backup provides a restore point before changes are made.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/inclusionai/aworld/optimizer
Any agent
npx skills add inclusionAI/AWorld --skill optimizer
Clone the repo
git clone --depth 1 https://github.com/inclusionAI/AWorld

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 optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/inclusionai/aworld/optimizer.svg)](https://agentmods.dev/skills/inclusionai/aworld/optimizer)
Your own site
<a href="https://agentmods.dev/skills/inclusionai/aworld/optimizer"><img src="https://agentmods.dev/badge/skills/inclusionai/aworld/optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,965 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00018 $0.05965
Opus 5 $0.00009 $0.02982
Sonnet 5 $0.00004 $0.01193
Haiku 4.5 $0.00002 $0.00596

Measured 4d ago against content hash aae44a545c55, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 4d 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.

aworld-skills/optimizer/SKILL.md · 487 lines

How it starts

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

Agent Optimization Skill (Optimizer)

📌 Mandatory Usage Guidelines

CRITICAL: READ BEFORE USE. Adherence to these rules is essential for the skill to function correctly.

  1. Tool Calls are Direct:

    • DO call tool functions like CAST_ANALYSIS(...) and CAST_CODER(...) directly.
    • DO NOT write or show Python code examples that import or manually implement tool logic (e.g., from aworld.experimental.ast import ACast). The tools are pre-loaded and ready for direct invocation.
  2. CAST_ANALYSIS Query Format:

    • DO use regular expression (regex) patterns for all search_ast queries.
      • Example: .*MyClassName.*|.*my_function_name.*
    • DO NOT use natural language for search_ast queries.
      • Incorrect: "Show me the implementation of the MyClassName class"
  3. CAST_CODER Workflow:

    • DO use CAST_CODER.generate_snapshot to create a backup before any modifications.
    • DO generate patch content (either structured JSON for search_replace or diff format text) based on your analysis. The LLM's role is to create the patch content.
    • DO use CAST_CODER actions (like search_replace) to apply the generated patch content to the source code.
    • DO NOT show Python lists of patches to the user (e.g., patches = [...]).
  4. Patch Content Rules:

    • DO ensure each patch operation targets only one file.
    • DO create focused patches that modify one logical block of code at a time for clarity and safety.
    • DO verify code with CAST_ANALYSIS.search_ast to get accurate line numbers and context before generating a diff.

📜 Skill Overview

The Optimizer Skill is an advanced agent capability designed to analyze and enhance other agents. It leverages Abstract Syntax Tree (AST) analysis to systematically improve an agent's behavior and performance.

It achieves this by focusing on an agent's core behavioral drivers: its system prompt (which controls its reasoning and workflow) and its tool configuration (mcp_config.py) (which defines its capabilities). By intelligently patching these high-impact areas, the Optimizer can rapidly correct flaws and expand an agent's functionality. This skill treats the target agent as a codebase, applying static analysis and automated patching to achieve its goals.

Read the full file on GitHub · 487 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. 4d ago First seen · 487 lines · 18 tokens per session scan A aae44a545c55

Subscribe to this mod's changes

optimizer is a skill published in the GitHub repository inclusionAI/AWorld (1,227 stars, last pushed 7d ago), licensed MIT. It adds 18 tokens to every session and 5,965 once invoked, about $0.0001 per session on Opus 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-30.