Token导航 LogoToken导航

Agent Skill · AI 工具

prompt-optimizer(提示优化器)

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。它适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需要保留真实业务约束,不要把示例当硬规则;涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

prompt-optimizer 是AI 工具类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在AI 工具类的 2,536 个 Skill 里排第 885。

总安装 1,730周安装 70GitHub Stars 22下载 543核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:prompt-optimizer(提示优化器)
来源仓库:https://github.com/hikanner/agent-skills
仓库路径:skills/prompt-optimizer
安装命令:
npx skills add https://github.com/hikanner/agent-skills --skill prompt-optimizer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/hikanner/agent-skills --skill prompt-optimizer

这个 Skill 是做什么的

AI 工具类 Skill 用来扩展助手本身的能力,例如接模型、接检索、接外部服务。

用于辅助提示词、系统指令和工作流模板的整理。适合规范任务边界、统一输出格式或优化提示词复用性。使用时需保留真实业务约束,不要把示例当硬规则。涉及自动执行或外部工具时,应明确确认步骤和权限边界。高风险操作需定义失败处理方式。prompt-optimizer 属于AI 工具类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/prompt-optimizer

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/hikanner/agent-skills --skill prompt-optimizer;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

prompt-optimizer 怎么安装?

在终端执行 npx skills add https://github.com/hikanner/agent-skills --skill prompt-optimizer。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

prompt-optimizer 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

prompt-optimizer 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

prompt-optimizer 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

prompt-optimizer 用的人多吗?

公开数据是累计安装 1,730 次,近一周安装 70 次,下载 543 次,GitHub 22 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

prompt-optimizer 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理AI 工具类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

AI 工具类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
executing-plans

执行计划 · Codex、Claude

1,515,336173,110只读MIT通过
verification-before-completion

完成前的验证 · Codex、Claude

1,319,472173,121权限未标注MIT通过
subagent-driven-development

子 Agent 驱动开发 · Codex、Claude

1,312,416173,138只读MIT通过
copy-editing

复制编辑 · Codex、Claude

1,209,57625,632只读MIT通过
paywall-upgrade-cro

付费专区升级 cro · Codex、Claude

1,030,17625,617只读MIT通过
prompt-optimizer

提示优化器 · 本页

1,73022只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Prompt Optimizer

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.

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

Optimization Workflow

Follow this systematic process to optimize any prompt:

Step 1: Analyze the Original Prompt

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

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

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

Step 4: Consider Advanced Techniques

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 references/prompt-best-practices.md for detailed guidance on these techniques.

Step 5: Present the Optimized Prompt

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]

Step 6: Iterate Based on Feedback

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.

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

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)

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 references/examples.md for detailed examples of each pattern.

平台分布

Claude Code

26.44%
按下载量换算144

Gemini CLI

25.53%
按下载量换算139

Antigravity

19.53%
按下载量换算106

windsurf

12.54%
按下载量换算68

OpenCode

8.82%
按下载量换算48

Codex

3.84%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills