prompt-optimizer

prompt-optimizer is a skill for Claude Code, Codex from LingyiChen-AI/OpenSkills. It costs 51 tokens per session (1,243 once invoked), scanned A, original, Apache-2.0.

A prompt-writing skill improves instructions given to an AI assistant by applying established prompt patterns, called frameworks, to different tasks.

In plain words
What is it for?
Use it to improve an existing prompt, turn an idea into a prompt, or choose a suitable framework for tasks in areas such as marketing, education, and decision-making.
Why use it?
It helps turn vague requests or rough prompts into clearer instructions with a better-defined goal and structure.

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/lingyichen-ai/openskills/prompt-optimizer
Any agent
npx skills add LingyiChen-AI/OpenSkills --skill prompt-optimizer
Clone the repo
git clone --depth 1 https://github.com/LingyiChen-AI/OpenSkills

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/lingyichen-ai/openskills/prompt-optimizer.svg)](https://agentmods.dev/skills/lingyichen-ai/openskills/prompt-optimizer)
Your own site
<a href="https://agentmods.dev/skills/lingyichen-ai/openskills/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/lingyichen-ai/openskills/prompt-optimizer.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,243 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.00051 $0.01243
Opus 5 $0.00026 $0.00622
Sonnet 5 $0.00010 $0.00249
Haiku 4.5 $0.00005 $0.00124

Measured 5d ago against content hash 4d30c9bde3d1, 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.

examples/prompt-optimizer/SKILL.md · 131 lines

How it starts

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

Prompt Optimizer

A comprehensive prompt engineering skill that helps users craft high-quality, effective prompts using proven frameworks.

Workflow

When a user requests prompt optimization, follow these steps:

Step 1: Analyze User Input

Receive the user's request, which may be:

  • A raw prompt that needs optimization
  • A task description or requirement
  • A vague idea that needs to be turned into a prompt

Step 2: Match Scenario and Select Framework

Read the references/Frameworks_Summary.md file to:

  1. Identify the user's scenario from the application scenarios listed
  2. Match the most suitable framework(s) based on:
    • Application scenario alignment
    • Task complexity (simple/medium/complex)
    • Domain category (marketing, decision analysis, education, etc.)

Framework Selection Guide by Complexity:

Complexity Recommended Frameworks
Simple (≤3 elements) APE, ERA, TAG, RTF, BAB, PEE, ELI5
Medium (4-5 elements) RACE, CIDI, SPEAR, SPAR, FOCUS, SMART, GOPA, ORID, CARE, ROSE, PAUSE, TRACE, GRADE, TRACI, RODES
Complex (6+ elements) RACEF, CRISPE, SCAMPER, Six Thinking Hats, ROSES, PROMPT, RISEN, RASCEF, Atomic Prompting

Framework Selection Guide by Domain:

Domain Recommended Frameworks
Marketing Content BAB, SPEAR, Challenge-Solution-Benefit, BLOG, PROMPT, RHODES
Decision Analysis RICE, Pros and Cons, Six Thinking Hats, Tree of Thought, PAUSE, What If
Education & Training Bloom's Taxonomy, ELI5, Socratic Method, PEE, Hamburger Model
Product Development SCAMPER, HMW, CIDI, RELIC, 3Cs Model
AI Dialogue/Assistant COAST, ROSES, TRACE, RACE, RASCEF
Writing & Creation BLOG, 4S Method, Hamburger Model, Few-shot, RHODES, Chain of Destiny
Image Generation Atomic Prompting
Quick Simple Tasks Zero-shot, ERA, TAG, APE, RTF
Complex Reasoning Chain of Thought, Tree of Thought

Read the full file on GitHub · 131 lines

Files

What ships with it

59 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. 5d ago First seen · 131 lines · 51 tokens per session scan A 4d30c9bde3d1

Subscribe to this mod's changes

prompt-optimizer is a skill published in the GitHub repository LingyiChen-AI/OpenSkills (68 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 51 tokens to every session and 1,243 once invoked, about $0.0003 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

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

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

omh-model-optimization

This is a Hermes-native model-optimization workflow skill.

rlaope/oh-my-hermes · 82 tokens