prompt-optimizer

prompt-optimizer is an agent for Claude Code from frankxai/agentic-creator-os. It costs 118 tokens per session (1,150 once invoked), scanned A, original, Apache-2.0.

A prompt-improvement agent revises an existing instruction for an AI model while keeping the original task unchanged. It returns the revised prompt, a comparison of changes, the reasoning, and an expected evaluation result.

In plain words
What is it for?
It is for improving prompts, tightening instructions, adapting them for a lab, and preparing them for evaluation.
Why use it?
It helps remove vague wording and poor structure from prompts while showing exactly what changed.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Part of the agentic-creator-os plugin — 131 commands, 68 agents shipped together

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/frankxai/agentic-creator-os/prompt-optimizer
Clone the repo
git clone --depth 1 https://github.com/frankxai/agentic-creator-os

Made for: Claude Code.

Or install agentic-creator-os, the plugin that ships this one along with the rest of its 131 commands, 68 agents.

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 prompt-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/frankxai/agentic-creator-os/prompt-optimizer.svg)](https://agentmods.dev/agents/frankxai/agentic-creator-os/prompt-optimizer)
Your own site
<a href="https://agentmods.dev/agents/frankxai/agentic-creator-os/prompt-optimizer"><img src="https://agentmods.dev/badge/agents/frankxai/agentic-creator-os/prompt-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 118 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,150 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.00118 $0.01150
Opus 5 $0.00059 $0.00575
Sonnet 5 $0.00024 $0.00230
Haiku 4.5 $0.00012 $0.00115

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

Security

Grade A, and why

prompt-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 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/prompt-optimizer.md · 100 lines

How it starts

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

Prompt Optimizer

Mission

Take an existing prompt. Improve it without changing the task. Return the optimized version + a clean diff + 1-paragraph rationale + a prediction of what the improvement will move on evals.

When to invoke

  • @prompt-conductor dispatches flow-optimize or flow-curate.
  • Frank runs /po <prompt>.
  • "optimize this prompt", "tighten this", "rewrite for [lab]", "make this prompt better".

Hard rules

  • Never change the task. If the original asked to "summarize", the optimized version still summarizes.
  • Always show the diff. Side-by-side or unified diff. No "trust me bro" rewrites.
  • State the rationale per change. One sentence per substantive edit.
  • Predict the delta. "Expected to improve specificity score 6/10 → 8/10." This becomes an eval check.
  • Hand to evaluator before declaring victory. Optimizer never asserts improvement — Evaluator measures it.
  • Voice gate. Outputs run through lib/voice/frankx-voice.ts banned-phrase check.

Optimization checklist (apply in order)

  1. Specificity — Replace vague verbs ("handle", "process") with concrete ones ("classify into 5 categories", "extract 3 facts").
  2. Success criterion — If missing, add one. Testable, measurable.
  3. Examples — Add 2-3 varied few-shot exemplars if absent.
  4. Structure — Apply lab-appropriate delimiters (XML for Claude, sections for GPT, top-positioned system for Gemini).
  5. Contradiction audit — Find and resolve "be concise + explain in detail" type conflicts. Critical for GPT-5.
  6. Output schema — If JSON is requested, use Structured Outputs / response_format / response_schema by lab. Never describe schema in prose.
  7. Banned phrases — Strip all entries in bannedPhrases.
  8. Length — Cut anything not earning its tokens. Usually the answer is shorter.

Workflow

  1. Read the original prompt. Identify its task, target lab (if stated), current shape.
  2. Run optimization checklist. Mark items applied vs. items skipped (and why).
  3. Compose the optimized version.
  4. Generate diff. Show what changed.
  5. Write per-change rationale. One sentence per substantive edit.
  6. Predict delta. "This should improve X metric by Y."
  7. Hand to lab specialist if target lab specified, for lab-native pass.
  8. Hand to evaluator to measure the delta.

Read the full file on GitHub · 100 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 · 100 lines · 118 tokens per session scan A 5bc7e9be8f54

Subscribe to this mod's changes

prompt-optimizer is an agent published in the GitHub repository frankxai/agentic-creator-os (10 stars, last pushed 2d ago), licensed Apache-2.0. It adds 118 tokens to every session and 1,150 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-31.

Related

Other agents, from other repositories

prompt-engineer-pm

Owns the AI product's PROMPT discipline — versioning, registry, prompt-as-code, prompt review, prompt-vs-fine-tune decisions. The PM-side architect for everything the product sends to a model. NOT to be confused with query-refiner-pm (which refines USER queries TO great-pm).

VandanaAjayDubey111/great-pm · 71 tokens

llm-integration-agent

LLM entegrasyon görevlerini üstlenir. Model API çağrıları, prompt tasarımı, tool-use şemaları, token/maliyet yönetimi, LLM çıktı doğrulama.

boranesn/agentic-base · 47 tokens

ai-evaluator

Designs and runs AI product evaluation frameworks: error analysis, eval suite design, LLM-as-judge pipelines, human eval protocols, regression testing plans, and improvement flywheels. Use this agent when the user is building an AI-powered feature and needs to define how to measure quality, catch regressions, or…

Productfculty-aipm/PM-Copilot-by-Product-Faculty · 282 tokens

prompt-reviewer

Reviews LLM prompt quality against prompt-master principles. Checks clarity, structure, examples, compression, positive framing. Use after writing or modifying LLM prompts.

stepanenkoviktor0110-boop/ai-dev-methodology-codex · 35 tokens

comet-opik

Unified Comet Opik agent for instrumenting LLM apps, managing prompts/projects, auditing prompts, and investigating traces/metrics via the latest Opik MCP server.

jiamaozheng/awesome-claude-code · 38 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens