prompt-optimizer

prompt-optimizer is a skill for Claude Code from loulanyue/awesome-claude-notes. It costs 5 tokens per session (3,969 once invoked), scanned A, original, MIT.

A prompt-writing adviser that reviews a draft instruction and produces a clearer version you can paste into an AI coding tool.

In plain words
What is it for?
Use it to improve prompts, decide which coding-agent components fit a task, and create a complete prompt without carrying out the task itself.
Why use it?
It helps turn vague requests into instructions that are easier for an AI assistant to follow.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions Claude Code.

Part of the awesome-claude-notes plugin — 106 skills, 61 commands, 28 agents shipped together

Good fit Use it to improve prompts, decide which coding-agent components fit a task, and create a complete prompt without carrying out the task itself.

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

Made for: Claude Code.

Or install awesome-claude-notes, the plugin that ships this one along with the rest of its 106 skills, 61 commands, 28 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/loulanyue/awesome-claude-notes/prompt-optimizer/github.svg)](https://agentmods.dev/skills/loulanyue/awesome-claude-notes/prompt-optimizer)
Your own site
<a href="https://agentmods.dev/skills/loulanyue/awesome-claude-notes/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/loulanyue/awesome-claude-notes/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/loulanyue/awesome-claude-notes/prompt-optimizer"><img src="https://agentmods.dev/badge/skills/loulanyue/awesome-claude-notes/prompt-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,969 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 4
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 393
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Rogue Agent · line 185
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Excessive Agency · line 344
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00005 $0.03969
Opus 5 $0.00003 $0.01985
Sonnet 5 $0.00001 $0.00794
Haiku 4.5 $0.00001 $0.00397

Measured 6d ago against content hash fca72bdc8078, 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 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.

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

docs/ja-JP/skills/prompt-optimizer/SKILL.md · 399 lines

How it starts

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

Prompt Optimizer

Analyze a draft prompt, critique it, match it to ECC ecosystem components, and output a complete optimized prompt the user can paste and run.

When to Use

  • User says "optimize this prompt", "improve my prompt", "rewrite this prompt"
  • User says "help me write a better prompt for..."
  • User says "what's the best way to ask Claude Code to..."
  • User says "优化prompt", "改进prompt", "怎么写prompt", "帮我优化这个指令"
  • User pastes a draft prompt and asks for feedback or enhancement
  • User says "I don't know how to prompt for this"
  • User says "how should I use ECC for..."
  • User explicitly invokes /prompt-optimize

Do Not Use When

  • User wants the task done directly (just execute it)
  • User says "优化代码", "优化性能", "optimize this code", "optimize performance" — these are refactoring tasks, not prompt optimization
  • User is asking about ECC configuration (use configure-ecc instead)
  • User wants a skill inventory (use skill-stocktake instead)
  • User says "just do it" or "直接做"

How It Works

Advisory only — do not execute the user's task.

Do NOT write code, create files, run commands, or take any implementation action. Your ONLY output is an analysis plus an optimized prompt.

If the user says "just do it", "直接做", or "don't optimize, just execute", do not switch into implementation mode inside this skill. Tell the user this skill only produces optimized prompts, and instruct them to make a normal task request if they want execution instead.

Run this 6-phase pipeline sequentially. Present results using the Output Format below.

Analysis Pipeline

Phase 0: Project Detection

Before analyzing the prompt, detect the current project context:

  1. Check if a CLAUDE.md exists in the working directory — read it for project conventions
  2. Detect tech stack from project files:
    • package.json → Node.js / TypeScript / React / Next.js
    • go.mod → Go
    • pyproject.toml / requirements.txt → Python
    • Cargo.toml → Rust
    • build.gradle / pom.xml → Java / Kotlin / Spring Boot
    • Package.swift → Swift
    • Gemfile → Ruby
    • composer.json → PHP
    • *.csproj / *.sln → .NET
    • Makefile / CMakeLists.txt → C / C++
    • cpanfile / Makefile.PL → Perl
  3. Note detected tech stack for use in Phase 3 and Phase 4

Read the full file on GitHub · 399 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 · 399 lines · 3 tokens per session scan A fca72bdc8078

Subscribe to this mod's changes

prompt-optimizer is a skill published in the GitHub repository loulanyue/awesome-claude-notes (270 stars, last pushed 6d ago), licensed MIT. It adds 5 tokens to every session and 3,969 once invoked, about $0.0000 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-09-03.

Related

Other skills, from other repositories

career-path-planner

Career goal mapping with skill gap analysis, actionable development plans, and milestone tracking. Use when planning career transitions, identifying skill gaps, setting professional development goals, or evaluating career options.

travisjneuman/.claude · 41 tokens

case-interview-practice

Interactive consulting case interview practice with structured frameworks, feedback mechanisms, and progressive difficulty. Use when preparing for management consulting interviews, case competitions, or business problem-solving exercises.

travisjneuman/.claude · 39 tokens

course-material-creator

Create custom educational materials including syllabi, lesson plans, assessments, reading lists, and learning objectives. Use when building course curricula, training programs, workshops, or educational content.

travisjneuman/.claude · 40 tokens

debate-practice-coach

Interactive debate and argument practice with structured feedback, counterargument generation, logical fallacy identification, and scoring rubrics. Use when preparing for debates, improving persuasion skills, or practicing argumentation.

travisjneuman/.claude · 45 tokens

drmax-lexadapt

A text-editing skill that simplifies vocabulary for a chosen language-proficiency level, such as CEFR levels for English or TRKI levels for Russian. It offers review, rewrite-only, and small-batch modes while aiming to preserve the original meaning.

VKirill/claude-lane-stack · 118 tokens

agent-docs-lookup

When the user asks how to use a library, framework, or API or needs up-to-date code examples, use Context7 MCP to fetch current documentation and return answers with examples. Invoke for docs/API/setup questions.

KunanonJ/ai-skills-hub · 49 tokens