magic-prompt-generator by agilkannan/skills
npx skills add https://github.com/agilkannan/skills --skill magic-prompt-generator通过智能提问、策略性框架选择和迭代优化,生成世界级、生产就绪的提示词。输出的提示词,用户可以直接复制粘贴到任何 AI 聊天机器人中,以获得出色的结果。
用户需求
│
▼
1. 发现 → 提示词用于什么任务?
│
▼
2. 收集 → 收集背景信息和需求
│
▼
3. 选择 → 选择合适的提示词框架
│
▼
4. 起草 → 构建结构化的提示词
│
▼
5. 优化 → 根据用户反馈进行迭代
│
▼
6. 交付 → 输出最终可复制粘贴的提示词
在询问详细问题之前,先理解高层次的任务。
提出一个清晰的问题来开始:
"你希望 AI 执行什么任务?例如:撰写内容、分析数据、生成代码、做出决策、头脑风暴想法等。"
用户回答后,在心里对提示词类型进行分类:
| 用户意图 | 提示词类别 | 可能使用的框架 |
|---|---|---|
| "撰写博客文章 / 邮件 / 故事" | 创意写作 | 角色扮演 + 少样本学习 + 输出格式 |
| "分析数据 / 趋势 / 指标" | 分析 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 思维链 + 结构化输出 |
| "生成代码 / 修复漏洞 / 代码审查" | 编程 | 任务分解 + 示例 |
| "回答问题 / 解释概念" | 知识 | 思维链 + 上下文 |
| "头脑风暴 / 构思 / 探索" | 创造性思维 | 角色扮演 + 约束 + 发散性提示 |
| "做出决策 / 评估选项" | 决策制定 | 结构化推理 + 标准 |
| "总结 / 提取 / 转换" | 信息处理 | 任务规范 + 输出格式 |
| "教学 / 辅导 / 逐步解释" | 教育 | 苏格拉底式方法 + 示例 |
此分类指导接下来要问哪些问题。
根据提示词类别提出有针对性的问题。切勿询问所有问题 —— 选择 3-5 个最相关的问题。
无论类别如何,始终相关:
针对创意写作:
针对分析:
针对编程:
针对决策制定:
针对知识/教育:
针对创造性思维/头脑风暴:
询问 2-3 个问题后,提供:
"请随时转储任何额外的背景信息、示例或要求。你提供的信息越具体,提示词的效果就越好。"
根据收集到的背景信息,选择合适的提示词框架。详细解释请参阅 references/prompt-frameworks.md。
| 任务类型 | 主要框架 | 附加组件 |
|---|---|---|
| 复杂推理 | 思维链 | + 结构化输出 |
| 需要示例 | 少样本学习 | + 输出格式 |
| 多步骤任务 | 任务分解 | + 思维链 |
| 特定角色/视角 | 基于角色的提示 | + 上下文 + 约束 |
| 需要工具/操作 | ReAct(推理 + 行动) | + 工具描述 |
| 开放式创意 | 发散性思维 | + 约束 + 示例 |
| 结构化输出 | 基于模板 | + 验证规则 |
你可以组合框架。 例如:对于复杂的分析性写作任务,可以使用基于角色 + 思维链 + 少样本学习。
使用此通用结构构建提示词。根据所选框架调整各个部分。
[角色/上下文 - 如果适用]
你是 [具有相关专业知识的特定角色]。
[任务 - 始终必需]
你的任务是 [具体、清晰的指令]。
[上下文 - 如果需要]
背景信息:
- [相关背景信息]
- [情境细节]
- [约束或要求]
[输入规范 - 如果用户提供数据]
你将获得:
- [用户将粘贴的内容]
- [输入的格式或结构]
[框架特定部分]
[插入思维链、少样本示例、任务分解步骤等。]
[输出格式 - 始终推荐]
输出格式:
[指定结构、长度、风格、格式要求]
[约束与防护栏 - 如果适用]
重要事项:
- 请勿 [需要避免的具体事项]
- 始终 [具体要求]
- 如果 [边缘情况],则 [处理指令]
[质量标准 - 可选但很有价值]
成功的输出将:
- [成功标准 1]
- [成功标准 2]
在展示草稿之前,请在心里验证:
展示草稿提示词并邀请反馈。
这是你的提示词:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[完整的提示词]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
此提示词使用 [框架名称] 来 [主要好处]。
**使用方法**:复制两条线之间的所有内容,然后粘贴到你的 AI 聊天机器人中。
**想要优化吗?**
- 需要更短/更长吗?
- 不同的语气或风格?
- 更多/更少的示例?
- 额外的约束?
请告诉我,我会进行调整。
| 用户说 | 需要更改什么 |
|---|---|
| "太长了" | 压缩上下文;删除可选部分;合并相似的指令 |
| "太短了 / 需要更多细节" | 添加示例、上下文或分步指导 |
| "语气不对" | 调整角色描述和输出格式的语言 |
| "不够具体" | 添加约束、成功标准和输出格式细节 |
| "太死板了" | 移除严格的模板;添加"运用你的判断"等短语 |
| "给我一些变体" | 生成 2-3 个采用不同方法的替代提示词 |
一旦用户满意,就交付最终版本并提供使用指导。
✅ **最终提示词已就绪**
复制两条线之间的所有内容:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[完整的最终提示词]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
**框架**: [使用的框架名称]
**最适合**: [理想用例的简要描述]
**提示**: [一个可操作的最佳实践建议]
想要创建另一个提示词或进一步优化这个吗?请告诉我!
如果有帮助,可以提供变体:
我还可以创建变体:
**版本 A**(当前): [单行描述]
**版本 B**(更短): 针对快速任务的精简版
**版本 C**(更具结构性): 添加了分步分解
想看看这些吗?
适用于需要 AI 与用户多次交互的复杂工作流程:
**第 1 轮**: [第一个提示词 - 收集信息]
AI 响应后,提供:
**第 2 轮**: [第二个提示词 - 处理和分析]
AI 响应后,提供:
**第 3 轮**: [第三个提示词 - 综合并输出]
当提示词需要处理不同场景时:
如果 [条件 A],则 [指令 A]。
如果 [条件 B],则 [指令 B]。
否则,[默认指令]。
适用于需要 AI 自行生成提示词的任务:
生成一个能够 [元任务] 的提示词。
你创建的提示词应:
- [要求 1]
- [要求 2]
使用此结构: [模板]
对于常见的提示词类型,请参阅 references/prompt-patterns.md,其中包含可随时调整的模板,适用于:
在交付任何提示词之前,请根据此检查清单进行验证:references/quality-checklist.md
优秀提示词的五大支柱:
当用户提供现有提示词要求改进时:
当用户在没有具体任务的情况下询问最佳实践时:
当用户想要多个选项进行选择时:
每周安装次数
1
代码仓库
GitHub 星标数
2
首次出现
1 天前
安全审计
安装于
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1
Generate world-class, production-ready prompts through intelligent questioning, strategic framework selection, and iterative refinement. Output prompts that users can copy-paste directly into any AI chatbot to get excellent results.
User's Need
│
▼
1. DISCOVER → What task is the prompt for?
│
▼
2. GATHER → Collect context and requirements
│
▼
3. SELECT → Choose the right prompt framework
│
▼
4. DRAFT → Build the structured prompt
│
▼
5. REFINE → Iterate based on user feedback
│
▼
6. DELIVER → Output final copy-pasteable prompt
Before asking detailed questions, understand the high-level task.
Ask ONE clear question to start:
"What task do you want the AI to perform? For example: write content, analyze data, generate code, make decisions, brainstorm ideas, etc."
After the user answers, mentally classify the prompt type:
| User Intent | Prompt Category | Likely Framework |
|---|---|---|
| "Write blog post / email / story" | Creative Writing | Role + Few-Shot + Output Format |
| "Analyze data / trends / metrics" | Analysis | Chain-of-Thought + Structured Output |
| "Generate code / fix bug / review" | Coding | Task Decomposition + Examples |
| "Answer questions / explain concept" | Knowledge | Chain-of-Thought + Context |
| "Brainstorm / ideate / explore" | Creative Thinking | Role + Constraints + Divergent Prompting |
| "Make decision / evaluate options" | Decision Making | Structured Reasoning + Criteria |
| "Summarize / extract / transform" | Information Processing | Task Specification + Output Format |
| "Teach / tutor / explain step-by-step" | Educational | Socratic Method + Examples |
This classification guides which questions to ask next.
Ask targeted questions based on the prompt category. Never ask all questions — select 3-5 most relevant.
Always relevant, regardless of category:
For Creative Writing:
For Analysis:
For Coding:
For Decision Making:
For Knowledge/Education:
For Creative Thinking/Brainstorming:
After asking 2-3 questions, offer:
"Feel free to dump any additional context, examples, or requirements. The more specific you are, the better the prompt will be."
Based on the gathered context, choose the appropriate prompt framework(s). See references/prompt-frameworks.md for detailed explanations.
| Task Type | Primary Framework | Add-ons |
|---|---|---|
| Complex reasoning | Chain-of-Thought | + Structured Output |
| Needs examples | Few-Shot Learning | + Output Format |
| Multi-step task | Task Decomposition | + Chain-of-Thought |
| Specific role/perspective | Role-Based Prompting | + Context + Constraints |
| Requires tools/actions | ReAct (Reason + Act) | + Tool descriptions |
| Open-ended creative | Divergent Thinking | + Constraints + Examples |
| Structured output | Template-Based | + Validation Rules |
You can combine frameworks. Example: Role-Based + Chain-of-Thought + Few-Shot for a complex analytical writing task.
Build the prompt using this universal structure. Adapt sections based on the selected framework.
[ROLE/CONTEXT - if applicable]
You are [specific role with relevant expertise].
[TASK - always required]
Your task is to [specific, clear instruction].
[CONTEXT - if needed]
Context:
- [Relevant background information]
- [Situational details]
- [Constraints or requirements]
[INPUT SPECIFICATION - if user provides data]
You will be provided with:
- [What input the user will paste]
- [Format or structure of input]
[FRAMEWORK-SPECIFIC SECTION]
[Insert Chain-of-Thought, Few-Shot examples, Task Decomposition steps, etc.]
[OUTPUT FORMAT - always recommended]
Output format:
[Specify structure, length, style, formatting requirements]
[CONSTRAINTS & GUARDRAILS - if applicable]
Important:
- Do NOT [specific things to avoid]
- Always [specific requirements]
- If [edge case], then [handling instruction]
[QUALITY CRITERIA - optional but valuable]
A successful output will:
- [Success criterion 1]
- [Success criterion 2]
Before presenting the draft, mentally verify:
Present the draft prompt and invite feedback.
Here's your prompt:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[THE COMPLETE PROMPT]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This prompt uses [framework name(s)] to [key benefit].
**To use**: Copy everything between the lines and paste into your AI chatbot.
**Want to refine?**
- Need it shorter/longer?
- Different tone or style?
- More/fewer examples?
- Additional constraints?
Let me know and I'll adjust.
| User Says | What to Change |
|---|---|
| "Too long" | Condense context; remove optional sections; merge similar instructions |
| "Too short / needs more detail" | Add examples, context, or step-by-step guidance |
| "Wrong tone" | Adjust role description and output format language |
| "Not specific enough" | Add constraints, success criteria, and output format details |
| "Too rigid" | Remove strict templates; add "use your judgment" phrases |
| "Give me variations" | Generate 2-3 alternative prompts with different approaches |
Once the user is satisfied, deliver the final version with usage guidance.
✅ **Final Prompt Ready**
Copy everything between the lines:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[THE COMPLETE FINAL PROMPT]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
**Framework**: [Name of framework(s) used]
**Best for**: [Brief description of ideal use case]
**Tip**: [One actionable tip for best results]
Want to create another prompt or refine this further? Let me know!
If helpful, offer variations:
I can also create variations:
**Version A** (Current): [One-line description]
**Version B** (Shorter): Condensed for quick tasks
**Version C** (More structured): Added step-by-step breakdown
Want to see any of these?
For complex workflows where the AI needs to interact with the user multiple times:
**Turn 1**: [First prompt - gather information]
After the AI responds, provide:
**Turn 2**: [Second prompt - process and analyze]
After the AI responds, provide:
**Turn 3**: [Third prompt - synthesize and output]
When the prompt needs to handle different scenarios:
If [condition A], then [instruction A].
If [condition B], then [instruction B].
Otherwise, [default instruction].
For tasks where the AI should generate prompts itself:
Generate a prompt that will [meta-task].
The prompt you create should:
- [Requirement 1]
- [Requirement 2]
Use this structure: [template]
For common prompt types, see references/prompt-patterns.md which includes ready-to-adapt templates for:
Before delivering any prompt, validate against this checklist: references/quality-checklist.md
The 5 Pillars of Excellent Prompts:
When user provides an existing prompt to improve:
When the user asks for best practices without a specific task:
When user wants multiple options to choose from:
Weekly Installs
1
Repository
GitHub Stars
2
First Seen
1 day ago
Security Audits
Gen Agent Trust HubPassSocketFailSnykPass
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1
超能力技能使用指南:AI助手技能调用优先级与工作流程详解
45,100 周安装