Optimize Prompt
优化、压缩与审计 AI Prompt · Optimize prompts Skill: Optimize Prompt Owner: margaretzybgl Summary: 优化、压缩与审计 AI Prompt · Optimize prompts Tags: latest:0.1.3 Version history: v0.1.3 | 2026-07-31T17:14:01.936Z | user 补充中英文双语简介并保持现有分类。Added a concise bilingual summary while preserving marketplace categories. v0.1.2 | 2026-07-12T06:53:46.553Z | user Improve onboarding with Before/After examples, quick starts, real-world use cases, bilingual documentation, FAQ, roadma
Rank
62
Safety
84
Downloads
1.1k
Updated
Oct 11, 2026
Version
0.1.3
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1.1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 0.1.3release · observed Jul 31, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s170y02ayvkmssb1ej7zeae4cx841f3g:optimize-prompt- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-margaretzybgl-optimize-prompt/snapshot"
Documentation
CLAWHUB
53,409 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
--- name: optimize-prompt description: Optimize, 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. --- # Optimize Prompt Transform 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: "..."` ## What the user gets Turn this: ```text 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: ```text 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. ## Workflow 1. Identify the exact raw prompt the user wants optimized. If the invocation contains surrounding discussion, optimize only the clearly designated prompt. 2. Apply the pre-gate. Return the original unchanged when it is: - extremely short and already executable; - JSON, a tool/function call, or structured XML/MCP context; - dominated by Base64, a Data URI, or a large fenced code block. 3. Otherwise, extract an audit ledger with `actions`, `entities`, `constraints`, `outputs`, `ambiguities`, and `risk_flags`. 4. Produce a shorter natural-language prompt only by removing filler, repetition, and unnecessary structure. Never infer missing parameters or strengthen tentative language. 5. Preserve negations and their scope, permissions, numbers, dates, amounts, percentages, versions, URLs, file/function names, output format and language, attachments, quoted source data, and risk limitations. 6. Use `conservative` and return the original unchanged when ambiguity, conflict, or risky execution could make a rewrite misleading. 7. Validate both directions: - every execution-affecting atom in the optimized prompt appears in the audit ledger; - every ledger item is traceable to the original prompt; - no protected literal is missing or newly introduced. 8. If validation is uncertain or fails, return the original unchanged. ## Learning score Score only the original prompt's expression quality from 0 to 100. Evaluate clarity, constraint completeness, and conciseness. Treat the score
README.md
# Optimize Prompt ### Compress • Clarify • Structure • Audit LLM Prompts [English](#english) · [中文](#中文) · [ClawHub](https://clawhub.ai/margaretzybgl/skills/optimize-prompt)  ## English Turn conversational, repetitive, or loosely structured requests into compact, auditable prompts for GPT, Claude, Gemini, MCP tools, and downstream AI Agents—without silently changing intent. ### See the difference in 10 seconds **Before** ```text Hey, could you please help me write a SQL query for recent orders? Make it good, and please don't modify any data. Thanks. ``` **After** ```text Generate a read-only SQL query for recent orders. Preserve all stated scope and 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. ``` Optimize Prompt removes filler and repetition, preserves constraints, records ambiguity, validates protected literals, and returns only a downstream-ready prompt. When rewriting could be unsafe, it returns the original unchanged. ## Install and get a result in under one minute ```bash npx clawhub@latest install @margaretzybgl/optimize-prompt ``` Then try: ```text Use $optimize-prompt to optimize this without executing it: "Please help me create a launch plan for Project Atlas by 2026-09-30. Only create a draft. Do not publish or send anything. Output Markdown." ``` You receive: - an `optimized_prompt` for the downstream Agent; - a minimal Prompt IR audit ledger; - validation and fallback status; - an educational quality score with strengths and next-time improvements. The score is learning feedback only. It never changes routing, safety decisions, or execution. ## Copy-ready quick starts ### 1. Coding ```text Use $optimize-prompt to optimize this coding request without implementing it: "Refactor app.py for readability. Keep Python 3.11 compatibility, do not change public APIs, and return a unified diff plus a short explanation." ``` ### 2. Product requirements ```text Use $optimize-prompt to optimize this PRD request without writing the PRD: "Draft an MVP PRD for team task reminders. Prioritize mobile, exclude billing, and output goals, non-goals, user stories, acceptance criteria, and open questions." ``` ### 3. MCP Agent workflow ```text Use $optimize-prompt to optimize this MCP Agent instruction without running tools: "Review the attached Q2 report, create an email draft for the finance team, and do not send it. Preserve every amount and percentage. Output English Markdown." ``` ### 4. Security review ```text Use $optimize-prompt to optimize this security request without executing commands: "Analyze auth.py for authentication weaknesses. Read only; do not modify files, run exploits, expose secrets, or contact external services. Return a risk-ranked report." ``` ## Real-world use cases | Use case | What Optimize Prompt adds | |---|---|
_meta.json
{
"ownerId": "kn77vr23k0jkt48km70rt63jh9840f4n",
"slug": "optimize-prompt",
"version": "0.1.3",
"publishedAt": 1785518041936
}skill-card.md
## Description: Optimizes, compresses, scores, and audits natural-language prompts for LLMs and agent workflows while preserving constraints and avoiding task execution. This skill is ready for commercial/non-commercial use. ## Publisher: [margaretzybgl](https://clawhub.ai/user/margaretzybgl) ### License/Terms of Use: MIT-0 ## Use Case: Developers, prompt engineers, and agent builders use this skill to turn conversational or ambiguous requests into compact downstream-agent prompts with an audit ledger, validation status, and writing-quality feedback. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: Installing with a floating @latest command can pull a version different from the reviewed release. Mitigation: Pin the ClawHub installer and install a specific skill version when using this release. Risk: When integrated with a remote model provider, prompt text may be sent to that provider. Mitigation: Avoid including secrets or sensitive data unless the provider setup is approved for that data. Risk: Prompt rewriting can drop or alter execution-affecting constraints if validation is bypassed. Mitigation: Use the skill's conservative fallback and review optimized_prompt before passing it to downstream tools. ## Reference(s): - [Optimize Prompt on ClawHub](https://clawhub.ai/margaretzybgl/skills/optimize-prompt) - [LLM Prompt Firewall related skill](https://clawhub.ai/margaretzybgl/skills/llm-prompt-firewall) ## Skill Output: **Output Type(s):** [text, JSON, guidance] **Output Format:** [JSON object containing an optimized prompt, audit ledger, validation status, confidence, and prompt-quality feedback.] **Output Parameters:** [1D] **Other Properties Related to Output:** [The optimized_prompt field is the downstream instruction; Prompt IR is audit and debugging context only.] ## Skill Version(s): 0.1.3 (source: ClawHub release evidence) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
agents/openai.yaml
interface: display_name: "Optimize Prompt" short_description: "优化、压缩与审计 AI Prompt · Optimize prompts" default_prompt: "Use $optimize-prompt to safely optimize and score this prompt without executing it."
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/margaretzybgl/skills/optimize-prompt",
"sourceUrl": "https://clawhub.ai/margaretzybgl/skills/optimize-prompt",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T07:35:40.609Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-margaretzybgl-optimize-prompt/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-margaretzybgl-optimize-prompt/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T07:35:40.609Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.1K downloads",
"href": "https://clawhub.ai/margaretzybgl/optimize-prompt",
"sourceUrl": "https://clawhub.ai/margaretzybgl/optimize-prompt",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T07:35:40.609Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "0.1.3",
"href": "https://clawhub.ai/margaretzybgl/optimize-prompt",
"sourceUrl": "https://clawhub.ai/margaretzybgl/optimize-prompt",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-31T17:14:01.936Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-margaretzybgl-optimize-prompt/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-margaretzybgl-optimize-prompt/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 0.1.3",
"description": "补充中英文双语简介并保持现有分类。Added a concise bilingual summary while preserving marketplace categories.",
"href": "https://clawhub.ai/margaretzybgl/optimize-prompt",
"sourceUrl": "https://clawhub.ai/margaretzybgl/optimize-prompt",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-31T17:14:01.936Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
