← ClaudeAtlas

prompt-engineeringlisted

Writes, rewrites, reviews, and audits prompts and system prompts using Anthropic's current official guidance, and selects the right model and effort level for the task before drafting. Use when the user asks to write a prompt, improve or fix a prompt, design a system prompt, or check a prompt before running a task — including phrasings like "帮我写 prompt"、"改一下这个 prompt"、"设计 system prompt"、"处理任务之前先检查我的 prompt"、"帮我把需求整理成 prompt"、"help me prompt this better". Applies whether the resulting prompt will be pasted into Claude Code for a coding task or run in a desktop chat or Cowork session for a non-coding task. Also use when the user pastes a prompt and asks why it is not working, when they are authoring an agent system prompt or CLAUDE.md, or when they ask which model or effort level to use. Several widely repeated prompt techniques are now obsolete or rejected by the API, so consult this skill even when prompting from memory feels sufficient.
ZHOUCOOKIE/prompt-engineering-skill · ★ 2 · AI & Automation · score 65
Install: claude install-skill ZHOUCOOKIE/prompt-engineering-skill
# 写 prompt 的规范 **适用模型**:Claude Opus 5 和 Claude Fable 5(含 Mythos 5)。更早模型的专属指引不在本文件范围内。 **这份 skill 存在的理由**:一批广为流传的 prompt 技法在这两个模型上已经失效、被 API 拒绝、或效果反了。你的训练直觉里很可能仍带着它们。**当直觉与第 3 节冲突时,以本文件为准。** **基准**:Anthropic 官方文档与官方/员工公开材料,快照日期 2026-07-25。涉及具体 API 参数时回原文档确认——那是唯一会随模型更新的地方。 --- ## 0. 工作流 1. **判断目标场景**(第 1 节)——决定读哪个 target 参考文件 2. **自行选定模型和 effort**(第 2 节)——不要把这个问题丢回给用户 3. **补齐缺失变量**(第 1 节末尾)——只问真正问不出就写不了的 4. **起草**:读对应 target 文件;需要现成模块时再读 `references/snippets.md` 5. **过第 7 节自检** 6. **交付**:prompt 本体 + 一段交付说明。说明包含五件事——选了哪个模型和 effort、替用户做了哪些假设、哪里最可能需要调、有没有只有用户能补的信息、**如果 prompt 里嵌了英文官方片段,提醒用户不要翻译它们**。能压到两三句就两三句;**假设较多时如实写长,不要为了"简短"把假设藏起来**——用户看不到假设就没法判断要不要改。 --- ## 1. 先判断场景 用户在 Claude desktop 里描述需求,产出的 prompt 会去两个地方之一。**先判断去哪儿,因为写法差别很大。** | 信号 | 场景 | 读这个文件 | |---|---|---| | 涉及代码库、文件、git、跑测试、重构、修 bug、建项目;用户说要拿去 Claude Code 或 VS Code 跑 | **A:给 Claude Code 的任务 prompt** | `references/for-claude-code.md` | | 研究、分析、写作、整理资料、做文档表格幻灯片、日程、信息汇总;在 desktop chat 或 Cowork session 里直接跑 | **B:给 chat 或 Cowork 的任务 prompt** | `references/for-chat-and-cowork.md` | | 用户在聊天途中丢来一段 prompt 问"这样写行不行" | **C:临时检查** | 见第 6 节,走轻量流程 | 判断不了时按用户描述里的**动词**判断:动代码用 A,其余用 B。两边都沾(例如"分析这个仓库的技术债并写成报告")时按**最终交付物**判断——交付物是代码改动走 A,是文档走 B。 ### 补齐变量 只问真正问不出就写不了的。缺失但能从上下文合理推断的,**直接假设并在交付时说明**,不要为了严谨把问题丢回去。 下表的"必须确定"指的是**这个值必须有明确结论**,不是"必须开口问"。能从上下文推断就推断,推断了就在交付说明里写清楚。 | 变量 | 要求 | |---|---| | **成功标准** | **必须确定**。没有可判定的成功标准就写不出好 prompt,也没法自检 | | **输出形态与长度** | 交付物是文档或报告时**必须确定**。Opus 5 默认输出偏长,不明说就会超长 | | **可用的工具或文件*