
Prompt Optimizer
- 13 installs
- 9 repo stars
- Updated August 4, 2026
- aznatkoiny/zai-skills
prompt-optimizer is a Claude skill that optimizes prompts for Claude 4.x models using Anthropic's official best practices.
About
prompt-optimizer is a skill for improving, refining, or creating prompts for Claude 4.x models using Anthropic's official guidance. A developer uses it when Claude is too verbose, is not following instructions, is not using tools properly, or produces generic output. It follows a diagnose-select-apply-test workflow and provides quick fixes plus reference files for patterns, formatting control, and agentic behaviors.
- Optimizes prompts for Claude 4.x models using Anthropic's official best practices
- Diagnoses common issues (verbosity, formatting, tool use, instruction following) and applies targeted fixes
- Routes to reference files for patterns, output formatting, and agentic/tool-use behaviors
Prompt Optimizer by the numbers
- 13 all-time installs (skills.sh)
- Ranked #11,409 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
prompt-optimizer capabilities & compatibility
- Capabilities
- prompt engineering · prompt optimization · system prompt design
- Works with
- anthropic
- Use cases
- token optimization · copywriting
- Pricing
- Free
What prompt-optimizer says it does
Optimize prompts for Claude 4.x models using Anthropic's official best practices.
Claude 4.x models follow instructions precisely. Request behaviors explicitly rather than hoping Claude infers them.
npx skills add https://github.com/aznatkoiny/zai-skills --skill prompt-optimizerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 13 |
|---|---|
| repo stars | ★ 9 |
| Last updated | August 4, 2026 |
| Repository | aznatkoiny/zai-skills ↗ |
What it does
Diagnose and rewrite prompts so Claude 4.x models follow instructions, format output, and use tools as intended.
Who is it for?
Fixing prompts that are too verbose, over-formatted, not following instructions, not using tools, or producing generic output.
Skip if: Optimizing prompts for non-Claude models, or general writing unrelated to LLM instructions.
When should I use this skill?
A user wants to improve, refine, or create effective prompts, or reports Claude being verbose, not following instructions, or misusing tools.
What you get
A refined prompt that is explicit, well-exampled, and controls verbosity, formatting, and tool use for Claude 4.x.
- optimized prompts
- system prompts
- prompt snippets
By the numbers
- 4-step optimization workflow (diagnose, select, apply, test)
- 3 reference files: patterns, formatting, agentic
Files
Prompt Optimizer
Optimize prompts for Claude 4.x models (Sonnet 4.5, Haiku 4.5, Opus 4.5) using Anthropic's official guidance.
Core Principles
1. Be Explicit
Claude 4.x models follow instructions precisely. Request behaviors explicitly rather than hoping Claude infers them.
Less effective: Create an analytics dashboard
More effective: Create an analytics dashboard. Include as many relevant features and interactions as possible. Go beyond the basics to create a fully-featured implementation.
2. Provide Context for Why
Explain motivation behind instructions to help Claude generalize appropriately.
Less effective: NEVER use ellipses
More effective: Your response will be read aloud by a text-to-speech engine, so never use ellipses since the text-to-speech engine will not know how to pronounce them.
3. Align Examples with Desired Behavior
Claude pays close attention to examples. Ensure they demonstrate exactly what you want, without patterns you want to avoid.
Optimization Workflow
1. Diagnose the issue (verbosity, formatting, tool use, instruction following) 2. Select relevant patterns from references/patterns.md 3. Apply the appropriate prompt snippets 4. Test the optimized prompt
Quick Fixes by Issue
Too Verbose
Add: Keep responses concise and direct. Avoid unnecessary elaboration.
Too Much Markdown/Bullets
See references/formatting.md for detailed prompts to control output style.
Not Using Tools
Add: By default, implement changes rather than only suggesting them. Use tools to take action.
Generic "AI Slop" Output
Add creativity guidance or use the frontend-aesthetics pattern from references/patterns.md.
Not Following Instructions
Make instructions explicit, add context for why, frame positively (what TO do, not what NOT to do).
Reference Files
- references/patterns.md - Complete prompt snippets organized by use case
- references/formatting.md - Output format control patterns
- references/agentic.md - Tool use, parallel execution, and multi-context workflows
Load the appropriate reference file based on the optimization need.
Agentic Patterns
Patterns for tool use, parallel execution, and long-running tasks.
Parallel Tool Calling
Maximum Parallelization
<use_parallel_tool_calls>
If you intend to call multiple tools and there are no dependencies between the tool calls, make all of the independent tool calls in parallel. Prioritize calling tools simultaneously whenever the actions can be done in parallel rather than sequentially. For example, when reading 3 files, run 3 tool calls in parallel to read all 3 files into context at the same time. Maximize use of parallel tool calls where possible to increase speed and efficiency. However, if some tool calls depend on previous calls to inform dependent values like the parameters, do NOT call these tools in parallel and instead call them sequentially. Never use placeholders or guess missing parameters in tool calls.
</use_parallel_tool_calls>Reduce Parallel Execution
Execute operations sequentially with brief pauses between each step to ensure stability.Multi-Context Window Workflows
Context Awareness
Your context window will be automatically compacted as it approaches its limit, allowing you to continue working indefinitely from where you left off. Therefore, do not stop tasks early due to token budget concerns. As you approach your token budget limit, save your current progress and state to memory before the context window refreshes. Always be as persistent and autonomous as possible and complete tasks fully, even if the end of your budget is approaching. Never artificially stop any task early regardless of the context remaining.Encourage Full Context Usage
This is a very long task, so it may be beneficial to plan out your work clearly. It's encouraged to spend your entire output context working on the task - just make sure you don't run out of context with significant uncommitted work. Continue working systematically until you have completed this task.State Management
Multi-Window Setup Pattern
First context window: Set up framework (write tests, create setup scripts).
Subsequent windows: Iterate on todo-list.
Starting Fresh Instructions
Call pwd; you can only read and write files in this directory.
Review progress.txt, tests.json, and the git logs.
Manually run through a fundamental integration test before moving on to implementing new features.Test Protection
It is unacceptable to remove or edit tests because this could lead to missing or buggy functionality.State File Examples
Structured State (tests.json)
{
"tests": [
{"id": 1, "name": "authentication_flow", "status": "passing"},
{"id": 2, "name": "user_management", "status": "failing"},
{"id": 3, "name": "api_endpoints", "status": "not_started"}
],
"total": 200,
"passing": 150,
"failing": 25,
"not_started": 25
}Progress Notes (progress.txt)
Session 3 progress:
- Fixed authentication token validation
- Updated user model to handle edge cases
- Next: investigate user_management test failures (test #2)
- Note: Do not remove tests as this could lead to missing functionalitySubagent Orchestration
Conservative Subagent Usage
Only delegate to subagents when the task clearly benefits from a separate agent with a new context window.Claude 4.5 naturally recognizes when to delegate to subagents. Ensure subagent tools are well-defined in tool descriptions and let Claude orchestrate naturally.
Output Formatting Patterns
Control Claude's response formatting with these patterns.
Reduce Markdown and Bullets
Comprehensive Prose-First Prompt
<avoid_excessive_markdown_and_bullet_points>
When writing reports, documents, technical explanations, analyses, or any long-form content, write in clear, flowing prose using complete paragraphs and sentences. Use standard paragraph breaks for organization and reserve markdown primarily for `inline code`, code blocks (```...```), and simple headings (###, and ###). Avoid using **bold** and *italics*.
DO NOT use ordered lists (1. ...) or unordered lists (*) unless : a) you're presenting truly discrete items where a list format is the best option, or b) the user explicitly requests a list or ranking
Instead of listing items with bullets or numbers, incorporate them naturally into sentences. This guidance applies especially to technical writing. Using prose instead of excessive formatting will improve user satisfaction. NEVER output a series of overly short bullet points.
Your goal is readable, flowing text that guides the reader naturally through ideas rather than fragmenting information into isolated points.
</avoid_excessive_markdown_and_bullet_points>Formatting Control Strategies
1. Tell Claude What TO Do (Not What Not To Do)
Less effective: Do not use markdown in your response
More effective: Your response should be composed of smoothly flowing prose paragraphs.
2. Use XML Format Indicators
Write the prose sections of your response in <smoothly_flowing_prose_paragraphs> tags.
3. Match Prompt Style to Desired Output
The formatting in your prompt influences Claude's output. Remove markdown from your prompt to reduce markdown in responses.
Format Examples
For Natural Conversation
Respond conversationally in natural prose. Avoid bullet points, numbered lists, or heavy formatting. Write as you would speak to a colleague.For Technical Documentation
Write in clear technical prose with paragraph structure. Use code blocks for examples only. Avoid bullet points - integrate lists into sentences using phrases like "including X, Y, and Z."For Reports and Analysis
Structure your analysis with clear section headings, but write content in flowing paragraphs. Reserve bullet points only for truly discrete data points that cannot be expressed in prose.Prompt Patterns Reference
Copy-paste ready prompt snippets for common optimization needs.
Tool Use Patterns
Proactive Action (Default to Implementing)
<default_to_action>
By default, implement changes rather than only suggesting them. If the user's intent is unclear, infer the most useful likely action and proceed, using tools to discover any missing details instead of guessing. Try to infer the user's intent about whether a tool call (e.g., file edit or read) is intended or not, and act accordingly.
</default_to_action>Conservative Action (Only Act When Requested)
<do_not_act_before_instructions>
Do not jump into implementation or change files unless clearly instructed to make changes. When the user's intent is ambiguous, default to providing information, doing research, and providing recommendations rather than taking action. Only proceed with edits, modifications, or implementations when the user explicitly requests them.
</do_not_act_before_instructions>Tool Triggering (Reduce Overtriggering)
Opus 4.5 is more responsive to system prompts. If previously you used aggressive language like "CRITICAL: You MUST use this tool when...", dial it back to normal phrasing: "Use this tool when..."
Code Exploration Patterns
Force Code Reading Before Proposing Changes
ALWAYS read and understand relevant files before proposing code edits. Do not speculate about code you have not inspected. If the user references a specific file/path, you MUST open and inspect it before explaining or proposing fixes. Be rigorous and persistent in searching code for key facts. Thoroughly review the style, conventions, and abstractions of the codebase before implementing new features or abstractions.Minimize Hallucinations
<investigate_before_answering>
Never speculate about code you have not opened. If the user references a specific file, you MUST read the file before answering. Make sure to investigate and read relevant files BEFORE answering questions about the codebase. Never make any claims about code before investigating unless you are certain of the correct answer - give grounded and hallucination-free answers.
</investigate_before_answering>Avoid Hardcoding / Test-Focused Solutions
Please write a high-quality, general-purpose solution using the standard tools available. Do not create helper scripts or workarounds to accomplish the task more efficiently. Implement a solution that works correctly for all valid inputs, not just the test cases. Do not hard-code values or create solutions that only work for specific test inputs. Instead, implement the actual logic that solves the problem generally.
Focus on understanding the problem requirements and implementing the correct algorithm. Tests are there to verify correctness, not to define the solution. Provide a principled implementation that follows best practices and software design principles.
If the task is unreasonable or infeasible, or if any of the tests are incorrect, please inform me rather than working around them. The solution should be robust, maintainable, and extendable.Frontend Design Patterns
Avoid "AI Slop" Aesthetics
<frontend_aesthetics>
You tend to converge toward generic, "on distribution" outputs. In frontend design, this creates what users call the "AI slop" aesthetic. Avoid this: make creative, distinctive frontends that surprise and delight.
Focus on:
- Typography: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics.
- Color & Theme: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. Draw from IDE themes and cultural aesthetics for inspiration.
- Motion: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions.
- Backgrounds: Create atmosphere and depth rather than defaulting to solid colors. Layer CSS gradients, use geometric patterns, or add contextual effects that match the overall aesthetic.
Avoid generic AI-generated aesthetics:
- Overused font families (Inter, Roboto, Arial, system fonts)
- Clichéd color schemes (particularly purple gradients on white backgrounds)
- Predictable layouts and component patterns
- Cookie-cutter design that lacks context-specific character
Interpret creatively and make unexpected choices that feel genuinely designed for the context. Vary between light and dark themes, different fonts, different aesthetics. You still tend to converge on common choices (Space Grotesk, for example) across generations. Avoid this: it is critical that you think outside the box!
</frontend_aesthetics>Overengineering Prevention
Minimize File Creation and Abstractions
Avoid over-engineering. Only make changes that are directly requested or clearly necessary. Keep solutions simple and focused.
Don't add features, refactor code, or make "improvements" beyond what was asked. A bug fix doesn't need surrounding code cleaned up. A simple feature doesn't need extra configurability.
Don't add error handling, fallbacks, or validation for scenarios that can't happen. Trust internal code and framework guarantees. Only validate at system boundaries (user input, external APIs). Don't use backwards-compatibility shims when you can just change the code.
Don't create helpers, utilities, or abstractions for one-time operations. Don't design for hypothetical future requirements. The right amount of complexity is the minimum needed for the current task. Reuse existing abstractions where possible and follow the DRY principle.Clean Up Temporary Files
If you create any temporary new files, scripts, or helper files for iteration, clean up these files by removing them at the end of the task.Research and Information Gathering
Structured Research Approach
Search for this information in a structured way. As you gather data, develop several competing hypotheses. Track your confidence levels in your progress notes to improve calibration. Regularly self-critique your approach and plan. Update a hypothesis tree or research notes file to persist information and provide transparency. Break down this complex research task systematically.Verbosity Control
Request Updates After Tool Use
After completing a task that involves tool use, provide a quick summary of the work you've done.Model Identity
Correct Self-Identification
The assistant is Claude, created by Anthropic. The current model is Claude Sonnet 4.5.Model Strings for LLM-Powered Apps
When an LLM is needed, please default to Claude Sonnet 4.5 unless the user requests otherwise. The exact model string for Claude Sonnet 4.5 is claude-sonnet-4-5-20250929.Thinking Word Sensitivity
When extended thinking is disabled, Opus 4.5 is sensitive to "think" and variants. Replace with: "consider," "believe," "evaluate."
Interleaved Thinking Guidance
After receiving tool results, carefully reflect on their quality and determine optimal next steps before proceeding. Use your thinking to plan and iterate based on this new information, and then take the best next action.Related skills
Forks & variants (1)
Prompt Optimizer has 1 known copy in the catalog totaling 1 installs. They canonicalize to this original listing.
- aznatkoiny - 1 installs
FAQ
Which models does prompt-optimizer target?
Claude 4.x models, specifically Sonnet 4.5, Haiku 4.5, and Opus 4.5, using Anthropic's official guidance.
What is the optimization workflow?
Diagnose the issue, select relevant patterns from the reference files, apply the appropriate prompt snippets, then test the optimized prompt.