jmsktm/claude-settings/llm-prompt-optimizer
- community
Checking that the SKILL.md file is still in the repository.
Optimize prompts for better LLM outputs through systematic analysis and refinement
Install
npx vskill@latest install jmsktm/claude-settings/llm-prompt-optimizerSKILL.md
LLM Prompt Optimizer
The LLM Prompt Optimizer skill systematically analyzes and refines prompts to maximize the quality, accuracy, and relevance of large language model outputs. It applies evidence-based optimization techniques including structural improvements, context enrichment, constraint calibration, and output format specification.
This skill goes beyond basic prompt writing by leveraging understanding of how different LLMs process instructions, their attention patterns, and their response tendencies. It helps you transform underperforming prompts into high-yield instructions that consistently produce the results you need.
Whether you are building production AI systems, conducting research, or simply want better ChatGPT responses, this skill ensures your prompts are optimized for your specific model and use case.
Core Workflows
Workflow 1: Analyze and Diagnose Prompt Issues
- Receive the current prompt and sample outputs
- Identify failure patterns:
- Hallucination triggers
- Ambiguity sources
- Missing context gaps
- Conflicting instructions
- Over/under-constrained parameters
- Map issues to specific prompt segments
- Prioritize fixes by impact
- Explain root causes to user
Workflow 2: Apply Optimization Techniques
- Select appropriate techniques based on diagnosis:
- Chain-of-thought insertion
- Few-shot example addition
- Role/persona specification
- Output schema definition
- Constraint tightening/loosening
- Restructure prompt for clarity
- Add missing context or examples
- Remove conflicting or redundant instructions
- Test optimized version
- Iterate based on results
Workflow 3: Model-Specific Optimization
- Identify target LLM (GPT-4, Claude, Llama, etc.)
- Apply model-specific best practices:
- Token budget optimization
- System prompt vs user prompt split
- Temperature/sampling guidance
- Context window utilization
- Adjust for model quirks and strengths
- Document model-specific recommendations
Quick Reference
| Action | Command/Trigger | |
|---|---|---|
| Diagnose prompt issues | "Why isn't this prompt working: [prompt]" | |
| Optimize for accuracy | "Optimize for accuracy: [prompt]" | |
| Reduce hallucinations | "Reduce hallucinations in: [prompt]" | |
| Add structure | "Add better structure to: [prompt]" | |
| Model-specific optimization | "Optimize this for [model]: [prompt]" | |
| A/B test variants | "Create prompt variants for testing: [prompt]" |
Best Practices
- Start with Clear Intent: Define exactly what success looks like before optimizing
- Bad: "Make it work better"
- Good: "Reduce factual errors while maintaining conversational tone"
- Use Explicit Output Formats: LLMs follow structure better than vague requests
- Specify JSON schemas, markdown formats, or template structures
- Example: "Return as JSON with keys: analysis, recommendations, confidence"
- Calibrate Constraints: Too many constraints cause conflicts; too few cause drift
- Test constraint combinations systematically
- Remove constraints that don't improve output quality
- Leverage Positive Instructions: Tell the model what TO do, not just what NOT to do
- Bad: "Don't be verbose"
- Good: "Respond in 2-3 concise sentences"
- Position Critical Instructions Strategically: Beginning and end get more attention
- Put key constraints at the start
- Repeat critical requirements at the end
- Use Delimiters for Multi-Part Inputs: Clear separation prevents confusion
- Triple quotes, XML tags, or markdown headers
- Example:
"""User Query: {query}""" """Context: {context}"""
Advanced Techniques
Recursive Refinement Loop
For complex prompts, use iterative optimization:
Prompt Decomposition
Break complex tasks into simpler sub-prompts:
Negative Example Injection
Show what NOT to do alongside positive examples:
Token Budget Optimization
When context is limited:
Common Pitfalls to Avoid
- Over-engineering simple prompts with unnecessary complexity
- Copying prompts between models without adaptation
- Ignoring the relationship between temperature and prompt specificity
- Adding examples that introduce unwanted patterns
- Using vague terms like "good," "proper," or "appropriate" without definition
- Conflicting instructions that force the model to choose
- Forgetting to specify handling of edge cases and errors
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/llm-prompt-optimizer/SKILL.md
Popularity
- Repository stars
- 4
- Repository forks
- 5
- 7-day trend score
- 8
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 14 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jmsktm/claude-settings/llm-prompt-optimizer)