← ClaudeAtlas

prompt-engineeringlisted

Transform task descriptions into optimized LLM prompts. Trigger: user says "帮我优化 prompt"、"写 prompt"、"设计提示词"、"prompt engineering".
afine907/skills · ★ 0 · AI & Automation · score 75
Install: claude install-skill afine907/skills
# Prompt Engineering — 提示词工程 Agent 任务描述 → 结构化高质量 prompt。 ## Goal Transform task descriptions into optimized prompts for LLMs. Covers persona design, chain-of-thought, output formatting, constraints, and few-shot examples. ## Trigger - User says "帮我优化 prompt"、"写 prompt"、"设计提示词" - User needs a prompt for a specific LLM task - User is creating a skill for this repo (dogfooding) ## 工作流程 ``` 任务描述 → 需求分析 → prompt 结构设计 → 输出最终 prompt + 使用说明 ``` ## Step 1: 需求分析 从用户描述中提取关键要素: | 要素 | 需明确的问题 | |------|-------------| | **目标** | LLM 要完成什么任务?输出什么? | | **输入** | 用户会提供什么信息?格式? | | **输出** | 期望什么格式?文本/JSON/代码/表格? | | **受众** | 谁会用这个 prompt?什么技术背景? | | **约束** | 语言、长度、风格、安全限制? | | **示例** | 有没有输入输出对示例? | **如果信息不足**:列出缺失要素,让用户补充。如果用户反复无法提供关键信息,基于合理假设生成一个默认版本,标注假设条件并让用户在此基础上修改。 ## Step 2: 设计 prompt 结构 根据任务类型选择结构模板: ### 分类/提取类 ``` ## 任务 <明确任务目标> ## 输入 <input_format> ## 输出要求 <output_format> ## 规则 1. <约束条件> 2. ... ## 示例 输入: <example_input> 输出: <example_output> ``` ### 生成/创作类 ``` ## 角色 <persona> ## 背景 <context> ## 任务 <what to generate> ## 格式要求 <format constraints> ## 风格指南 <style rules> ## 示例 <optional few-shot examples> ``` ### 分析/推理类(Chain-of-Thought) ``` ## 任务 <task> ## 分析步骤 1. 第一步:<what to analyze> 2. 第二步:<what to deduce> 3. 第三步:<final conclusion> ## 输出格式 <output_format> ``` ### 代码生成类 ``` ## 任务 <code generation task> ## 技术栈 <language, framework, version> ## 要求 - <fu