prompt-optimizer

prompt-optimizer is a skill for Claude Code from Aznatkoiny/zAI-Skills. It costs 205 tokens per session (2,005 once invoked), scanned A, original, MIT.

A prompt-editing guide for improving instructions given to Anthropic’s Claude language models.

In plain words
What is it for?
It helps create, refine, and debug prompts or system prompts for Claude, including prompts for coding and tasks performed by an AI agent.
Why use it?
It helps identify whether a problem comes from the prompt wording or from settings such as reasoning effort and token limits. It uses Anthropic’s published prompt-engineering guidance to choose adjustments.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the ai-toolkit plugin — 6 skills, 4 commands, 2 agents shipped together

Good fit It helps create, refine, and debug prompts or system prompts for Claude, including prompts for coding and tasks performed by an AI agent.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aznatkoiny/zai-skills/prompt-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 Aznatkoiny/zAI-Skills --skill prompt-optimizer
Clone the repo
git clone --depth 1 https://github.com/Aznatkoiny/zAI-Skills

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 6 skills, 4 commands, 2 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/skills/aznatkoiny/zai-skills/prompt-optimizer/github.svg)](https://agentmods.dev/skills/aznatkoiny/zai-skills/prompt-optimizer)
Your own site
<a href="https://agentmods.dev/skills/aznatkoiny/zai-skills/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/aznatkoiny/zai-skills/prompt-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 prompt-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/aznatkoiny/zai-skills/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/aznatkoiny/zai-skills/prompt-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 205 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,005 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.00205 $0.02005
Opus 5 $0.00102 $0.01002
Sonnet 5 $0.00041 $0.00401
Haiku 4.5 $0.00020 $0.00200

Measured 9d ago against content hash aa1743e22f51, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/ab_eval.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

AI-Toolkit/skills/prompt-optimizer/SKILL.md · 90 lines

How it starts

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

Prompt Optimizer

Optimize prompts for Claude's latest models — the Claude 5 family (Opus 5, Sonnet 5, Fable 5) plus the still-active Opus 4.8, Sonnet 4.6, and Haiku 4.5 — using Anthropic's official guidance. Diagnose what is wrong, pick the right lever, apply a proven fix, then measure.

Two levers, not one

Many problems people try to fix by editing prompt wording are better fixed with an API parameter. Always weigh both:

  1. Prompt — wording, structure, examples, role, explicit scope.
  2. Parameterseffort (intelligence vs. speed/cost), thinking (adaptive on/off), max_tokens (room to think and act).

On the latest models, effort is frequently the highest-leverage change. If reasoning is shallow on a hard task, raise effort to high/xhigh instead of prompting around it. If the model overthinks or over-explores, lower it. Detail in references/model-tuning.md.

What changed for the latest models

These shifts change how to optimize. Do not carry over old habits blindly:

  • Effort governs depth, tool use, and thoroughness. Start xhigh for coding/agentic work, minimum high for intelligence-sensitive work. Lower effort means more literal, more scoped, less tool use.
  • Thinking defaults changed with Claude 5. On the Claude 5 family thinking is on by default (Fable 5 rejects an explicit disabled); on Opus 4.8 it stays off unless you set thinking: {type: "adaptive"}. Opus 4.6 and Sonnet 4.6 use adaptive thinking. budget_tokens is removed on Claude 5 / Opus 4.8 — control depth through effort.
  • Literal instruction following. The model does what you said, not what you implied. State scope explicitly ("apply to every section, not just the first one").
  • Dial back anti-laziness prompting. Aggressive "CRITICAL / You MUST" language needed for older models now causes overtriggering. Use normal phrasing ("Use this tool when...").
  • Prefilled assistant responses are no longer supported on 4.6+ models (the request returns a 400). Migrations in references/formatting.md.
  • Verbosity is calibrated to task complexity and prose is more direct. Tune with positive examples of the concision you want, not "don't" rules.
  • Subagent appetite differs by model. Opus 4.8 under-delegates; Claude Opus 5 delegates readily. Steer explicitly — and cap fan-out on Opus 5.

Read the full file on GitHub · 90 lines

Files

What ships with it

7 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. 9d ago First seen · 90 lines · 205 tokens per session scan A aa1743e22f51

Subscribe to this mod's changes

prompt-optimizer is a skill published in the GitHub repository Aznatkoiny/zAI-Skills (9 stars, last pushed 1mo ago), licensed MIT. It adds 205 tokens to every session and 2,005 once invoked, about $0.0010 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 skills, from other repositories

text-optimizer

Optimizes text, prompts, and documentation for LLM token efficiency. Applies 52 research-backed rules across 8 categories: Claude behavior, token efficiency, structure, deduplication, reference integrity, perception, LLM comprehension, and aggressive lossy (deep only). Use when optimizing prompts, reducing tokens…

kochetkov-ma/claude-brewcode · 78 tokens

meta-prompting

Enhanced reasoning patterns via slash commands (/think, /verify, /adversarial, /edge, /compare, /confidence, /budget, /constrain, /json, /flip, /assumptions, /tensions, /analyze, /trade) or natural language ("argue against", "what could break", "show reasoning", "deep review", "meta-prompts", "thinking modes"…

iliaal/whetstone · 104 tokens

refine-prompt

Transforms vague or rough prompts into precise, structured AI instructions. Use when asked to "refine prompt", "improve prompt", "make this prompt better", "promptify", "optimize prompt", "rewrite prompt", "enhance prompt", or "sharpen instructions".

iliaal/whetstone · 62 tokens

ccc-prompt-fix

Fix and sharpen a prompt. Diagnoses it against the 6 prompt-quality patterns, returns a tightened rewrite with the reasoning, and suggests the right library prompt for your task.

KevinZai/commander · 41 tokens

gws-modelarmor-create-template

Google Model Armor: Create a new Model Armor template.

fakoli/fakoli-plugins · 18 tokens

gws-modelarmor-sanitize-prompt

Google Model Armor: Sanitize a user prompt through a Model Armor template.

fakoli/fakoli-plugins · 24 tokens