{"id":"388515e8-a81c-4b53-a128-fa3c215d279f","entityType":"agent","slug":"clawhub-ucsdzehualiu-prompt-optimizer-cn","name":"Prompt Optimizer Cn","canonicalUrl":"https://www.xpersona.co/agent/clawhub-ucsdzehualiu-prompt-optimizer-cn","canonicalPath":"/agent/clawhub-ucsdzehualiu-prompt-optimizer-cn","generatedAt":"2026-10-11T08:43:28.297Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T06:00:28.214Z","emptyReason":null},"description":"实用提示词优化工具 - 检测原提示词缺失要素（角色/步骤/格式/约束），智能补全后输出清晰易懂的优化版，帮助用户的意图更容易被 AI 理解执行。Use when user says 优化提示词 / 改进prompt / 优化一下 / optimize prompt. Skill: Prompt Optimizer Cn Owner: ucsdzehualiu Summary: 实用提示词优化工具 - 检测原提示词缺失要素（角色/步骤/格式/约束），智能补全后输出清晰易懂的优化版，帮助用户的意图更容易被 AI 理解执行。Use when user says 优化提示词 / 改进prompt / 优化一下 / optimize prompt. Tags: latest:2.1.0 Version history: v2.1.0 | 2026-06-22T07:28:00.072Z | user v2.1.0: Fix metadata (ASCII slug prompt-optimizer-cn, trigger routing via description), add version/author, consolidate triggers, add When NOT to use sec","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s17bk47xgrxy45rkmxpwv5p1z983nsd8:prompt-optimizer-cn","sourceUrl":"https://clawhub.ai/ucsdzehualiu/prompt-optimizer-cn","homepage":"https://clawhub.ai/ucsdzehualiu/skills/prompt-optimizer-cn","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/ucsdzehualiu/prompt-optimizer-cn","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/ucsdzehualiu/skills/prompt-optimizer-cn","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":61,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"实用提示词优化工具 - 检测原提示词缺失要素（角色/步骤/格式/约束），智能补全后输出清晰易懂的优化版，帮助用户的意图更容易被 AI 理解执行。Use when user says 优化提示词 / 改进prompt / 优化一下 / optimize prompt. Skill: Prompt Optimizer Cn"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T06:00:28.214Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T06:00:28.214Z","emptyReason":null},"stars":null,"forks":null,"downloads":1139,"packageName":null,"latestVersion":"2.1.0","tractionLabel":"1.1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T06:00:28.148Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T06:00:28.214Z","lastCrawledAt":"2026-10-11T06:00:28.148Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T06:00:28.148Z","lastVerifiedAt":null,"highlights":[{"version":"2.1.0","createdAt":"2026-06-22T07:28:00.072Z","changelog":"v2.1.0: Fix metadata (ASCII slug prompt-optimizer-cn, trigger routing via description), add version/author, consolidate triggers, add When NOT to use section","fileCount":5,"zipByteSize":7438},{"version":"2.0.0","createdAt":"2026-06-14T16:37:15.753Z","changelog":"v2.0.0 重大重构：从学术方法论改为实用版 - 移除论文引用（CO-STAR/ACON/APE 等），聚焦实用 - 改用简单 RTCF 框架（角色/任务/上下文/格式） - 新增 5 个真实前后对比示例（中英文各类场景） - 优化为「诊断→补全→输出→反馈」工作流程 - 帮助用户的 prompt 更容易被 AI 理解执行","fileCount":4,"zipByteSize":6832},{"version":"1.0.1","createdAt":"2026-06-14T15:24:10.434Z","changelog":"v1.0.1: 整合 CO-STAR / Chain-of-Thought / ACON / APE / Self-Refine 五种方法论；自动检测输入语言（中/英）并以同语言回复；新增独立测试脚本（10/10 pass）","fileCount":4,"zipByteSize":5751},{"version":"1.0.0","createdAt":"2026-04-16T02:49:35.226Z","changelog":"- 首个版本发布，基于ACON和APE论文提出的两阶段迭代提示词优化流程。 - 支持解析并锁定用户任务意图，提取并全程保留关键信号。 - 结合APE机制，多风格并行生成候选指令，自动评分选优，并严格验证信号完整性。 - 引入阶段化冗余压缩，支持λ参数灵活控制压缩率，兼顾效果与长度。 - 优化结果输出后主动收集用户反馈，支持多轮迭代直至满意。 - 仅在用户明确请求时触发，严格限制自动执行。","fileCount":3,"zipByteSize":3738}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17bk47xgrxy45rkmxpwv5p1z983nsd8:prompt-optimizer-cn","setupComplexity":"low","setupSteps":["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":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-ucsdzehualiu-prompt-optimizer-cn/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-ucsdzehualiu-prompt-optimizer-cn/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-ucsdzehualiu-prompt-optimizer-cn/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-ucsdzehualiu-prompt-optimizer-cn/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-ucsdzehualiu-prompt-optimizer-cn/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-ucsdzehualiu-prompt-optimizer-cn/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T08:43:28.296Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-ucsdzehualiu-prompt-optimizer-cn/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-ucsdzehualiu-prompt-optimizer-cn/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-ucsdzehualiu-prompt-optimizer-cn/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-ucsdzehualiu-prompt-optimizer-cn/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T06:00:28.214Z","emptyReason":null},"readme":"Skill: Prompt Optimizer Cn\n\nOwner: ucsdzehualiu\n\nSummary: 实用提示词优化工具 - 检测原提示词缺失要素（角色/步骤/格式/约束），智能补全后输出清晰易懂的优化版，帮助用户的意图更容易被 AI 理解执行。Use when user says 优化提示词 / 改进prompt / 优化一下 / optimize prompt.\n\nTags: latest:2.1.0\n\nVersion history:\n\nv2.1.0 | 2026-06-22T07:28:00.072Z | user\n\nv2.1.0: Fix metadata (ASCII slug prompt-optimizer-cn, trigger routing via description), add version/author, consolidate triggers, add When NOT to use section\n\nv2.0.0 | 2026-06-14T16:37:15.753Z | user\n\nv2.0.0 重大重构：从学术方法论改为实用版\n\n- 移除论文引用（CO-STAR/ACON/APE 等），聚焦实用\n- 改用简单 RTCF 框架（角色/任务/上下文/格式）\n- 新增 5 个真实前后对比示例（中英文各类场景）\n- 优化为「诊断→补全→输出→反馈」工作流程\n- 帮助用户的 prompt 更容易被 AI 理解执行\n\nv1.0.1 | 2026-06-14T15:24:10.434Z | user\n\nv1.0.1: 整合 CO-STAR / Chain-of-Thought / ACON / APE / Self-Refine 五种方法论；自动检测输入语言（中/英）并以同语言回复；新增独立测试脚本（10/10 pass）\n\nv1.0.0 | 2026-04-16T02:49:35.226Z | user\n\n- 首个版本发布，基于ACON和APE论文提出的两阶段迭代提示词优化流程。\n- 支持解析并锁定用户任务意图，提取并全程保留关键信号。\n- 结合APE机制，多风格并行生成候选指令，自动评分选优，并严格验证信号完整性。\n- 引入阶段化冗余压缩，支持λ参数灵活控制压缩率，兼顾效果与长度。\n- 优化结果输出后主动收集用户反馈，支持多轮迭代直至满意。\n- 仅在用户明确请求时触发，严格限制自动执行。\n\nArchive index:\n\nArchive v2.1.0: 5 files, 7438 bytes\n\nFiles: LICENSE (1076b), skill-card.md (1676b), SKILL.md (8305b), tests/test.sh (2701b), _meta.json (138b)\n\nFile v2.1.0:SKILL.md\n\n---\nname: prompt-optimizer-cn\ndescription: 实用提示词优化工具 - 检测原提示词缺失要素（角色/步骤/格式/约束），智能补全后输出清晰易懂的优化版，帮助用户的意图更容易被 AI 理解执行。Use when user says 优化提示词 / 改进prompt / 优化一下 / optimize prompt.\nversion: 2.1.0\nauthor: prompt-optimizer-cn\ntags:\n  - prompt-optimization\n  - prompt-engineering\n---\n\n> **Language**: 自动检测输入语言并用相同语言回复（中文输入→中文回复，English input→English reply）\n\n## 这个工具做什么\n\n帮你把**模糊、简陋的 prompt** 改成**清晰、AI 容易理解执行的版本**。\n\n**核心流程**（5 步）：\n1. **诊断**：分析原 prompt 缺什么（角色？步骤？输出格式？约束？）\n2. **补全**：按需补上缺失要素（不需要的不强加）\n3. **输出**：优化后的 prompt（代码块包裹，方便复制）+ 一行说明改了什么\n4. **收集反馈**：询问用户是否满意\n5. **迭代**：根据反馈调整直到满意\n\n## 实用框架（RTCF）\n\n补全时参考这 4 个维度（不是每个都必须有，按需补）：\n\n- **R (Role)**: 角色 —— \"你是XX专家\"，让 AI 进入专业状态\n- **T (Task)**: 任务 —— 明确要做什么，避免歧义\n- **C (Context)**: 上下文 —— 背景、约束、边界条件\n- **F (Format)**: 格式 —— 输出结构（表格/分步骤/代码块/JSON）\n\n## 真实示例（前后对比）\n\n### 示例 1：模糊任务 → 明确角色+格式\n\n**优化前**：\n```\n帮我写一篇文章\n```\n\n**优化后**：\n```\n你是一位资深科技博客作者，擅长用通俗语言解释技术概念。\n\n请撰写一篇 800 字的技术博客文章，主题：[请用户补充主题]\n\n文章结构：\n1. 引人入胜的开头（100字）\n2. 核心概念解释（400字，用类比/示例）\n3. 实际应用场景（200字）\n4. 总结（100字）\n\n目标读者：对技术感兴趣但非专业开发者\n```\n\n**改了什么**：补充角色定义、明确字数、拆解结构、指定受众\n\n---\n\n### 示例 2：单句指令 → 分步骤+约束\n\n**优化前**：\n```\n分析这份数据\n```\n\n**优化后**：\n```\n请对提供的数据进行分析，按以下步骤进行：\n\n1. **数据概览**：数据量、字段类型、缺失值情况\n2. **关键指标**：计算均值、中位数、异常值\n3. **趋势发现**：找出 3 个最显著的趋势或异常\n4. **结论**：用 2-3 句话总结核心发现\n\n输出格式：Markdown 表格 + 文字说明\n约束：如果数据有明显错误（如负数年龄），先指出再分析\n```\n\n**改了什么**：拆分步骤、增加输出格式、加约束条件\n\n---\n\n### 示例 3：技术任务 → 加角色+示例\n\n**优化前**：\n```\n写个 Python 函数计算斐波那契数列\n```\n\n**优化后**：\n```\n你是一位 Python 专家，注重代码可读性和性能。\n\n请编写一个 Python 函数 `fibonacci(n)`，计算斐波那契数列的第 n 项。\n\n要求：\n- 使用迭代而非递归（性能考虑）\n- 加 docstring 说明参数和返回值\n- 处理边界情况（n <= 0）\n- 加 3 个测试用例\n\n示例输出格式（使用缩进代替内部代码块）：\n\n    def fibonacci(n: int) -> int:\n        \"\"\"计算斐波那契数列第 n 项\n        \n        Args:\n            n: 正整数，目标项数\n        Returns:\n            第 n 项的值\n        \"\"\"\n        # 实现...\n\n```\n\n**改了什么**：补角色、明确实现方式、加边界处理要求、给输出示例\n\n---\n\n### 示例 4：创意任务 → 加风格+受众\n\n**优化前**：\n```\n给我的产品写个宣传语\n```\n\n**优化后**：\n```\n你是资深广告文案，擅长洞察用户痛点并用简短有力的语言打动人心。\n\n请为产品\"[产品名]\"创作 3 条宣传语，每条不超过 15 字。\n\n产品特点：[请用户补充，如\"AI驱动的日程管理工具\"]\n目标用户：[请用户补充，如\"忙碌的职场人士\"]\n\n风格要求：\n- 直击痛点，避免空洞形容词\n- 口语化，易记\n- 突出核心价值而非功能堆砌\n\n输出格式：\n1. [宣传语] —— [一句话说明为什么这样写]\n2. [宣传语] —— [理由]\n3. [宣传语] —— [理由]\n```\n\n**改了什么**：补角色、要求明确产品信息、定义风格、要求给出理由\n\n---\n\n### 示例 5：英文示例\n\n**Before**:\n```\nExplain quantum computing\n```\n\n**After**:\n```\nYou are a physics educator skilled at explaining complex concepts to non-experts using everyday analogies.\n\nPlease explain quantum computing in simple terms.\n\nStructure:\n1. What it is (50 words, use an analogy)\n2. How it differs from classical computing (100 words)\n3. One real-world application (50 words)\n\nAudience: College students with no physics background\nConstraints: Avoid jargon like \"superposition\" unless you explain it first\n```\n\n**What changed**: Added role, structure, audience, jargon constraint\n\n---\n\n## 工作流程\n\n### Step 1: 诊断原 prompt（内部判断，不告诉用户）\n\n- 缺角色定义？（\"你是XX专家\"）\n- 任务模糊？（\"帮我做XX\" → 做什么具体的？）\n- 缺输出格式？（表格？分步？代码块？）\n- 有歧义？（一句话有多种理解）\n- 缺约束/边界？（什么不该做？边界情况怎么处理？）\n\n### Step 2: 按需补全\n\n**原则**：\n- ✅ 按需补充（不是每个都要有）\n- ✅ 保留原始意图\n- ✅ 不改变用户想要的核心内容\n- ❌ 不过度工程化（简单任务不要搞复杂）\n\n### Step 3: 输出\n\n**格式**：\n```\n优化后的 prompt（代码块包裹，方便复制）\n```\n\n**说明**（一行）：改了什么（补了角色/拆了步骤/加了格式/加了约束）\n\n### Step 4: 收集反馈\n\n输出后询问：\n\n> 是否满意？如需调整（太复杂了/缺了XX/格式不对/其他），告诉我，我继续改。\n>\n> *(English)* Satisfied? Let me know if any adjustments needed.\n\n### Step 5: 迭代（如果用户反馈）\n\n根据反馈调整：\n- 太复杂 → 简化，只保留核心\n- 缺了XX → 补上\n- 格式不对 → 改格式\n- 效果不好 → 加更多约束/示例\n\n重复直到满意。\n\n---\n\n## 约束规则\n\n### ✅ 必须做\n\n1. **保留原意**：不改变用户的核心意图\n2. **双语**：中文输入用中文回，英文输入用英文回\n3. **代码块输出**：优化后的 prompt 用代码块包裹\n4. **简洁说明**：用一行说改了什么，不写长篇大论\n5. **主动反馈**：输出后问用户是否满意\n\n### ❌ 禁止做\n\n1. **不自动触发**：只在用户明确说\"优化提示词\"时工作\n2. **不过度设计**：简单任务不要搞成 10 步流程\n3. **不讲理论**：不提论文方法名/学术框架（用户不关心）\n4. **不输出多版本**：不生成\"方案A/方案B/方案C\"（用户要的是直接可用的）\n5. **不评价原 prompt**：不说\"你的 prompt 太差了\"（直接给优化版）\n\n---\n\n## 适用场景\n\n| 原 prompt 类型 | 优化重点 | 典型补充 |\n|---------------|---------|---------|\n| 单句模糊指令 | 拆步骤 + 加格式 | \"分析这个\" → 分 5 步 + 表格输出 |\n| 缺角色的技术任务 | 补角色 + 约束 | \"写代码\" → \"你是Python专家\" + 性能要求 |\n| 创意类任务 | 补风格 + 受众 | \"写文案\" → 风格活泼 + 目标用户是学生 |\n| 复杂分析任务 | 拆步骤 + 边界 | \"研究XX\" → 分步骤 + \"如果数据缺失怎么办\" |\n| 已经很清晰的 | 微调或不改 | 如果已经很好，说\"已经很清晰，建议不改\" |\n\n---\n\n## 何时不应使用\n\n**不要在以下情况触发此技能**：\n\n1. **用户正在正常对话**：不是在讨论或请求优化 prompt\n2. **用户在执行其他任务**：如写代码、分析数据、回答问题等\n3. **prompt 已经很完善**：有清晰的角色、步骤、格式和约束\n4. **用户只是随口提到 \"prompt\" 这个词**：而非明确要求优化\n\n---\n\n## 使用说明\n\n**输入**：\n- 直接粘贴原 prompt\n- 或描述想做什么，让工具从零写一个\n\n**输出**：\n- 优化后的 prompt（代码块）\n- 一行说明改了什么\n- 询问是否需要继续调整\n\n---\n\n## 提示\n\n如果原 prompt 已经很完善（有角色、有步骤、有格式、有约束），工具会告诉你\"已经很清晰，无需优化\"或仅做微调。\n\nFile v2.1.0:_meta.json\n\n{\n  \"ownerId\": \"kn7ecgbzbya89gesghbv1kty9d82r8e4\",\n  \"slug\": \"prompt-optimizer-cn\",\n  \"version\": \"2.1.0\",\n  \"publishedAt\": 1782113280072\n}\n\nFile v2.1.0:skill-card.md\n\n## Description:\n\nPrompt Optimizer Cn helps agents rewrite vague prompts into clearer, ready-to-use prompts by diagnosing missing role, task, context, format, and constraints.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[ucsdzehualiu](https://clawhub.ai/user/ucsdzehualiu)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nAgent users and prompt engineers use this skill to turn unclear Chinese or English prompts into structured, executable prompts while preserving the user's original intent.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Broad trigger wording could activate prompt optimization when the user intended a different task.\n\nMitigation: Use the skill only for explicit prompt optimization requests and preserve the user's original intent when rewriting.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/ucsdzehualiu/skills/prompt-optimizer-cn)\n- [ClawHub Publisher Profile](https://clawhub.ai/user/ucsdzehualiu)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, guidance]\n\n**Output Format:** [Markdown with a fenced optimized prompt, a one-line change summary, and a follow-up question.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Matches the user's input language and preserves the original prompt intent.]\n\n## Skill Version(s):\n\n2.1.0 (source: frontmatter and server release metadata)\n\n## Ethical Considerations:\n\nUsers 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.\n\nFile v2.1.0:LICENSE\n\nMIT License\n\nCopyright (c) 2026 prompt-optimizer-cn\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nArchive v2.0.0: 4 files, 6832 bytes\n\nFiles: skill-card.md (2046b), SKILL.md (7893b), tests/test.sh (2701b), _meta.json (138b)\n\nFile v2.0.0:SKILL.md\n\n---\nname: prompt优化器\ndescription: 实用提示词优化工具 - 检测原提示词缺失要素（角色/步骤/格式/约束），智能补全后输出清晰易懂的优化版，帮助用户的意图更容易被 AI 理解执行\nusage: 当用户说\"优化提示词\"、\"改进prompt\"、\"优化一下\"、\"optimize prompt\"时触发\nlicense: MIT\ntags:\n  - prompt-optimization\n  - prompt-engineering\n---\n\n> **Language**: 自动检测输入语言并用相同语言回复（中文输入→中文回复，English input→English reply）\n\n## 这个工具做什么\n\n帮你把**模糊、简陋的 prompt** 改成**清晰、AI 容易理解执行的版本**。\n\n**核心流程**（3 步）：\n1. **诊断**：分析原 prompt 缺什么（角色？步骤？输出格式？约束？）\n2. **补全**：按需补上缺失要素（不需要的不强加）\n3. **输出**：优化后的 prompt（代码块包裹，方便复制）+ 一行说明改了什么\n\n## 实用框架（RTCF）\n\n补全时参考这 4 个维度（不是每个都必须有，按需补）：\n\n- **R (Role)**: 角色 —— \"你是XX专家\"，让 AI 进入专业状态\n- **T (Task)**: 任务 —— 明确要做什么，避免歧义\n- **C (Context)**: 上下文 —— 背景、约束、边界条件\n- **F (Format)**: 格式 —— 输出结构（表格/分步骤/代码块/JSON）\n\n## 真实示例（前后对比）\n\n### 示例 1：模糊任务 → 明确角色+格式\n\n**优化前**：\n```\n帮我写一篇文章\n```\n\n**优化后**：\n```\n你是一位资深科技博客作者，擅长用通俗语言解释技术概念。\n\n请撰写一篇 800 字的技术博客文章，主题：[请用户补充主题]\n\n文章结构：\n1. 引人入胜的开头（100字）\n2. 核心概念解释（400字，用类比/示例）\n3. 实际应用场景（200字）\n4. 总结（100字）\n\n目标读者：对技术感兴趣但非专业开发者\n```\n\n**改了什么**：补充角色定义、明确字数、拆解结构、指定受众\n\n---\n\n### 示例 2：单句指令 → 分步骤+约束\n\n**优化前**：\n```\n分析这份数据\n```\n\n**优化后**：\n```\n请对提供的数据进行分析，按以下步骤进行：\n\n1. **数据概览**：数据量、字段类型、缺失值情况\n2. **关键指标**：计算均值、中位数、异常值\n3. **趋势发现**：找出 3 个最显著的趋势或异常\n4. **结论**：用 2-3 句话总结核心发现\n\n输出格式：Markdown 表格 + 文字说明\n约束：如果数据有明显错误（如负数年龄），先指出再分析\n```\n\n**改了什么**：拆分步骤、增加输出格式、加约束条件\n\n---\n\n### 示例 3：技术任务 → 加角色+示例\n\n**优化前**：\n```\n写个 Python 函数计算斐波那契数列\n```\n\n**优化后**：\n```\n你是一位 Python 专家，注重代码可读性和性能。\n\n请编写一个 Python 函数 `fibonacci(n)`，计算斐波那契数列的第 n 项。\n\n要求：\n- 使用迭代而非递归（性能考虑）\n- 加 docstring 说明参数和返回值\n- 处理边界情况（n <= 0）\n- 加 3 个测试用例\n\n示例输出格式：\n\\`\\`\\`python\ndef fibonacci(n: int) -> int:\n    \"\"\"计算斐波那契数列第 n 项\n    \n    Args:\n        n: 正整数，目标项数\n    Returns:\n        第 n 项的值\n    \"\"\"\n    # 实现...\n\\`\\`\\`\n```\n\n**改了什么**：补角色、明确实现方式、加边界处理要求、给输出示例\n\n---\n\n### 示例 4：创意任务 → 加风格+受众\n\n**优化前**：\n```\n给我的产品写个宣传语\n```\n\n**优化后**：\n```\n你是资深广告文案，擅长洞察用户痛点并用简短有力的语言打动人心。\n\n请为产品\"[产品名]\"创作 3 条宣传语，每条不超过 15 字。\n\n产品特点：[请用户补充，如\"AI驱动的日程管理工具\"]\n目标用户：[请用户补充，如\"忙碌的职场人士\"]\n\n风格要求：\n- 直击痛点，避免空洞形容词\n- 口语化，易记\n- 突出核心价值而非功能堆砌\n\n输出格式：\n1. [宣传语] —— [一句话说明为什么这样写]\n2. [宣传语] —— [理由]\n3. [宣传语] —— [理由]\n```\n\n**改了什么**：补角色、要求明确产品信息、定义风格、要求给出理由\n\n---\n\n### 示例 5：英文示例\n\n**Before**:\n```\nExplain quantum computing\n```\n\n**After**:\n```\nYou are a physics educator skilled at explaining complex concepts to non-experts using everyday analogies.\n\nPlease explain quantum computing in simple terms.\n\nStructure:\n1. What it is (50 words, use an analogy)\n2. How it differs from classical computing (100 words)\n3. One real-world application (50 words)\n\nAudience: College students with no physics background\nConstraints: Avoid jargon like \"superposition\" unless you explain it first\n```\n\n**What changed**: Added role, structure, audience, jargon constraint\n\n---\n\n## 工作流程\n\n### Step 1: 诊断原 prompt（内部判断，不告诉用户）\n\n- 缺角色定义？（\"你是XX专家\"）\n- 任务模糊？（\"帮我做XX\" → 做什么具体的？）\n- 缺输出格式？（表格？分步？代码块？）\n- 有歧义？（一句话有多种理解）\n- 缺约束/边界？（什么不该做？边界情况怎么处理？）\n\n### Step 2: 按需补全\n\n**原则**：\n- ✅ 按需补充（不是每个都要有）\n- ✅ 保留原始意图\n- ✅ 不改变用户想要的核心内容\n- ❌ 不过度工程化（简单任务不要搞复杂）\n\n### Step 3: 输出\n\n**格式**：\n```\n优化后的 prompt（代码块包裹，方便复制）\n```\n\n**说明**（一行）：改了什么（补了角色/拆了步骤/加了格式/加了约束）\n\n### Step 4: 收集反馈\n\n输出后询问：\n\n> 是否满意？如需调整（太复杂了/缺了XX/格式不对/其他），告诉我，我继续改。\n>\n> *(English)* Satisfied? Let me know if any adjustments needed.\n\n### Step 5: 迭代（如果用户反馈）\n\n根据反馈调整：\n- 太复杂 → 简化，只保留核心\n- 缺了XX → 补上\n- 格式不对 → 改格式\n- 效果不好 → 加更多约束/示例\n\n重复直到满意。\n\n---\n\n## 约束规则\n\n### ✅ 必须做\n\n1. **保留原意**：不改变用户的核心意图\n2. **双语**：中文输入用中文回，英文输入用英文回\n3. **代码块输出**：优化后的 prompt 用代码块包裹\n4. **简洁说明**：用一行说改了什么，不写长篇大论\n5. **主动反馈**：输出后问用户是否满意\n\n### ❌ 禁止做\n\n1. **不自动触发**：只在用户明确说\"优化提示词\"时工作\n2. **不过度设计**：简单任务不要搞成 10 步流程\n3. **不讲理论**：不提论文方法名/学术框架（用户不关心）\n4. **不输出多版本**：不生成\"方案A/方案B/方案C\"（用户要的是直接可用的）\n5. **不评价原 prompt**：不说\"你的 prompt 太差了\"（直接给优化版）\n\n---\n\n## 适用场景\n\n| 原 prompt 类型 | 优化重点 | 典型补充 |\n|---------------|---------|---------|\n| 单句模糊指令 | 拆步骤 + 加格式 | \"分析这个\" → 分 5 步 + 表格输出 |\n| 缺角色的技术任务 | 补角色 + 约束 | \"写代码\" → \"你是Python专家\" + 性能要求 |\n| 创意类任务 | 补风格 + 受众 | \"写文案\" → 风格活泼 + 目标用户是学生 |\n| 复杂分析任务 | 拆步骤 + 边界 | \"研究XX\" → 分步骤 + \"如果数据缺失怎么办\" |\n| 已经很清晰的 | 微调或不改 | 如果已经很好，说\"已经很清晰，建议不改\" |\n\n---\n\n## 使用说明\n\n**触发方式**：\n- \"优化一下这个 prompt\"\n- \"帮我改进这个提示词\"\n- \"这个 prompt 怎么写更好\"\n- \"Optimize this prompt\"\n\n**输入**：\n- 直接粘贴原 prompt\n- 或描述想做什么，让工具从零写一个\n\n**输出**：\n- 优化后的 prompt（代码块）\n- 一行说明改了什么\n- 询问是否需要继续调整\n\n---\n\n**提示**：如果原 prompt 已经很完善（有角色、有步骤、有格式、有约束），工具会告诉你\"已经很清晰，无需优化\"或仅做微调。\n\nFile v2.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7ecgbzbya89gesghbv1kty9d82r8e4\",\n  \"slug\": \"prompt-optimizer-cn\",\n  \"version\": \"2.0.0\",\n  \"publishedAt\": 1781455035753\n}\n\nFile v2.0.0:skill-card.md\n\n## Description: <br>\n实用提示词优化工具 - 检测原提示词缺失要素（角色/步骤/格式/约束），智能补全后输出清晰易懂的优化版，帮助用户的意图更容易被 AI 理解执行 <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[ucsdzehualiu](https://clawhub.ai/user/ucsdzehualiu) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to rewrite vague prompts into clearer prompts with role, task, context, format, and constraint details while preserving the original intent. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The broad activation phrase \"优化一下\" may rewrite text when the user intended a different kind of optimization. <br>\nMitigation: Invoke the skill intentionally for prompt text and review the rewritten prompt before using it downstream. <br>\nRisk: Prompt rewriting may add structure or constraints that do not match the user's intended scope. <br>\nMitigation: Check that the optimized prompt preserves the original intent and request a simpler or corrected version when needed. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/ucsdzehualiu/prompt-optimizer-cn) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, guidance] <br>\n**Output Format:** [Markdown with the optimized prompt in a code block, a one-line change summary, and a feedback question.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Responds in the same language as the input and supports iterative revision when the user asks for adjustments.] <br>\n\n## Skill Version(s): <br>\n2.0.0 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers 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. <br>\n\nArchive v1.0.1: 4 files, 5751 bytes\n\nFiles: skill-card.md (1852b), SKILL.md (5996b), tests/test.sh (2281b), _meta.json (138b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: prompt优化器\ndescription: 基于 CO-STAR、Chain-of-Thought、ACON、APE 等方法论的提示词优化工具，自动检测输入语言并用相同语言回复，支持多轮迭代优化\nusage: 仅当用户明确说\"优化提示词\"、\"改进prompt\"、\"optimize prompt\"时触发\nlicense: MIT\ntags:\n  - prompt-optimization\n  - co-star\n  - chain-of-thought\n  - acon\n  - ape\n---\n\n> **Language**: Auto-detect input language and respond in the same language (Chinese → Chinese, English → English).\n\n## 优化方法论\n\n本工具综合以下业界公认的提示词优化框架：\n\n### 1. CO-STAR 框架\n\nCO-STAR 是一个结构化提示词框架，确保提示词包含所有关键要素：\n\n- **C (Context)**: 背景信息 - 提供任务的上下文\n- **O (Objective)**: 目标 - 明确要完成什么\n- **S (Style)**: 风格 - 指定输出的语气和风格\n- **T (Tone)**: 语气 - 设定回复的情感色彩\n- **A (Audience)**: 受众 - 说明目标读者是谁\n- **R (Response)**: 响应格式 - 定义期望的输出结构\n\n**应用场景**: 从零开始构建新提示词，或重构模糊不清的提示词\n\n### 2. Chain-of-Thought (CoT)\n\n思维链提示技术，引导 AI 逐步推理：\n\n- **基础 CoT**: 在提示词中添加\"让我们一步步思考\"\n- **Few-Shot CoT**: 提供带推理过程的示例\n- **Zero-Shot CoT**: 无需示例，直接触发推理\n\n**应用场景**: 复杂推理任务、数学问题、多步骤分析\n\n### 3. ACON 两阶段优化\n\n基于 arXiv:2510.00615 论文：\n\n**阶段1 - 关键信号提取**:\n- 角色定义 (Role)\n- 任务目标 (Task)\n- 约束条件 (Constraints)  \n- 输出格式 (Format)\n- 成功标准 (Success Criteria)\n\n**阶段2 - 选择性压缩**:\n- 只删除冗余，保留所有关键信号\n- 根据 λ 参数控制压缩程度（0.2-0.8）\n- 功能等价性验证\n\n**应用场景**: 长提示词压缩，在保持效果的前提下降低 token 成本\n\n### 4. APE 自动提示工程\n\n基于 arXiv:2211.01910 论文：\n\n- 生成多个候选提示词（不同风格）\n- 按清晰度、完整性、有效性打分\n- 选择最优候选\n\n**应用场景**: 探索多种表达方式，找到最有效的提示词\n\n### 5. Self-Refine 自我优化\n\n迭代优化循环：\n\n1. 生成初始输出\n2. 自我评估找出不足\n3. 基于反馈改进\n4. 重复直到满意\n\n**应用场景**: 需要多轮打磨的创意内容、技术文档\n\n---\n\n## 使用方式\n\n### 标准优化流程\n\n当用户提供原始提示词时，执行以下步骤：\n\n**Step 1: 意图识别**\n- 分析提示词类型（知识查询/创意生成/代码任务/分析任务）\n- 识别当前缺失的要素\n- 判断是否需要压缩（token 数 > 1000）\n\n**Step 2: 选择优化策略**\n- 结构缺失 → 应用 CO-STAR 框架\n- 需要推理 → 引入 Chain-of-Thought\n- 提示词过长 → 应用 ACON 压缩\n- 效果不确定 → 尝试 APE 生成候选\n\n**Step 3: 生成优化版本**\n- 保留原始意图和所有关键信号\n- 补充缺失要素\n- 优化表达清晰度\n- 输出用代码块包裹，方便复制\n\n**Step 4: 主动收集反馈**\n\n输出优化后，询问用户：\n\n> 已完成优化。是否满意？如有不满意（效果不够好/还是太长/某些要求没保留/其他），请告诉我，我会继续迭代。\n>\n> *(English)* Optimization complete. Satisfied? Let me know if anything needs adjustment and I'll iterate.\n\n**Step 5: 迭代优化**\n\n根据用户反馈调整：\n- 效果不好 → 补充更多约束和示例\n- 还是太长 → 增加压缩力度（提高 λ）\n- 内容缺失 → 补回关键信号\n- 其他要求 → 针对性调整\n\n重复直到用户满意。\n\n---\n\n## 优化原则\n\n### ✅ 必须遵守\n\n1. **保留所有关键信号**: 角色、目标、约束、格式、示例、变量占位符\n2. **功能等价**: 优化后的提示词必须产生与原提示词相同质量的输出\n3. **先效用后压缩**: 优先提升清晰度和完整性，再考虑压缩\n4. **验证每一步**: 每次修改后验证关键信号是否完整\n\n### ❌ 禁止操作\n\n1. **不自动触发**: 只在用户明确要求时工作\n2. **不删除关键信号**: 角色定义、约束条件、输出格式等永不删除\n3. **不主观评价**: 基于框架方法论，不凭主观印象\n4. **不输出对比分析**: 只输出优化结果，除非用户要求\n\n---\n\n## 方法论选择指南\n\n| 场景 | 推荐方法 | 原因 |\n|------|---------|------|\n| 模糊的单句提示词 | CO-STAR | 补全结构化要素 |\n| 数学/逻辑推理任务 | Chain-of-Thought | 引导逐步推理 |\n| 长提示词（>1000 token） | ACON | 压缩冗余，保留核心 |\n| 不确定最佳表达 | APE | 生成多个候选，选优 |\n| 创意内容打磨 | Self-Refine | 多轮迭代改进 |\n| 结构完整但表达冗余 | ACON 压缩 | 精简表达，保持功能 |\n\n---\n\n## 示例\n\n### 优化前\n```\n帮我写一篇文章\n```\n\n### 优化后（应用 CO-STAR）\n```\n**Context**: 你是一位资深科技博客作者，擅长用通俗易懂的语言解释复杂技术概念\n\n**Objective**: 撰写一篇 800-1000 字的技术博客文章\n\n**Style**: 专业但不失亲和力，适合技术爱好者阅读\n\n**Tone**: 友好、启发性、充满洞察\n\n**Audience**: 对技术感兴趣但非专业开发者的读者\n\n**Response**: 文章结构应包含：\n1. 引人入胜的开头（100字）\n2. 核心概念解释（400字）\n3. 实际应用案例（300字）\n4. 总结与展望（200字）\n```\n\n---\n\n## 参考文献\n\n- CO-STAR Framework: Prompt engineering best practices (2024)\n- Chain-of-Thought Prompting: arXiv:2201.11903 (2022)\n- ACON: Prompt Compression via Acrostic: arXiv:2510.00615 (2024)\n- APE: Automatic Prompt Engineer: arXiv:2211.01910 (2022)\n- Self-Refine: Iterative Refinement with Self-Feedback: arXiv:2303.17651 (2023)\n\n---\n\n## 使用约束\n\n- 仅在用户明确请求时触发\n- 输出简洁，不做冗长解释\n- 每轮优化后主动收集反馈\n- 支持多轮迭代直到满意\n- 自动检测语言并匹配回复语言\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7ecgbzbya89gesghbv1kty9d82r8e4\",\n  \"slug\": \"prompt-optimizer-cn\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1781450650434\n}\n\nFile v1.0.1:skill-card.md\n\n## Description: <br>\n基于 CO-STAR、Chain-of-Thought、ACON、APE 等方法论的提示词优化工具，自动检测输入语言并用相同语言回复，支持多轮迭代优化 <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[ucsdzehualiu](https://clawhub.ai/user/ucsdzehualiu) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers, prompt authors, and agent users can use this skill to rewrite explicit prompt-optimization requests into clearer, better structured Chinese or English prompts while preserving key intent, constraints, format requirements, and examples. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Optimized prompts may preserve private or sensitive details from the original prompt. <br>\nMitigation: Review optimized prompts before reuse and avoid including sensitive information unless it is appropriate for the target agent or workflow. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/ucsdzehualiu/prompt-optimizer-cn) <br>\n- [Publisher profile](https://clawhub.ai/user/ucsdzehualiu) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, guidance] <br>\n**Output Format:** [Markdown prompt text, often in code blocks, with brief follow-up feedback prompts] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Automatically matches the user's input language and supports iterative refinement.] <br>\n\n## Skill Version(s): <br>\n1.0.1 (source: ClawHub release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers 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. <br>\n\nArchive v1.0.0: 3 files, 3738 bytes\n\nFiles: skill-card.md (2031b), SKILL.md (4756b), _meta.json (138b)\n\nFile v1.0.0:SKILL.md\n\n---\r\nname: prompt优化器\r\ndescription: 复杂任务专用迭代式提示词优化器。严格执行ACON论文的两阶段迭代优化+APE自动提示工程，仅在用户明确要求时触发，优化完主动收集反馈，支持多轮迭代直到满意。\r\nusage: 仅当用户明确说\"优化提示词\"、\"改进prompt\"、\"精炼指令\"时触发，绝不自动触发。\r\nlicense: MIT\r\ntags:\r\n  - prompt-optimization\r\n  - acon\r\n  - ape\r\n  - 迭代优化\r\n  - 复杂任务\r\n---\r\n\r\n\r\n### 阶段1：输入解析与关键信号提取（ACON论文3）\r\n**输入**：用户的原始提示词\r\n**操作**：\r\n1. 意图锁定：提取核心任务目标T，确保后续所有优化都不偏离T\r\n2. 关键信号提取（ACON论文定义的必须保留信号）：\r\n   - ✅ 角色设定R：用户指定的专家角色\r\n   - ✅ 任务目标T：核心要做什么\r\n   - ✅ 约束条件C：边界规则、禁止事项\r\n   - ✅ 输出格式F：用户要求的输出结构、格式\r\n   - ✅ 变量占位符V：所有`{{变量名}}`\r\n   - ✅ 示例E：用户提供的few-shot示例\r\n   - ✅ 工具规则U：工具调用的时机和方式\r\n   - ✅ 成功标准S：什么是好的输出\r\n3. 基线测量：记录原始提示词的token长度L₀\r\n\r\n---\r\n\r\n### 阶段2：APE 效用增强\r\n**目标**：把模糊的提示词变成专家级指令，提升效用\r\n**操作（严格顺序）**：\r\n1. 候选生成：基于原始提示词，生成5个不同风格的候选指令\r\n   - 候选1：结构化指令版\r\n   - 候选2：专家角色版\r\n   - 候选3：约束强化版\r\n   - 候选4：格式明确版\r\n   - 候选5：逻辑优化版\r\n2. 候选打分（APE论文的打分机制）：\r\n   - 清晰度：指令是否明确无歧义（0-10分）\r\n   - 完整性：是否包含所有关键信号（0-10分）\r\n   - 有效性：能否引导模型产生高质量输出（0-10分）\r\n3. 最优选择：选择总分最高的候选，作为效用增强后的版本P₁\r\n4. 验证：检查P₁是否100%保留了所有关键信号，没有改变原始意图\r\n\r\n---\r\n\r\n### 阶段3：ACON 压缩优化（ACON论文3.3节 两阶段优化）\r\n**目标**：在不破坏功能的前提下，压缩token长度\r\n**操作（严格顺序，先效用后压缩）**：\r\n1. 冗余分析：分析P₁中的冗余内容\r\n   - 重复的指令和要求\r\n   - 废话、套话、无效表述\r\n   - 可以精简的冗长表达\r\n2. 选择性压缩：\r\n   - 只删除冗余，绝不删除关键信号\r\n   - 合并重复的内容\r\n   - 用更简洁的语言重写，保持语义不变\r\n3. 功能等价性验证：\r\n   - 确保压缩后的P₂，功能与P₁完全一致\r\n   - 确保所有关键信号都完整保留\r\n   - 确保没有改变原始任务目标\r\n4. 长度控制：根据当前的λ参数（性能-成本权衡）调整压缩程度\r\n   - 默认λ=0.5：平衡模式\r\n   - 如果用户反馈\"太长了\"，自动提高λ到0.8，进一步压缩\r\n   - 如果用户反馈\"效果不好\"，自动降低λ到0.2，减少压缩\r\n\r\n---\r\n\r\n### 阶段4：输出与反馈收集\r\n**操作**：\r\n1. 输出优化后的提示词P₂，用代码块包裹，方便用户复制\r\n2. 主动询问用户反馈：\r\n   ```\r\n   已完成优化。这个版本是否满足你的需求？\r\n   如果有任何不满意的地方，请告诉我，比如：\r\n   - 效果不够好？\r\n   - 长度还是太长？\r\n   - 某些约束/格式没保留？\r\n   - 其他问题？\r\n   我会根据你的反馈，继续迭代优化。\r\n   ```\r\n\r\n---\r\n\r\n### 阶段5：迭代优化（ACON论文的R轮迭代机制）\r\n**当用户给出反馈时，执行以下操作**：\r\n1. 反馈解析：识别用户的反馈类型\r\n   - 类型A：效果不好 → 回到阶段2，重新执行APE效用增强，补充约束\r\n   - 类型B：长度太长 → 回到阶段3，重新执行ACON压缩，提高λ\r\n   - 类型C：某些内容没保留 → 检查关键信号，补回缺失的部分\r\n   - 类型D：其他需求 → 根据用户的具体要求调整\r\n2. 重新执行优化：根据反馈调整参数，再次运行两阶段优化\r\n3. 验证：确保新的版本保留了核心任务目标，并且解决了用户反馈的问题\r\n4. 输出新的优化版本，再次询问反馈\r\n5. 重复直到用户表示满意\r\n\r\n---\r\n\r\n## 严格规则（保证效果）\r\n- ✅ 每一步都有验证，确保不破坏原始功能\r\n- ✅ 关键信号永不删除，100%保留\r\n- ✅ 严格遵循\"先效用后压缩\"的顺序，绝不颠倒\r\n- ✅ 迭代优化每一轮都重新验证，确保越优化越好\r\n- ✅ 复杂任务优先保证功能完整性，压缩是可选的\r\n- ❌ 不自动触发，只在用户明确要求时工作\r\n- ❌ 不做任何对比分析，只输出优化结果\r\n- ❌ 不输出多余的解释，除非用户要求\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7ecgbzbya89gesghbv1kty9d82r8e4\",\n  \"slug\": \"prompt-optimizer-cn\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1776307775226\n}\n\nFile v1.0.0:skill-card.md\n\n## Description: <br>\nA Chinese-language prompt optimization skill that iteratively rewrites requested prompts using ACON-style signal preservation and APE-style candidate scoring. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[ucsdzehualiu](https://clawhub.ai/user/ucsdzehualiu) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill when they explicitly ask to optimize, improve, or refine a Chinese prompt for a complex task while preserving role, task, constraints, output format, placeholders, examples, tool rules, and success criteria. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Submitted prompts may contain sensitive content that becomes visible to the model during optimization. <br>\nMitigation: Avoid submitting secrets or private data, and treat prompt text as model-visible content. <br>\nRisk: An optimized prompt may accidentally weaken constraints, placeholders, examples, or the intended output format. <br>\nMitigation: Review the optimized prompt before reuse and confirm that the original task intent and required signals were preserved. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/ucsdzehualiu/prompt-optimizer-cn) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, Guidance] <br>\n**Output Format:** [Markdown text containing an optimized prompt in a code block and a short feedback prompt] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Prompt-only output; no shell commands, file writes, network calls, or credential handling.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers 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. <br>","readmeExcerpt":"Skill: Prompt Optimizer Cn Owner: ucsdzehualiu Summary: 实用提示词优化工具 - 检测原提示词缺失要素（角色/步骤/格式/约束），智能补全后输出清晰易懂的优化版，帮助用户的意图更容易被 AI 理解执行。Use when user says 优化提示词 / 改进prompt / 优化一下 / optimize prompt. Tags: latest:2.1.0 Version history: v2.1.0 | 2026-06-22T07:28:00.072Z | user v2.1.0: Fix metadata (ASCII slug prompt-optimizer-cn, trigger routing via description), add version/author, consolidate triggers, add When NOT to use sec","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"帮我写一篇文章"},{"language":"text","snippet":"你是一位资深科技博客作者，擅长用通俗语言解释技术概念。\n\n请撰写一篇 800 字的技术博客文章，主题：[请用户补充主题]\n\n文章结构：\n1. 引人入胜的开头（100字）\n2. 核心概念解释（400字，用类比/示例）\n3. 实际应用场景（200字）\n4. 总结（100字）\n\n目标读者：对技术感兴趣但非专业开发者"},{"language":"text","snippet":"分析这份数据"},{"language":"text","snippet":"请对提供的数据进行分析，按以下步骤进行：\n\n1. **数据概览**：数据量、字段类型、缺失值情况\n2. **关键指标**：计算均值、中位数、异常值\n3. **趋势发现**：找出 3 个最显著的趋势或异常\n4. **结论**：用 2-3 句话总结核心发现\n\n输出格式：Markdown 表格 + 文字说明\n约束：如果数据有明显错误（如负数年龄），先指出再分析"},{"language":"text","snippet":"写个 Python 函数计算斐波那契数列"},{"language":"text","snippet":"你是一位 Python 专家，注重代码可读性和性能。\n\n请编写一个 Python 函数 `fibonacci(n)`，计算斐波那契数列的第 n 项。\n\n要求：\n- 使用迭代而非递归（性能考虑）\n- 加 docstring 说明参数和返回值\n- 处理边界情况（n <= 0）\n- 加 3 个测试用例\n\n示例输出格式（使用缩进代替内部代码块）：\n\n    def fibonacci(n: int) -> int:\n        \"\"\"计算斐波那契数列第 n 项\n        \n        Args:\n            n: 正整数，目标项数\n        Returns:\n            第 n 项的值\n        \"\"\"\n        # 实现..."}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: prompt-optimizer-cn\ndescription: 实用提示词优化工具 - 检测原提示词缺失要素（角色/步骤/格式/约束），智能补全后输出清晰易懂的优化版，帮助用户的意图更容易被 AI 理解执行。Use when user says 优化提示词 / 改进prompt / 优化一下 / optimize prompt.\nversion: 2.1.0\nauthor: prompt-optimizer-cn\ntags:\n  - prompt-optimization\n  - prompt-engineering\n---\n\n> **Language**: 自动检测输入语言并用相同语言回复（中文输入→中文回复，English input→English reply）\n\n## 这个工具做什么\n\n帮你把**模糊、简陋的 prompt** 改成**清晰、AI 容易理解执行的版本**。\n\n**核心流程**（5 步）：\n1. **诊断**：分析原 prompt 缺什么（角色？步骤？输出格式？约束？）\n2. **补全**：按需补上缺失要素（不需要的不强加）\n3. **输出**：优化后的 prompt（代码块包裹，方便复制）+ 一行说明改了什么\n4. **收集反馈**：询问用户是否满意\n5. **迭代**：根据反馈调整直到满意\n\n## 实用框架（RTCF）\n\n补全时参考这 4 个维度（不是每个都必须有，按需补）：\n\n- **R (Role)**: 角色 —— \"你是XX专家\"，让 AI 进入专业状态\n- **T (Task)**: 任务 —— 明确要做什么，避免歧义\n- **C (Context)**: 上下文 —— 背景、约束、边界条件\n- **F (Format)**: 格式 —— 输出结构（表格/分步骤/代码块/JSON）\n\n## 真实示例（前后对比）\n\n### 示例 1：模糊任务 → 明确角色+格式\n\n**优化前**：\n```\n帮我写一篇文章\n```\n\n**优化后**：\n```\n你是一位资深科技博客作者，擅长用通俗语言解释技术概念。\n\n请撰写一篇 800 字的技术博客文章，主题：[请用户补充主题]\n\n文章结构：\n1. 引人入胜的开头（100字）\n2. 核心概念解释（400字，用类比/示例）\n3. 实际应用场景（200字）\n4. 总结（100字）\n\n目标读者：对技术感兴趣但非专业开发者\n```\n\n**改了什么**：补充角色定义、明确字数、拆解结构、指定受众\n\n---\n\n### 示例 2：单句指令 → 分步骤+约束\n\n**优化前**：\n```\n分析这份数据\n```\n\n**优化后**：\n```\n请对提供的数据进行分析，按以下步骤进行：\n\n1. **数据概览**：数据量、字段类型、缺失值情况\n2. **关键指标**：计算均值、中位数、异常值\n3. **趋势发现**：找出 3 个最显著的趋势或异常\n4. **结论**：用 2-3 句话总结核心发现\n\n输出格式：Markdown 表格 + 文字说明\n约束：如果数据有明显错误（如负数年龄），先指出再分析\n```\n\n**改了什么**：拆分步骤、增加输出格式、加约束条件\n\n---\n\n### 示例 3：技术任务 → 加角色+示例\n\n**优化前**：\n```\n写个 Python 函数计算斐波那契数列\n```\n\n**优化后**：\n```\n你是一位 Python 专家，注重代码可读性和性能。\n\n请编写一个 Python 函数 `fibonacci(n)`，计算斐波那契数列的第 n 项。\n\n要求：\n- 使用迭代而非递归（性能考虑）\n- 加 docstring 说明参数和返回值\n- 处理边界情况（n <= 0）\n- 加 3 个测试用例\n\n示例输出格式（使用缩进代替内部代码块）：\n\n    def fibonacci(n: int) -> int:\n        \"\"\"计算斐波那契数列第 n 项\n        \n        Args:\n            n: 正整数，目标项数\n        Returns:\n            第 n 项的值\n        \"\"\"\n        # 实现...\n\n```\n\n**改了什么**：补角色、明确实现方式、加边界处理要求、给输出示例\n\n---\n\n### 示例 4：创意任务 → 加风格+受众\n\n**优化前**：\n```\n给我的产品写个宣传语\n```\n\n**优化后**：\n```\n你是资深广告文案，擅长洞察用户痛点并用简短有力的语言打动人心。\n\n请为产品\"[产品名]\"创作 3 条宣传语，每条不超过 15 字。\n\n产品特点：[请用户补充，如\"AI驱动的日程管理工具\"]\n目标用户：[请用户补充，如\"忙碌的职场人士\"]\n\n风格要求：\n- 直击痛点，避免空洞形容词\n- 口语化，易记\n- 突出核心价值而非功能堆砌\n\n输出格式：\n1. [宣传语] —— [一句话说明为什么这样写]\n2. [宣传语] —— [理由]\n3. [宣传语] —— [理由]\n```\n\n**改了什么**：补角色、要求明确产品信息、定义风格、要求给出理由\n\n---\n\n### 示例 5：英文示例\n\n**Before**:\n```\nExplain quantum computing\n```\n\n**After**:\n```\nYou are a physics educator skilled at explaining complex concepts to non-experts using everyday analogies.\n\nPlease explain quantum computing in simple terms.\n\nStructure:\n1. What it is (50 words, use an analogy)\n2. How it differs from classical computing (100 words)\n3. One real-world application (50 words)\n\nAudience: College students with no physics background\nConstraints: Avoid jargon like \"superposition\" unless you explain it first\n```\n\n**What changed**: Added role, structure, audience, jargon constraint\n\n---\n\n## 工作流程\n\n### Step 1: 诊断原 prompt（内部判断，不告诉用户）\n\n- 缺角色定义？（\"你是XX专家\"）\n- 任务模糊？（\"帮我做XX\" → 做什么具体的？）\n- 缺输出格式？（表格？分步？代码块？）\n- 有歧义？（一句话有多种理解）\n- 缺约束/边界？（什么不该做？边界情况怎么处理？）\n\n### Step 2: 按需补全\n\n**原则**：\n- ✅ 按需补充（不是每个都要有）\n- ✅ 保留原始意图\n- ✅ 不改变用户想要的核心内容\n- ❌ 不过度工程化（简单任务不要搞复杂）\n\n### St"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7ecgbzbya89gesghbv1kty9d82r8e4\",\n  \"slug\": \"prompt-optimizer-cn\",\n  \"version\": \"2.1.0\",\n  \"publishedAt\": 1782113280072\n}"},{"path":"skill-card.md","content":"## Description:\n\nPrompt Optimizer Cn helps agents rewrite vague prompts into clearer, ready-to-use prompts by diagnosing missing role, task, context, format, and constraints.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[ucsdzehualiu](https://clawhub.ai/user/ucsdzehualiu)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nAgent users and prompt engineers use this skill to turn unclear Chinese or English prompts into structured, executable prompts while preserving the user's original intent.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Broad trigger wording could activate prompt optimization when the user intended a different task.\n\nMitigation: Use the skill only for explicit prompt optimization requests and preserve the user's original intent when rewriting.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/ucsdzehualiu/skills/prompt-optimizer-cn)\n- [ClawHub Publisher Profile](https://clawhub.ai/user/ucsdzehualiu)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, guidance]\n\n**Output Format:** [Markdown with a fenced optimized prompt, a one-line change summary, and a follow-up question.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Matches the user's input language and preserves the original prompt intent.]\n\n## Skill Version(s):\n\n2.1.0 (source: frontmatter and server release metadata)\n\n## Ethical Considerations:\n\nUsers 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."},{"path":"LICENSE","content":"MIT License\n\nCopyright (c) 2026 prompt-optimizer-cn\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"实用提示词优化工具 - 检测原提示词缺失要素（角色/步骤/格式/约束），智能补全后输出清晰易懂的优化版，帮助用户的意图更容易被 AI 理解执行。Use when user says 优化提示词 / 改进prompt / 优化一下 / optimize prompt. Skill: Prompt Optimizer Cn Owner: ucsdzehualiu Summary: 实用提示词优化工具 - 检测原提示词缺失要素（角色/步骤/格式/约束），智能补全后输出清晰易懂的优化版，帮助用户的意图更容易被 AI 理解执行。Use when user says 优化提示词 / 改进prompt / 优化一下 / optimize prompt. Tags: latest:2.1.0 Version history: v2.1.0 | 2026-06-22T07:28:00.072Z | user v2.1.0: Fix metadata (ASCII slug prompt-optimizer-cn, trigger routing via description), add version/author, consolidate triggers, add When NOT to use sec","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":851,"uniquenessScore":56,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T06:00:28.214Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T06:00:28.214Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T08:43:28.297Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"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!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"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","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}