原始内容
Claude Prompt Optimizer Skill
Interpreter that enhances underspecified prompts before execution, producing better outputs directly.
What It Does
Prompt Optimizer works as a silent preprocessing layer that analyzes your input, infers missing context and specifications, then executes an enhanced version to produce better results directly.
Example:
- You say: "Draft an article outline based on project specifications"
- Claude delivers: A detailed hierarchical outline with section descriptions, key points, logical flow, and estimated proportions - not a lecture about prompt quality
The skill optimizes by interpreting and executing, not by outputting optimized prompt text.
Key Features
- Silent preprocessing - Enhances your input without interrupting workflow
- Direct results - Outputs the actual result, not meta-commentary about prompts
- Context-aware - Uses project files, conversation history, and domain knowledge
- Transparent when needed - Briefly states interpretation for course-correction
- Universal coverage - Works across writing, code, research, planning, and more
Installation
Claude Desktop
- Download prompt-optimizer.skill from the latest release
- Open Claude Desktop
- Go to Settings > Skills
- Click Upload skill
- Select the downloaded
prompt-optimizer.skillfile - Confirm installation
Claude Code
User-level (applies to all projects):
cp -r skill ~/.claude/skills/prompt-optimizer
Project-level (applies to current project only):
cp -r skill .claude/skills/prompt-optimizer
How It Works
The 4-Step Process
- Analyze - Scan input for missing specifications (format, depth, audience, purpose, tone, constraints)
- Infer - Make intelligent assumptions based on context clues and domain conventions
- Execute - Process as if you had provided all specifications
- Clarify - Briefly state interpretation when it would help (optional)
When It Applies
Applies to tasks that:
- Lack specificity about format, structure, or depth
- Miss context about audience or purpose
- Use general terms that could mean many things
- Would benefit from reasonable assumptions
Does NOT apply to:
- Simple factual questions
- Already well-specified prompts
- Exploratory/brainstorming tasks
- Cases where minimal interpretation is preferred
Usage Examples
Writing Task
You say: "Draft an article outline based on project specifications"
Claude responds:
Interpreting this as a detailed hierarchical outline with section descriptions,
key points, and logical flow.
## Article Outline: [Title]
### 1. Introduction (10%)
- Hook: [specific angle]
- Context: [background]
- Thesis: [main argument]
...
Code Task
You say: "Create a function to process the data"
Claude responds:
Interpreting this as a Python function matching your project's style, with
type hints, error handling, and documentation.
def process_data(records: list[dict]) -> ProcessedResult:
"""Process raw records into analyzed format."""
...
When NOT Applied
You say: "What's the difference between TCP and UDP?"
Claude responds (directly, no interpretation prefix):
TCP is connection-oriented and guarantees delivery through acknowledgments.
UDP is connectionless and faster but doesn't guarantee delivery...
Domain-Specific Defaults
| Domain | Default Inferences |
|---|---|
| Writing | Length matches complexity, clear sections, professional tone, knowledgeable audience |
| Code | Infer language from context, follow codebase conventions, include error handling and types |
| Research | Comprehensive depth, cite evidence, executive summary + findings + conclusions |
| Planning | Cover immediate + long-term, structured phases, actionable steps, acknowledge tradeoffs |
Calibration
Infer More When
- Input is very short for a complex task
- Task type has clear professional standards
- Previous context suggests comprehensive outputs wanted
Infer Less When
- User has been very specific previously
- Task is exploratory or creative
- User says "quick" or "brief"
Ask Instead When
- Critical ambiguity that could waste significant effort
- Multiple valid interpretations with very different outputs
- Missing information that can't be reasonably inferred
Version History
v3.0 (Current)
- Complete redesign as silent preprocessing interpreter
- Produces results directly instead of outputting optimized prompts
- Context-aware inference using project files and conversation history
- Optional interpretation statements for transparency
- Calibration guidelines for when to infer more/less
v2.0
- Proactive prompt detection
- Universal domain coverage
- Automatic triggering
v1.0
- Initial release
Compatibility
- Platform: Claude Code, Claude.ai (with skills support)
- Format: Standard Claude Skill (SKILL.md)
- Dependencies: None (self-contained)
Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Reporting Issues
Found a bug or have a suggestion? Open an issue
License
MIT License - see LICENSE for details.
Author
Created by Joao Carlos N. Bittencourt - GitHub
Ready to start? Copy the skill to your Claude skills directory and get better outputs automatically.