跳到主内容
智客 ZICQ

技能库 智客分类:文档办公 prompt-optimizer

Prompt Optimizer

利用EARS(对要求的简单处理语法)方法,将模糊的提示转化为精确的,结构合理的规格. 当用户提供松散的要求,模糊的特征描述,或者需要增强AI生成的代码,产品或文档的提示时,应当使用这种技能. 触发器包括要求"优化我的即时","改进这个要求","使这个要求更加具体",或者当原始要求缺乏细节和结构时.

1906 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

利用EARS(对要求的简单处理语法)方法,将模糊的提示转化为精确的,结构合理的规格. 当用户提供松散的要求,模糊的特征描述,或者需要增强AI生成的代码,产品或文档的提示时,应当使用这种技能. 触发器包括要求"优化我的即时","改进这个要求","使这个要求更加具体",或者当原始要求缺乏细节和结构时.

何时用

应用时 :

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Prompt Optimizer、Overview、When to Use、Six-Step Optimization Workflow、Step 1: Analyze Original Requirement、Step 2: Apply EARS Transformation。 其中含规范建议的小节:分步指令、输入输出示例。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/ears_syntax.md、references/domain_theories.md、references/advanced_techniques.md、references/examples.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Transform vague prompts into precise, well-structured specifications using EARS (Easy Approach to Requirements Syntax) methodology. This skill should be used when users provide loose requirements, ambiguous feature descriptions, or need to enhance prompts for AI-generated code, products, or documents. Triggers include requests to "optimize my prompt", "improve this requirement", "make this more specific", or when raw requirements lack detail and structure.

Prompt OptimizerOverviewWhen to UseSix-Step Optimization WorkflowStep 1: Analyze Original RequirementStep 2: Apply EARS TransformationStep 3: Identify Domain TheoriesStep 4: Extract Concrete ExamplesStep 5: Generate Enhanced PromptRoleSkillsWorkflows

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
prompt-optimizer
description
Transform vague prompts into precise, well-structured specifications using EARS (Easy Approach to Requirements Syntax) methodology. This skill should be used when users provide loose requirements, ambiguous feature descriptions, or need to enhance prompts for AI-generated code, products, or documents. Triggers include requests to "optimize my prompt", "improve this requirement", "make this more specific", or when raw requirements lack detail and structure.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 4
  • references/ears_syntax.md
  • references/domain_theories.md
  • references/advanced_techniques.md
  • references/examples.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「prompt-optimizer」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-3d267df0e24635bc-%E6%8F%90%E7%A4%BA%E4%BC%98%E5%8C%96%E5%99%A8.html
请存为 .cursor/skills/prompt-optimizer/SKILL.md 或 .claude/skills/prompt-optimizer/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/daymade/claude-code-skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/daymade/claude-code-skills' --list

npx skills add 'https://github.com/daymade/claude-code-skills' --skill 'prompt-optimizer'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: prompt-optimizer description: Transform vague prompts into precise, well-structured specifications using EARS (Easy Approach to Requirements Syntax) methodology. This skill should be used when users provide loose requirements, ambiguous feature descriptions, or need to enhance prompts for AI-generated code, products, or documents. Triggers include requests to "optimize my prompt", "improve this requirement", "make this more specific", or when raw requirements lack detail and structure. --- # Prompt Optimizer ## Overview Optimize vague prompts into precise, actionable specifications using EARS (Easy Approach to Requirements Syntax) - a Rolls-Royce methodology for transforming natural language into structured, testable requirements. **Methodology inspired by:** This skill's approach to combining EARS with domain theory grounding was inspired by [阿星AI工作室 (A-Xing AI Studio)](https://mp.weixin.qq.com/s/yUVX-9FovSq7ZGChkHpuXQ), which demonstrated practical EARS application for prompt enhancement. **Four-layer enhancement process:** 1. **EARS syntax transformation** - Convert descriptive language to normative specifications 2. **Domain theory grounding** - Apply relevant industry frameworks (GTD, BJ Fogg, Gestalt, etc.) 3. **Example extraction** - Surface concrete use cases with real data 4. **Structured prompt generation** - Format using Role/Skills/Workflows/Examples/Formats framework ## When to Use Apply when: - User provides vague feature requests ("build a dashboard", "create a reminder app") - Requirements lack specific conditions, triggers, or measurable outcomes - Natural language descriptions need conversion to testable specifications - User explicitly requests prompt optimization or requirement refinement ## Six-Step Optimization Workflow ### Step 1: Analyze Original Requirement Identify weaknesses: - **Overly broad** - "Add user authentication" → Missing password requirements, session management - **Missing triggers** - "Send notifications" → Missing when/why notifications trigger - **Ambiguous actions** - "Make it user-friendly" → No measurable usability criteria - **No constraints** - "Process payments" → Missing security, compliance requirements ### Step 2: Apply EARS Transformation Convert requirements to EARS patterns. See `references/ears_syntax.md` for complete syntax rules. **Five core patterns:** 1. **Ubiquitous**: `The system shall ` 2. **Event-driven**: `When , the system shall ` 3. **State-driven**: `While , the system shall ` 4. **Conditional**: `If , the system shall ` 5. **Unwanted behavior**: `If , the system shall prevent ` **Quick example:** ``` Before: "Create a reminder app with task management" After (EARS): 1. When user creates a task, the system shall guide decomposition into executable sub-tasks 2. When task deadline is within 30 minutes AND user has not started, the system shall send notification with sound alert 3. When user completes a sub-task, the system shall update progress and provide positive feedback ``` **Transformation checklist:** - [ ] Identify implicit conditions and make explicit - [ ] Specify triggering events or states - [ ] Use precise action verbs (shall, must, should) - [ ] Add measurable criteria ("within 30 minutes", "at least 8 characters") - [ ] Break compound requirements into atomic statements - [ ] Remove ambiguous language ("user-friendly", "fast") ### Step 3: Identify Domain Theories Match requirements to established frameworks. See `references/domain_theories.md` for full catalog. **Common domain mappings:** - **Productivity** → GTD, Pomodoro, Eisenhower Matrix - **Behavior Change** → BJ Fogg Model (B=MAT), Atomic Habits - **UX Design** → Hick's Law, Fitts's Law, Gestalt Principles - **Security** → Zero Trust, Defense in Depth, Privacy by Design **Selection process:** 1. Identify primary domain from requirement keywords 2. Match to 2-4 complementary theories 3. Apply theory principles to specific features 4. Cite theories in enhanced prompt for credibility ### Step 4: Extract Concrete Examples Generate specific examples with real data: - User scenarios: "When user logs in on mobile device..." - Data examples: "Product: 'Laptop', Price: $999, Stock: 15" - Workflow examples: "Task: Write report → Sub-tasks: Research (2h), Draft (3h), Edit (1h)" Examples must be **realistic**, **specific**, **varied** (success/error/edge cases), and **testable**. ### Step 5: Generate Enhanced Prompt Structure using the standard framework: ```markdown # Role [Specific expert role with domain expertise] ## Skills - [Core capability 1] - [Core capability 2] [List 5-8 skills aligned with domain theories] ## Workflows 1. [Phase 1] - [Key activities] 2. [Phase 2] - [Key activities] [Complete step-by-step process] ## Examples [Concrete examples with real data, not placeholders] ## Formats [Precise output specifications: - File types, structure requirements - Design/styling expectations - Technical constraints - Deliverable checklist] ``` **Quality criteria:** - **Role specificity**: "Product designer specializing in time management apps" > "Designer" - **Theory grounding**: Reference frameworks explicitly - **Actionable workflows**: Clear inputs/outputs and decision points - **Concrete examples**: Real data, not "Example 1", "Example 2" - **Measurable formats**: Specific requirements, not "good design" ### Step 6: Present Optimization Results Output in structured format: ```markdown ## Original Requirement [User's vague requirement] **Identified Issues:** - [Issue 1: e.g., "Lacks specific trigger conditions"] - [Issue 2: e.g., "No measurable success criteria"] ## EARS Transformation [Numbered list of EARS-formatted requirements] ## Domain & Theories **Primary Domain:** [e.g., Authentication Security] **Applicable Theories:** - **[Theory 1]** - [Brief relevance] - **[Theory 2]** - [Brief relevance] ## Enhanced Prompt [Complete Role/Skills/Workflows/Examples/Formats prompt] --- **How to use:** [Brief guidance on applying the prompt] ``` ## Advanced Techniques For complex scenarios, see `references/advanced_techniques.md`: - **Multi-stakeholder requirements** - EARS statements for each user type - **Non-functional requirements** - Performance, security, scalability with quantified thresholds - **Complex conditional logic** - Nested conditions with boolean operators ## Quick Reference **Do's:** ✅ Break down compound requirements (one EARS statement per requirement) ✅ Specify measurable criteria (numbers, timeframes, percentages) ✅ Include error/edge cases ✅ Ground in established theories ✅ Use concrete examples with real data **Don'ts:** ❌ Avoid vague language ("fast", "user-friendly") ❌ Don't assume implicit knowledge ❌ Don't mix multiple actions in one statement ❌ Don't use placeholders in examples ## Resources Load these reference files as needed: - **`references/ears_syntax.md`** - Complete EARS syntax rules, all 5 patterns, transformation guidelines, benefits - **`references/domain_theories.md`** - 40+ theories mapped to 10 domains (productivity, UX, gamification, learning, e-commerce, security, etc.) - **`references/examples.md`** - Four complete transformation examples (procrastination app, e-commerce product page, learning dashboard, password reset security) with before/after comparisons and reusable template - **`references/advanced_techniques.md`** - Multi-stakeholder requirements, non-functional specs, complex conditional logic patterns **When to load references:** - EARS syntax clarification needed → `ears_syntax.md` - Domain theory selection requires extensive options → `domain_theories.md` - User requests multiple optimization examples → `examples.md` - Complex requirements with multiple stakeholders or non-functional specs → `advanced_techniques.md`

相关技能

文档办公

Ontology

为结构化的代理内存和可堆肥技能所打入的知识图. 在创建/征服实体(Person, project, Task, Evention, Document)时使用,链接相关对象,强制约束,规划多步动作作为图变,或技能需要共享状态时使用. 触发到"记住","我知道什么","链接X到Y",…

文档办公

Nano Pdf

使用纳米-pdf CLI编辑带有自然语言指令的PDF.

文档办公

Word / DOCX

创建,检查,并编辑有可靠样式的Microsoft Word文档和DOCX文件,编号,跟踪更改,表格,章节,并进行相容性检查. 当 (1) 任务涉及 Word 或 ".docx " 时使用; (2) 文件包括跟踪的更改,评论,字段,表格,模板,或页面布局限制; (3) 文档必须在不…

文档办公

Api Gateway

通过 Maton 网关调用第三方 API, 它为用户已经连接的应用程序注入证书 。 当用户命名一个连接的应用程序和其中的具体行动时使用此技能——读取一个邮箱,查询一个CMM,归档一个问题,更新一个电子表格,通过一个连接的搜索或刮取提供者运行一个查询. 每一次通话都到用户连接的应用…