prompt-optimizer

prompt-optimizer is a skill for Claude Code, Codex from wasintoh/toh-framework. It costs 101 tokens per session (1,782 once invoked), scanned A, original, MIT.

A skill for improving prompts—the instructions given to an AI system—across technical, creative, task-specific, and agent workflows.

In plain words
What is it for?
Use it to refine system prompts, coding requests, creative briefs, technical instructions, and prompts for AI agents.
Why use it?
It helps turn vague or overly complicated instructions into clearer prompts with a better-defined purpose and output.

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/wasintoh/toh-framework/prompt-optimizer
Any agent
npx skills add wasintoh/toh-framework --skill prompt-optimizer
Clone the repo
git clone --depth 1 https://github.com/wasintoh/toh-framework

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/wasintoh/toh-framework/prompt-optimizer.svg)](https://agentmods.dev/skills/wasintoh/toh-framework/prompt-optimizer)
Your own site
<a href="https://agentmods.dev/skills/wasintoh/toh-framework/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/wasintoh/toh-framework/prompt-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,782 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.00101 $0.01782
Opus 5 $0.00051 $0.00891
Sonnet 5 $0.00020 $0.00356
Haiku 4.5 $0.00010 $0.00178

Measured 5d ago against content hash 73685e19af25, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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.

src/skills/prompt-optimizer/SKILL.md · 272 lines

How it starts

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

AI Best Prompt Optimizer and Composer

Transform prompts from functional to exceptional through deep analysis, strategic optimization, and iterative refinement. This skill applies "ultrathink" principles to prompt engineering—questioning assumptions, obsessing over details, and iterating relentlessly to create prompts that don't just work, but excel.

Philosophy: Think Different About Prompts

Most prompts merely work. Great prompts are inevitable—they feel like the only right way to ask. Achieve this by:

  • Question every assumption: Why this structure? What if we started from zero?
  • Obsess over details: Every word choice matters. Every instruction must be precise yet clear.
  • Plan before writing: Understand the goal deeply before crafting a single sentence.
  • Iterate relentlessly: The first version is never the final version.
  • Simplify ruthlessly: Remove complexity without losing power.

Core Optimization Framework

1. Deep Understanding Phase

Before optimization, understand the prompt's true purpose:

Questions to explore:

  • What is the desired output format and quality?
  • Who is the audience? What's their expertise level?
  • What context is essential vs. nice-to-have?
  • What are the failure modes to prevent?
  • Are there implicit assumptions that should be explicit?

Analyze current prompt for:

  • Clarity of instructions
  • Completeness of context
  • Ambiguity or vagueness
  • Missing constraints or guidelines
  • Structural organization
  • Token efficiency

2. Strategic Optimization by Prompt Type

For System Prompts (AI Agents/Chatbots)
  • Define clear role and persona
  • Establish behavioral boundaries and guardrails
  • Specify output format and tone
  • Include response patterns and examples
  • Add error handling and edge cases
  • Balance flexibility with consistency
For Task-Specific Prompts
  • Break down complex tasks into clear steps
  • Provide concrete examples (input/output pairs)
  • Specify success criteria explicitly
  • Include context about what NOT to do
  • Add verification checkpoints
  • Use structured formatting for clarity

Read the full file on GitHub · 272 lines

Files

What ships with it

1 file 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. 5d ago First seen · 272 lines · 101 tokens per session scan A 73685e19af25

Subscribe to this mod's changes

prompt-optimizer is a skill published in the GitHub repository wasintoh/toh-framework (95 stars, last pushed 2d ago), licensed MIT. It adds 101 tokens to every session and 1,782 once invoked, about $0.0005 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 skills, from other repositories

gpt-image-2-style-library

Choose GPT-Image2 / gpt-image-2 visual styles and industrial prompt templates from the awesome-gpt-image-2 style library. Use when an agent needs to create, rewrite, classify, or improve image-generation prompts with repository-backed templates, categories, style tags, scene tags, pitfalls, and example cases.

OWWZO/ai-agent · 72 tokens

prompt-linter

Checks new prompt versions for unsafe patterns, format drift, registry consistency.

suhaas/earnings-edge · 17 tokens

smoke-test

End-to-end smoke test skill for DeerFlow. Guides through: 1) Pulling latest code, 2) Docker OR Local installation and deployment (user preference, default to Local if Docker network issues), 3) Service availability verification, 4) Health check, 5) Final test report. Use when the user says "run smoke test", "smoke…

bytedance/deer-flow · 0 tokens

image-generation

Use this skill when the user requests to generate, create, imagine, or visualize images including characters, scenes, products, or any visual content. Supports structured prompts and reference images for guided generation.

bytedance/deer-flow · 42 tokens

podcast-generation

Use this skill when the user requests to generate, create, or produce podcasts from text content. Converts written content into a two-host conversational podcast audio format with natural dialogue.

bytedance/deer-flow · 38 tokens

vercel-deploy

Deploy applications and websites to Vercel. Use this skill when the user requests deployment actions such as "Deploy my app", "Deploy this to production", "Create a preview deployment", "Deploy and give me the link", or "Push this live". No authentication required - returns preview URL and claimable deployment link.

bytedance/deer-flow · 69 tokens