prompt-optimizer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePrompt Optimizer
Prompt优化器
Overview
概述
This skill transforms user-provided prompts into high-quality, clear, and effective instructions optimized for AI models. Apply proven prompt engineering principles to enhance clarity, specificity, structure, and effectiveness. The skill uses a systematic workflow to analyze, identify improvement opportunities, and restructure prompts based on industry best practices.
本技能可将用户提供的提示词转换为针对AI模型优化的高质量、清晰且有效的指令。应用经过验证的提示工程原则,提升提示词的清晰度、针对性、结构合理性和有效性。该技能采用系统化工作流,基于行业最佳实践分析提示词、识别改进空间并重构提示词。
When to Use This Skill
何时使用本技能
Activate this skill when users:
- Explicitly request prompt optimization or improvement
- Provide vague or unclear instructions that need refinement
- Ask for help making their requests more effective
- Submit poorly structured prompts that would benefit from reorganization
- Request guidance on how to better communicate with AI models
- Present complex tasks that need to be broken down into clearer instructions
在以下场景激活本技能:
- 用户明确请求优化或改进提示词
- 用户提供模糊或不清晰的指令,需要细化
- 用户请求帮助让其需求更有效
- 用户提交的提示词结构混乱,需要重新组织
- 用户寻求与AI模型更好沟通的指导
- 用户提出复杂任务,需要拆分为更清晰的指令
Optimization Workflow
优化工作流
Follow this systematic process to optimize any prompt:
遵循以下系统化流程优化任何提示词:
Step 1: Analyze the Original Prompt
步骤1:分析原始提示词
Examine the user's prompt and identify:
Clarity issues:
- Ambiguous terms or vague requirements
- Implicit assumptions that should be explicit
- Missing context or background information
Specificity gaps:
- Lack of concrete constraints or requirements
- Undefined success criteria
- Missing audience or purpose information
- Unclear scope or boundaries
Structure problems:
- Disorganized or stream-of-consciousness format
- Missing logical flow
- Lack of clear sections or hierarchy
Format considerations:
- No specified output format
- Unclear expectations about length, tone, or style
- Missing examples or templates
Complexity assessment:
- Determine if the task is too complex for a single prompt
- Identify if the request would benefit from prompt chaining
- Assess if step-by-step reasoning is needed
检查用户的提示词,识别以下问题:
清晰度问题:
- 模糊术语或不明确的要求
- 应明确说明的隐含假设
- 缺失的上下文或背景信息
针对性不足:
- 缺乏具体约束或要求
- 未定义成功标准
- 缺失受众或用途信息
- 范围或边界不明确
结构问题:
- 杂乱无章或意识流式的格式
- 缺乏逻辑流程
- 缺少清晰的章节或层级
格式考量:
- 未指定输出格式
- 对长度、语气或风格的期望不明确
- 缺少示例或模板
复杂度评估:
- 判断任务是否过于复杂,不适合单个提示词
- 识别需求是否可通过提示词链受益
- 评估是否需要分步推理
Step 2: Identify the Core Intent
步骤2:识别核心意图
Determine the fundamental objective behind the user's request:
- What is the user ultimately trying to accomplish?
- What problem are they trying to solve?
- What would constitute a successful output?
- Who is the intended audience or consumer of the output?
Clarify these points with the user if they are not evident from the original prompt.
确定用户需求背后的根本目标:
- 用户最终想要实现什么?
- 他们试图解决什么问题?
- 什么样的输出才算成功?
- 输出的目标受众或使用者是谁?
如果从原始提示词中无法明确这些要点,请与用户确认。
Step 3: Apply Optimization Principles
步骤3:应用优化原则
Enhance the prompt using these core principles:
Make it clear and direct:
- State requirements explicitly without assuming inference
- Remove ambiguity and vague language
- Use concrete, specific terms
Provide context and motivation:
- Explain WHY certain requirements matter
- Include relevant background information
- Describe the use case or scenario
Add specificity:
- Define concrete constraints (length, format, scope)
- Specify target audience
- Include quality criteria
- State any limitations or boundaries
Structure the request:
- Organize information logically
- Use clear sections or numbered points
- Separate different types of information (context, requirements, format)
Include examples when helpful:
- Provide input-output examples for complex formats
- Show desired tone or style through examples
- Demonstrate edge case handling
Allow for uncertainty:
- Explicitly permit expressing "I don't know"
- Request acknowledgment of limitations
- Prevent hallucination by encouraging honesty
使用以下核心原则提升提示词:
清晰直接:
- 明确说明要求,不假设AI能自行推断
- 消除模糊性和模糊语言
- 使用具体、明确的术语
提供上下文和动机:
- 解释某些要求的重要性
- 包含相关背景信息
- 描述使用场景或情境
增强针对性:
- 定义具体约束(长度、格式、范围)
- 指定目标受众
- 包含质量标准
- 说明任何限制或边界
结构化需求:
- 逻辑化组织信息
- 使用清晰的章节或编号点
- 区分不同类型的信息(上下文、要求、格式)
必要时添加示例:
- 针对复杂格式提供输入输出示例
- 通过示例展示期望的语气或风格
- 演示边缘情况的处理方式
允许不确定性:
- 明确允许AI表达“我不知道”
- 要求AI承认自身局限性
- 通过鼓励诚实避免幻觉
Step 4: Consider Advanced Techniques
步骤4:考虑高级技术
Evaluate if any advanced techniques would enhance the prompt:
Chain of Thought:
- Apply when the task requires reasoning or analysis
- Request step-by-step thinking for complex problems
- Use structured format to separate reasoning from answer
Prefilling:
- Use when a specific format is absolutely required (JSON, XML)
- Apply to eliminate unwanted preambles
- Utilize to establish immediate tone or style
Prompt Chaining:
- Break complex tasks into sequential steps
- Create a multi-stage workflow for intricate projects
- Design each prompt to build on previous outputs
Structured Output:
- Specify exact format requirements
- Provide schemas or templates
- Use tags or delimiters for different sections
Consult for detailed guidance on these techniques.
references/prompt-best-practices.md评估是否有任何高级技术可以提升提示词的效果:
Chain of Thought:
- 当任务需要推理或分析时使用
- 针对复杂问题,要求分步思考
- 使用结构化格式区分推理过程与答案
Prefilling:
- 当必须使用特定格式(JSON、XML)时使用
- 用于消除不必要的开场白
- 用于快速确立语气或风格
Prompt Chaining:
- 将复杂任务拆分为连续步骤
- 为复杂项目创建多阶段工作流
- 设计每个提示词以基于之前的输出构建
Structured Output:
- 指定精确的格式要求
- 提供模式或模板
- 对不同部分使用标签或分隔符
如需这些技术的详细指导,请查阅。
references/prompt-best-practices.mdStep 5: Present the Optimized Prompt
步骤5:呈现优化后的提示词
Deliver the optimization in this format:
Analysis Section:
Original prompt issues identified:
- [List key problems with the original prompt]Optimized Prompt:
[Present the complete optimized prompt in a code block for easy copying]Improvement Explanation:
Key improvements made:
- [Explain major enhancements]
- [Highlight added specificity]
- [Note structural changes]
- [Mention any advanced techniques applied]Optional - Usage Tips:
[If applicable, provide brief tips on how to further customize or use the optimized prompt]按照以下格式交付优化结果:
分析部分:
Original prompt issues identified:
- [List key problems with the original prompt]Optimized Prompt:
[Present the complete optimized prompt in a code block for easy copying]改进说明:
Key improvements made:
- [Explain major enhancements]
- [Highlight added specificity]
- [Note structural changes]
- [Mention any advanced techniques applied]可选 - 使用提示:
[If applicable, provide brief tips on how to further customize or use the optimized prompt]Step 6: Iterate Based on Feedback
步骤6:基于反馈迭代优化
After presenting the optimized prompt:
- Ask if the optimization meets the user's needs
- Offer to adjust tone, length, or specificity
- Provide alternative formulations if requested
- Refine based on user feedback
呈现优化后的提示词后:
- 询问优化结果是否满足用户需求
- 提供调整语气、长度或针对性的服务
- 如果用户要求,提供替代表述
- 根据用户反馈进一步完善
Practical Guidelines
实用指南
Balance is key: Not every prompt needs all advanced techniques. Match the optimization level to the task complexity.
Preserve user intent: Enhance clarity without changing the fundamental goal or adding unwanted requirements.
Consider the model: Modern models like Claude 4.x have strong instruction-following capabilities; leverage this by being direct and specific.
Stay practical: Focus on improvements that materially impact output quality, not cosmetic changes.
Be educational: When appropriate, briefly explain why certain changes improve the prompt, helping users learn to write better prompts independently.
平衡是关键: 并非所有提示词都需要使用所有高级技术。根据任务复杂度匹配优化级别。
保留用户意图: 在提升清晰度的同时,不要改变核心目标或添加不必要的要求。
考虑模型特性: Claude 4.x等现代模型具备强大的指令遵循能力;通过直接明确的表述来利用这一特性。
注重实用性: 专注于能切实提升输出质量的改进,而非表面修改。
兼具教育性: 适当时,简要解释某些修改能提升提示词的原因,帮助用户学会独立撰写更好的提示词。
Reference Resources
参考资源
This skill includes comprehensive reference materials:
references/prompt-best-practices.md
- Detailed explanations of all core principles
- Advanced techniques with examples
- Troubleshooting guide for common issues
- Quality checklist and decision frameworks
Load this reference when:
- Users ask about specific prompt engineering concepts
- Deep explanation of a technique is needed
- Troubleshooting unusual or complex prompting challenges
- Users want to learn prompt engineering principles
references/examples.md
- Before-and-after optimization examples across multiple domains
- Real-world scenarios demonstrating transformation
- Pattern library showing common improvements
Load this reference when:
- Users want to see concrete examples
- Illustrating a specific type of optimization
- Users are learning and need to understand patterns
- Demonstrating the impact of optimization
本技能包含全面的参考资料:
references/prompt-best-practices.md
- 所有核心原则的详细解释
- 带示例的高级技术
- 常见问题的故障排除指南
- 质量检查表和决策框架
在以下场景加载本参考资料:
- 用户询问特定提示工程概念
- 需要深入解释某项技术
- 排查特殊或复杂的提示词问题
- 用户希望学习提示工程原则
references/examples.md
- 跨多个领域的优化前后示例
- 展示转换过程的真实场景
- 展示常见改进模式的模式库
在以下场景加载本参考资料:
- 用户希望查看具体示例
- 演示特定类型的优化
- 用户在学习过程中需要理解模式
- 展示优化的实际效果
Quality Standards
质量标准
Ensure every optimized prompt includes:
- Clear, unambiguous objective
- Sufficient context for the AI to understand the goal
- Specific constraints and requirements
- Target audience or use case (when relevant)
- Expected output format or structure
- Quality criteria or success definition
- Permission to express uncertainty (when appropriate)
确保每个优化后的提示词包含:
- 清晰、明确的目标
- 足够的上下文,让AI理解目标
- 具体的约束和要求
- 目标受众或使用场景(如有相关)
- 预期的输出格式或结构
- 质量标准或成功定义
- 允许表达不确定性(如适用)
Common Optimization Patterns
常见优化模式
Pattern 1: Vague Request → Specific Structured Task
- Original: "Write about marketing"
- Optimized: Adds audience, scope, length, structure, key points, tone
Pattern 2: Implicit Context → Explicit Context
- Original: Assumes AI knows the background
- Optimized: States context, explains why it matters, provides relevant details
Pattern 3: Single Complex Prompt → Prompt Chain
- Original: Tries to do everything in one request
- Optimized: Breaks into logical sequential steps with clear outputs
Pattern 4: Generic Output → Formatted Output
- Original: No format specification
- Optimized: Provides schema, template, or explicit structure
Pattern 5: Assumed Constraints → Stated Constraints
- Original: Expects AI to infer limits
- Optimized: Explicitly states length, tone, scope, what to include/exclude
Consult for detailed examples of each pattern.
references/examples.md模式1:模糊请求 → 结构化特定任务
- 原始:"Write about marketing"
- 优化后:添加受众、范围、长度、结构、关键点、语气
模式2:隐含上下文 → 显式上下文
- 原始:假设AI了解背景信息
- 优化后:说明上下文、解释其重要性、提供相关细节
模式3:单一复杂提示词 → 提示词链
- 原始:试图通过一个请求完成所有任务
- 优化后:将任务拆分为逻辑连续的步骤
模式4:通用输出 → 格式化输出
- 原始:未指定格式
- 优化后:提供模式、模板或明确的结构
模式5:隐含约束 → 明确约束
- 原始:期望AI自行推断限制
- 优化后:明确说明长度、语气、范围、包含/排除内容
如需每种模式的详细示例,请查阅。
references/examples.md