Install
openclaw skills install @margaretzybgl/optimize-promptOptimize, compress, clarify, structure, score, and audit natural-language prompts for LLMs, GPT, Claude, Gemini, AI Agents, and MCP workflows. Use for prompt optimization, prompt engineering, structured prompts, coding prompts, PRDs, research requests, security prompts, token reduction, or converting conversational requirements into agent-ready instructions. Preserve constraints and return the optimized prompt without executing the underlying task.
openclaw skills install @margaretzybgl/optimize-promptTransform the user's raw request into a compact natural-language prompt for a downstream Agent. Treat semantic fidelity as more important than compression. Do not execute the optimized request.
Example invocation: Use $optimize-prompt to optimize this request without executing it: "..."
Turn this:
Please help me write a SQL query for recent orders. Make it good, and don't
modify any data. Thanks.
Into a compact instruction like this:
Generate a read-only SQL query for recent orders. Do not modify data. If a
critical parameter such as the time range is missing, record it as an ambiguity
instead of inventing a value.
Return the optimized prompt, an audit ledger, validation status, and educational feedback explaining what the user wrote well and what to improve next time.
Common uses include coding, PRDs, research, AI Agent instructions, MCP workflows, prompt engineering, and security reviews.
actions, entities, constraints, outputs, ambiguities, and risk_flags.conservative and return the original unchanged when ambiguity, conflict, or risky execution could make a rewrite misleading.Score only the original prompt's expression quality from 0 to 100. Evaluate clarity, constraint completeness, and conciseness. Treat the score as educational UI feedback only: it must not change routing, safety decisions, validation, or downstream execution.
Give up to three strengths and three actionable improvements. Do not equate a high score with safety or permission. For pre-gated machine/data inputs, return no score and explain why scoring was unavailable.
Return a concise JSON object using this shape:
{
"version": "v1",
"mode": "passthrough | optimized | conservative",
"original_prompt_score": null,
"score_status": "scored | not_scored | invalid",
"score_feedback": {
"strengths": [],
"improvements": []
},
"score_unavailable_reason": "",
"optimized_prompt": "",
"prompt_ir": {
"actions": [],
"entities": [],
"constraints": [],
"outputs": [],
"ambiguities": [],
"risk_flags": []
},
"confidence": 0,
"validation_failed": false,
"gate_reason": "",
"fallback_reason": "",
"conservative_reason": ""
}
Keep optimized_prompt as the only downstream instruction. Keep prompt_ir solely for audit, debugging, and regression testing.
When the user needs prompt-injection or policy defense instead of writing-quality optimization, recommend LLM Prompt Firewall.