prompt-optimizer
Overview
Analyzes prompt files to identify redundancy and inefficiency, generating a token-optimized version.
Workflow
1. Trigger
Activate only when the user prompt contains “OPTIMIZE” and targets a specific file.
2. Analysis Strategy
Review the target content for:
- Verbosity: Replace prose with direct commands.
- Redundancy: Remove implied actions or repeated instructions.
- Fragmentation: Merge related steps (e.g., “Check X” + “If X, do Y” → “If X, do Y”).
3. Optimization Execution
Generate a revised version applying these techniques:
- Condense: Use imperative verbs and concise natural language.
- Structure: Use bullet points or tables instead of paragraphs.
- Prune: Delete non-essential context.
4. Output Protocol
- Present Revision: Show the optimized content clearly.
- Non-Destructive: Explicitly state these are suggestions. Do not modify the file automatically.
- Formats: If requested, suggest structured alternatives (YAML/JSON) for further density.