when-optimizing-prompts-use-prompt-optimization-analyzer
Active diagnostic tool for analyzing prompt quality, detecting anti-patterns, identifying token waste, and providing optimization recommendations
npx skills add majiayu000/claude-skill-registry --skill when-optimizing-prompts-use-prompt-optimization-analyzer-dnyouss --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Prompt Optimization Analyzer **Purpose:** Analyze prompt quality and provide actionable optimization recommendations to reduce token waste, improve clarity, and enhance effectiveness. ## When to Use This Skill - Before publishing new skills or slash commands - When prompts exceed token budgets - When responses are inconsistent or unclear - During skill maintenance and refinement - When analyzing existing prompt libraries ## Analysis Dimensions ### 1. Token Efficiency Analysis - Redundancy detection (repeated concepts, phrases) - Verbosity measurement (word count vs. information density) - Compression opportunities (equivalent shorter forms) - Example bloat (excessive or redundant examples) ### 2. Anti-Pattern Detection - Vague instructions ("do something good") - Ambiguous terminology (undefined jargon) - Conflicting requirements (contradictory rules) - Missing context (insufficient background) - Over-specification (unnecessary constraints) ### 3. Trigger Issue Analysis - Unclear activation conditions - Overlapping trigger patterns - Missing edge cases - Too broad/narrow scope ### 4. Structural Optimization - Information architecture (logical flow) - Section organization (groupin
- When to Use This Skill
- Analysis Dimensions
- 1. Token Efficiency Analysis
- 2. Anti-Pattern Detection
- 3. Trigger Issue Analysis
- 4. Structural Optimization
- Execution Process
- Phase 1: Token Waste Detection
- Phase 2: Anti-Pattern Detection
- Phase 3: Trigger Analysis
- Phase 4: Optimization Recommendations
- Phase 5: Before/After Comparison
- Concrete Example: Real Analysis
- Input Prompt (Fragment)
Analyze prompt for redundancy
npx claude-flow@alpha hooks pre-task --description "Analyzing prompt for token waste"
Store original metrics
npx claude-flow@alpha memory store --key "optimization/original-tokens" --value "{
Spawn analyzer agent
Agent instructions:
npx claude-flow@alpha memory store --key "optimization/recommendations" --value "{
npx claude-flow@alpha hooks pre-task --description "Optimizing new skill prompt"
Agent performs full analysis as documented above
npx claude-flow@alpha memory retrieve --key "optimization/recommendations"What does the when-optimizing-prompts-use-prompt-optimization-analyzer skill do?
Active diagnostic tool for analyzing prompt quality, detecting anti-patterns, identifying token waste, and providing optimization recommendations
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill when-optimizing-prompts-use-prompt-optimization-analyzer-dnyouss --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
