Agent skill · writing content · affaan-m
prompt-optimizer
Analyze draft prompts, detect intent and missing context, match ECC commands, skills, and agents, and output a ready-to-paste optimized prompt with diagnosis and rationale — advisory only, never executes the task. Use when the user says 'optimize prompt', 'improve my prompt', 'rewrite this prompt', 'help me prompt', 优化prompt, 改进prompt, 怎么写prompt, or 帮我优化这个指令; not for requests to optimize code or performance.
Why this skill is useful
Provides domain-specific knowledge on optimizing prompts and matching them to ECC components, which the AI wouldn't reliably generate on its own.
What it needs
About 9k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.
What this skill does
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. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills affaan-m/prompt-optimizer--a7beda