Optimize Agent Prompt
Refines agent prompts iteratively to maximize task success rates and output quality using Sanity's AI expertise.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add optimize-agent-prompt npx -- -y @trustedskills/optimize-agent-prompt
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"optimize-agent-prompt": {
"command": "npx",
"args": [
"-y",
"@trustedskills/optimize-agent-prompt"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill refines and optimizes prompts given to AI agents, aiming for improved output quality and adherence to instructions. It analyzes existing prompts and suggests modifications based on best practices for prompt engineering. The goal is to reduce ambiguity, increase clarity, and improve the overall effectiveness of agent interactions.
When to use it
- Improving Agent Accuracy: When an agent consistently produces inaccurate or irrelevant results.
- Refining Complex Tasks: For agents handling multi-step processes or requiring specific formatting.
- Reducing Hallucinations: To minimize instances where the AI agent generates incorrect or fabricated information.
- Enhancing Creative Output: To guide creative tasks like writing, brainstorming, and design generation.
Key capabilities
- Prompt analysis
- Suggestion of prompt modifications
- Best practices for prompt engineering implementation
- Improved output quality
Example prompts
- "Optimize this agent prompt: 'Write a short story about a cat.'"
- "Can you improve the clarity of this prompt: 'Summarize the following article and extract key entities'?"
- "Analyze this prompt for potential biases: 'Generate marketing copy targeting young adults.'"
Tips & gotchas
The effectiveness of this skill depends on the quality of the initial prompt. Providing clear context and specific instructions in your original prompt will yield better optimization suggestions.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🏢 Official
Published by the company or team that built the technology.