optimization

optimization is an agent for Claude Code from cisco-foundation-ai/fully-automated-prompt-optimization. It costs 127 tokens per session (2,979 once invoked), scanned A, original, Apache-2.0.

An agent for improving prompts and multi-step AI workflows by studying evaluation results and trying revised versions. It can work on the wording, settings, or structure of the workflow.

In plain words
What is it for?
Use it to improve prompts, investigate failed evaluations, compare prompt versions, adjust retrieval or model settings, and revise the structure of an AI workflow.
Why use it?
It helps identify why an AI workflow fails tests and guides repeated changes toward better scores. It also keeps optimization within the limits defined for the project.

Agent for Claude Code

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 agents/cisco-foundation-ai/fully-automated-prompt-optimization/optimization
Clone the repo
git clone --depth 1 https://github.com/cisco-foundation-ai/fully-automated-prompt-optimization

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 optimization

README.md
[![agentmods](https://agentmods.dev/badge/agents/cisco-foundation-ai/fully-automated-prompt-optimization/optimization.svg)](https://agentmods.dev/agents/cisco-foundation-ai/fully-automated-prompt-optimization/optimization)
Your own site
<a href="https://agentmods.dev/agents/cisco-foundation-ai/fully-automated-prompt-optimization/optimization"><img src="https://agentmods.dev/badge/agents/cisco-foundation-ai/fully-automated-prompt-optimization/optimization.svg" alt="Measured on agentmods" height="20"></a>
Per session 127 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,979 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.1 $0.00127 $0.02979
Opus 5 $0.00063 $0.01489
Sonnet 5 $0.00025 $0.00596
Haiku 4.5 $0.00013 $0.00298

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

Security

Grade A, and why

optimization 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 6d 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.

.claude/agents/optimization.md · 151 lines

How it starts

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

Optimization Agent

You optimize eval quality for a FAPO tenant across all optimization granularities: micro (prompt text), meso (strategy/parameters), and macro (chain structure). You have full autonomy over your approach — analyze results, classify failure modes, route to the right optimization level, create variants, run evals, and iterate until you hit the target.

Core Principles

  1. Scope Contract (Hard Gate) — Your very first action, before any analysis or variant creation, is to read the tenant playbook at tenants/<tenant_id>/docs/iteration-playbook.md and produce a scope contract: a list of allowed optimization levels and forbidden optimization levels. The "Chain-Level Optimization Scope" section (if present) is authoritative. Write the scope contract into your first message so it is visible and auditable. All subsequent work must satisfy this contract. If step-attribution identifies failures that are only addressable by a forbidden level, acknowledge the ceiling in your report — never propose, discuss, or reason about acting on those forbidden levels. Do not mention specific forbidden parameters or structural changes even as hypotheticals.

  2. Pre-Variant Scope Check — Before creating any variant (prompt, parameter, or structural), verify it only touches levels listed as allowed in the scope contract. If a proposed change would touch a forbidden level — even partially — discard it silently and try a different approach within allowed levels. This check is mandatory and non-negotiable; no rationale justifies bypassing it.

  3. Strategy Ladder for Plateau-Breaking — When performance plateaus within an allowed level, exhaust the following escalating strategies before declaring the level exhausted. Always branch from the current best variant (never diverge to an older or parallel variant).

    • Module isolation: change one module at a time to isolate impact
    • Technique diversity: try distinct techniques — chain-of-thought, step-by-step decomposition, output format constraints, few-shot with synthetic examples, negative examples, role framing, constraint tightening
    • Web research: search for novel prompting techniques from published guides and benchmarks
    • Ablation: remove recent additions from the best variant to test whether they actually helped
    • Require at least 3 distinct techniques tried on the best variant before declaring plateau at any level

Read the full file on GitHub · 151 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. 6d ago First seen · 151 lines · 127 tokens per session scan A de63182fa965

Subscribe to this mod's changes

optimization is an agent published in the GitHub repository cisco-foundation-ai/fully-automated-prompt-optimization (106 stars, last pushed 4d ago), licensed Apache-2.0. It adds 127 tokens to every session and 2,979 once invoked, about $0.0006 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.

Related

Other agents, from other repositories

Prompt Builder

Expert prompt engineering and validation system for creating high-quality prompts - Brought to you by microsoft/edge-ai.

github/awesome-copilot · 24 tokens

prompt-engineer

Expert in prompt engineering for Claude, GPT, Gemini, and Llama models. Specializes in chain-of-thought prompting, structured outputs, few-shot learning, system prompt architecture, and prompt optimization. Use for designing effective prompts, imp...

SteveGJones/ai-first-sdlc-practices · 52 tokens

hyv-veo-prompt-smith

The generative-prompt writer for HearYourVOICE (Phase 4). Looks at the shots still MISSING a source in the shotlist (after CC scouting) and writes copy/paste generation prompts to fill exactly those gaps — no more. Builds each prompt from the measured durations and the veo-prompt guide, applying subject-lock and…

killernay/HearYourVOICE · 124 tokens

prompting

Agent "prompting" from bestdeejay-design/awesome-ai-handbook, covering prompting for ai agents, 1. how agent prompting differs, 2. system prompt structure, role and tools.

bestdeejay-design/awesome-ai-handbook · 0 tokens

prompt-debugger

Evaluates why a prompt produced bad, unexpected, or suboptimal output and suggests targeted fixes. Use when a user says "my prompt isn't working", "this prompt gives bad results", "why is my prompt failing", "debug this prompt", "the AI keeps getting this wrong", "fix my prompt", "prompt not producing expected…

RadOrigin-LLC/RAD-Claude-Skills · 456 tokens

prompt-coach

Reviews prompts, scores prompt quality, identifies anti-patterns, and guides iterative refinement. USE FOR: prompt reviews, quality scoring, anti-pattern detection, refinement coaching, and prompt evaluation feedback. DO NOT USE FOR: production prompt deployment, model fine-tuning, or application feature coding.

ivegamsft/basecoat · 61 tokens