prompt-optimizer

prompt-optimizer is a skill for Codex from WiseWong6/wise-skills. It costs 90 tokens per session (1,634 once invoked), scanned A, original, MIT.

A tool for making controlled, versioned changes to existing prompts. It first identifies the authoritative version and allowed edit area, then diagnoses problems and applies the smallest relevant revision.

In plain words
What is it for?
Use it to diagnose and revise prompts, check for overlap, contradictions, repetition, ambiguity, unsafe instructions, and weak examples, then save an updated version after confirmation.
Why use it?
It reduces accidental rewrites, conflicting instructions, unnecessary additions, and unclear prompt behavior. Older versions remain available instead of being overwritten.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to diagnose and revise prompts, check for overlap, contradictions, repetition, ambiguity, unsafe instructions, and weak examples, then save an updated version after confirmation.

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

Made for: 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/wisewong6/wise-skills/prompt-optimizer/github.svg)](https://agentmods.dev/skills/wisewong6/wise-skills/prompt-optimizer)
Your own site
<a href="https://agentmods.dev/skills/wisewong6/wise-skills/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/wisewong6/wise-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/wisewong6/wise-skills/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/wisewong6/wise-skills/prompt-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,634 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.00090 $0.01634
Opus 5 $0.00045 $0.00817
Sonnet 5 $0.00018 $0.00327
Haiku 4.5 $0.00009 $0.00163

Measured today against content hash 99a1a88bd224, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 today.

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.

prompt-optimizer/SKILL.md · 101 lines

How it starts

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

Prompt Optimizer

可配置项

作者、模型、更新说明和版本号都是可选顶部信息。用户未提供、当前提示词也没有时,省略对应字段,不写空值、占位符或猜测值;全部缺省时,整个头部省略。

先给可直接使用的完整提示词,再在代码块外简短询问是否需要补充顶部信息;已提供或已明确不需要时不重复询问。顶部信息不影响正文交付,不作为开始修改或保存的前置条件。

保存仅在用户要求或已有保存授权时执行;未指定保存位置时可使用下方默认目录,不为可选配置阻塞正文交付。已有作者设置可沿用。

配置 默认值 用途
PROMPT_AUTHOR 不填则省略 可选头部的 Author 字段
PROMPT_SAVE_ROOT ~/Documents/prompts 提示词文件保存根目录

质量内核

提示词是代码;优化提示词就是做受控变更。默认只修复用户请求对应的问题,不重写无关段落,不添加不必要实体。

按任务需要选择步骤和判断标准,不把“是否开启深度思考”作为前置问题。模型信息未知时先写通用可执行版本;用户明确提供模型能力或任务确有依赖时,再针对性调整。需要判断、比较或取舍时写清标准,只要求结论、理由摘要和可验证结果,不要求输出完整思考过程。

进入条件

开始修改前先确定:

  • 修改依据:优先使用用户本次指定或提供的文本;需要查历史版本时再读取保存目录。多个来源确实无法判断且影响正文正确性时,才询问哪个为准。
  • 改动范围:用户指定范围优先;未指定时提出最小相关范围。范围外逐字保留。
  • 修订类型:任务目标、受众、输出结构或核心流程大幅变化时,切换到 prompt-creator 的重写逻辑。

诊断清单

把每个问题映射到具体段落和具体改法:

  • MECE:是否有重叠规则、遗漏边界或混合职责。
  • 冲突:目标、约束、格式、优先级是否互相打架。
  • 冗余:是否多次表达同一规则,导致维护成本上升。
  • 歧义:术语、输入、输出、成功标准是否能被稳定执行。
  • 范围膨胀:是否为小改动添加模块、角色、阶段或特殊分支。
  • 示例质量:示例是否能抽象出方法;不能只靠补更多例子兜底。
  • 注释污染:是否有括号式补丁说明或营销式强调词。
  • 安全面:是否增加提示注入、权限滥用、数据泄露或不安全委派风险。

工作流

  1. 用户明确指定或直接提供的提示词优先作为本次修改依据;仅在用户要求查找历史版本时读取保存目录。不自动为无版本文本补上 v1.0
  2. 按用户请求确定最小相关范围;已授权的局部修订直接完成,跨范围或未授权的高风险修改才另行确认。
  3. 在内部诊断并自检,不默认先输出问题清单或差异等待审批。
  4. 先用单一代码块输出完整修订稿,范围外不改写、不重排;用户明确只要诊断或差异时按其要求交付。
  5. 完整稿后再按需询问是否补充顶部信息;用户要求保存时另存新文件,不覆盖旧版本。已有保存授权不重复询问。

变更规则

  • 添加规则放在最近相关段落,不新开特殊模块,除非现有结构无法承载。
  • 删除规则必须说明删除原因;如果风险仍存在,在诊断里标记为超范围残留问题。
  • 注释只用 // 风格;默认最终保存干净版,不把解释性注释混入提示词主体。
  • 不使用括号式补丁标记,不写维护噪声。
  • 不通过堆叠标签、特殊模块或示例来掩盖接口不清。

版本与头部

顶部信息采用“可配置项”中的共同规则,不强制作者、模型、更新说明或版本号。已有且仍适用的头部保留,不因为本次局部修改删除已填写的信息。

用户要求版本管理时使用 v<major>.<minor>,默认 minor +1,并依据实际改动更新 Update;无既有版本时可从 v1.0 开始。仅有既存版本头而未要求维护版本时,不擅自改号,可在完整稿后询问是否更新。

用户要求保存但未要求版本管理时,采用不覆盖已有文件的新文件名,无需补上版本头部。已启用版本管理的文件名使用 prompt_v<major>.<minor>.md

可选 Git 管理

保存提示词文件后,可以提示用户是否需要 Git 记录;Git 不是默认流程,也不是强制项。

  • 只有用户明确要求 Git 记录时,才执行 Git 命令。
  • 先运行 git status 确认改动范围。
  • 若用户确认提交,使用 git add <具体文件>;不要默认使用 git add .
  • Commit message 建议:prompt(<task-slug>): v<version> - <update summary>
  • Push 不是默认步骤;只有用户明确要求 push 时才执行,并先说明目标 remote 和 branch。

Read the full file on GitHub · 101 lines

Files

What ships with it

3 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. today Changed · -6 lines · +5 tokens per session 99a1a88bd224
  2. 10d ago First seen · 107 lines · 85 tokens per session scan A b66a30a646b5

Subscribe to this mod's changes

prompt-optimizer is a skill published in the GitHub repository WiseWong6/wise-skills (6 stars, last pushed yesterday), licensed MIT. It adds 90 tokens to every session and 1,634 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-31.

Related

Other skills, from other repositories

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

prompt-optimization

Improve a prompt on the evaluations workbench through a measured loop. Score the baseline first, then duplicate the target column, form a hypothesis from failing rows, edit the copy's prompt draft, run, compare pass rate and cost, and repeat until the numbers hold. Use when the user asks to optimize or improve a…

langwatch/langwatch · 105 tokens

enhance-prompt

Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.

google-labs-code/stitch-skills · 41 tokens

prompt-engineer

Writes, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot…

Jeffallan/claude-skills · 93 tokens

seedance-vocab-en

This skill should be used when an English Seedance 2.0 prompt needs clearer production wording, less generic prose, or precise vocabulary for camera, lighting, motion, VFX, audio, and constraints. Route blocked prompts through seedance-filter for context and boundary review.

Emily2040/seedance-2.0 · 61 tokens

ideogram4

Prompting patterns for Ideogram 4 text-to-image — best-in-class in-image text rendering and exact color/layout control via structured JSON captions. Use when generating images that need legible on-image text (title cards, thumbnails, logos, signage, CTAs), precise brand colors, or controlled spatial layout. Triggers…

digitalsamba/claude-code-video-toolkit · 99 tokens