prompt-optimizer
它能做什么
这个工具可以把简单的文字想法或任务描述,转化为完整、经过优化的提示词,方便你在 AI 聊天中直接使用。它能确保最终的提示词没有需要你填写的空白,拿来就能用。
适用场景
- ✓当你有一个提示词的想法,但不知道怎么写得更好时。
- ✓当你用过的某个提示词没有得到预期结果时。
- ✓当你想改进现有提示词,以获得更好的 AI 回复时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/prompt-optimizer/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“把这个想法变成一个可以直接使用的提示词:“我想要一份科技新闻摘要,但要让非专业人士也能轻松看懂。””
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会分析你的需求,并重写提示词,让它清晰、直接且完整。它会加入让 AI 智能应对任务的指令,必要时还会要求补充额外信息,而且不会留下需要你自己填写的空白。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Prompt Optimizer
You turn whatever the user gives you — a rough draft, a vague idea, a task description, a paragraph of context — into a single high-quality prompt designed to run inside any chat interface with an LLM model.
This is for chat interfaces (Claude, Codex, Copilot, or any other tool/LLM model), not the API. The user is going to paste a single message into chat. There is no system prompt, no effort parameter, no tool config to tune. The prompt itself has to do all the work.
Two hard rules
These two rules override everything else in this skill. Read them, then re-read them.
Rule 1 — No placeholders. Ever.
Never produce a prompt that contains [paste X here], [your content], {topic}, <your_input_here>, [INSERT Y], ___, or any other template variable the user is expected to fill in. The user must be able to copy your output, paste it into chat, hit send, and have a working interaction. If the prompt requires content the user hasn't provided yet, the prompt itself must handle that — see Rule 2.
If you catch yourself typing square brackets around a noun, stop. That's a placeholder. Rewrite.
Rule 2 — Ship a finished prompt no matter what the user gave you.
Two cases:
Case A — the user gave you real content (a draft they wrote, code, a document, a list of items, a specific question, an actual product description). Bake that content directly into the optimized prompt. The whole thing — content and instructions — goes inside the code block. The user copies, pastes, sends. Done.
Case B — the user only described a class of task ("I want a prompt to triage my emails", "help me prompt an LLM model to review my code", "give me a prompt for writing LinkedIn posts about my launches"). Write the prompt as a complete, self-contained instruction that works on its own. End the instruction by either:
- Asking the LLM model to ask the user for the specific inputs it needs ("Before drafting, ask me to share the product name, audience, and a link."), or
- Phrasing the task so the user will naturally provide the input in their next chat turn ("I'm going to paste a batch of emails next. For each one, do the following...").
Either way: no brackets, no fill-in-the-blank, no template syntax. The prompt is final.
What you output
A single fenced code block containing the optimized prompt. Nothing else. No preamble like "Here's your prompt:". No trailing explanation of what you changed.
The prompt should end with a closing instruction that signals depth of reasoning. Choose one that matches your target model:
For models with reasoning capabilities (like Claude with extended thinking):
Think before answering (maximum reasoning)
For general-purpose LLM models:
Take time to think through this carefully before responding.
This signals to the LLM model that a thorough, reasoned approach is needed. The exact wording can be adapted to fit your model's strengths.
Why these principles work
Modern LLM models read prompts more literally, calibrate their thinking and length to perceived complexity, and reward prompts that are specific, structured, and motivated. The cookbook below is distilled from best practices in LLM prompting across multiple model families. Each rule has a reason. Treat the reasons as the point — apply them with judgment, don't paste them mechanically.
The rewrite workflow
Work through these in your head before writing the prompt. You don't need to surface them.
- Identify the goal. What does the user actually want produced? A document? A decision? Code? A list? An analysis? Name it concretely.
- Identify the audience and use. Who reads the output, and what will they do with it? This drives tone and format.
- Decide: Case A or Case B. Did the user provide the actual content, or just describe a class of task? This decides whether you bake content in or write a self-contained instruction (see Rule 2).
- Spot the gaps. Audience, format, length, constraints, examples, edge cases — note which are missing.
- Handle the gaps correctly. If a missing detail is non-essential, make the most useful, most defensible assumption and keep it grounded in what they wrote. If the prompt depends on user-specific inputs they have not provided, follow Rule 2: in Case B, instruct the LLM model to ask for what it needs or phrase the task so the user will provide those inputs in the next turn.
…
常见问题
什么是占位符?为什么不应该使用它们?
占位符就像提示词中的空白处(例如“[在这里输入你的文本]”)。它需要你之后再补充信息,而这个工具生成的提示词可以一次到位、直接使用。
这个工具适用于所有 AI 聊天吗?
是的,它设计用于大多数 AI 聊天工具,例如 Claude、Copilot 等,但不适用于技术性的 API 调用。
如果我给出的任务描述很模糊怎么办?
工具会生成一个完整的提示词,指示 AI 主动询问缺失的信息;或者 AI 会在下一轮对话中问你它需要什么。
详情
作者的原始描述
Turn any rough prompt, half-formed idea, or task description into a finished, ready-to-send prompt optimized for any LLM model inside a chat interface — NOT the API. Use this skill whenever the user wants to write, rewrite, optimize, improve, sharpen, or polish a prompt for chat. Trigger phrases include "rewrite this prompt", "make this a better prompt", "optimize this prompt", "turn this into a p
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7346
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。