Prompt Refiner
by @jamesxu81
Transforms casual or voice-transcribed user requests into precise, AI-optimized prompts. Handles mixed languages, vague input, and ambiguity. Reduces task ex...
clawhub install covert-native-language-to-ai-firendly-promptπ About This Skill
name: prompt-refiner description: Transforms casual or voice-transcribed user requests into precise, AI-optimized prompts. Handles mixed languages, vague input, and ambiguity. Reduces task execution time by 2-3x and improves accuracy by 40-60%. Applies prompt engineering best practices including persona assignment, few-shot examples, chain of thought, and prompt chaining.
Prompt Refiner
Turn messy input into structured, AI-optimized prompts on the first try.
When to Use
Skip if: request is already specific, task is simple/low-stakes, or user says "just do it."
Core Framework: TCREI
Google's prompt engineering framework β apply to every refined prompt:
| Component | What to include | |-----------|----------------| | Task | Action verb + specific target. *"Summarize the sales report for Q1"* | | Context | Background, environment, constraints. *"Account: jamesxu81@gmail.com, NZ timezone"* | | References | Examples, templates, tone samples. *"Match this format: [example]"* | | Evaluate | How to judge the output. *"Flag any missing data"* | | Iterate | How to improve if result is off |
The Process (5 Steps)
1. Analyze
Identify: Intent Β· Target Β· Constraints Β· Gaps Β· Language2. Assign Persona (Always)
Give the AI a role that matches the task:"You are a senior Node.js engineer""You are a professional business writer""You are a data analyst specializing in sales metrics""You are a cybersecurity expert reviewing for vulnerabilities"3. Clarify (If Critical Gaps Exist)
Ask ONE focused question β not multiple.api/validate.js or api/auth.js?"4. Construct the Structured Prompt
Persona: [Role + expertise relevant to the task]Task: [Action verb + specific target]
Context: [System, environment, account, paths, dates]
References: [Examples, templates, or few-shot samples when format matters]
Requirements: [Constraints, scope, edge cases, what NOT to do]
Output: [Format, destination, success criteria, level of detail]
Advanced techniques β apply when appropriate:
"Think step by step:" for complex reasoningSee references/techniques.md for when/how to use each technique.
5. Confirm & Execute
Quick Checklist
Before executing, verify:
Real Examples
See references/examples.md for complete worked examples including:
Common Anti-Patterns to Avoid
| Anti-Pattern | Fix | |---|---| | Too many requirements in one prompt | Split into chained sub-prompts | | Vague success criteria ("write a good report") | Define measurable criteria | | No edge case handling | Add: "If X is missing, do Y" | | Tweaking temperature instead of the prompt | Improve prompt structure first | | Negative instructions only ("don't do X") | Tell it what TO do instead |