提供专为 Claude Sonnet 5 设计的 Agent 任务拆解、可复用系统提示词生成、自主任务简报以及根因排错提示词,通过结构化契约和明确验收条件最大化模型的 Agent 执行效率。
适合的任务:复杂工作流拆解、自主 Agent 任务简报制定、系统提示词反向提炼、线上故障根因分析与代码自测。
不适合的任务:无明确边界的开放式闲聊、无需结构化输出的一句话日常问答。
适用的模型版本:Claude Sonnet 5(API 及各大客户端)。
适用的客户端、Agent 或 API:Claude Code、Cursor、Cline、Claude Web/Desktop 及自建 Agent 框架。
推荐的推理档位和参数:任务分解与架构分析推荐 high;常规代码修复与测试生成推荐 medium。
Here is a workflow I do manually: [DESCRIBE THE STEPS, TOOLS, FREQUENCY, TIME COST].
Decompose it: which steps are deterministic (automate with code/rules), which need judgment but follow patterns (delegate to an AI agent with a prompt), and which genuinely need me. For the agent-able steps, write the reusable prompt. For the code-able steps, name the simplest tool. Estimate hours saved per month and the maintenance cost I am signing up for.I do this task repeatedly: [DESCRIBE TASK + PASTE 1-2 EXAMPLES OF GOOD OUTPUT].
Write a reusable system prompt that would make an AI produce output like my examples every time. Include: role, the quality bar defined by observable properties (not adjectives), format contract, edge-case handling rules, and the banned failure modes you can infer from what my examples deliberately avoid. Keep it under 250 words so it stays maintainable.Write a task brief for an AI agent that will work autonomously on: [THE TASK].
Include: the goal with a measurable done-condition, the inputs and where they live, hard constraints (what it must never do), decision rules for the 3 most likely ambiguities it will hit, when to stop and ask versus proceed, and the exact format of the final report. Assume the agent is capable but literal — every unstated assumption becomes a wrong guess.You are a senior [LANGUAGE/STACK] engineer debugging a production issue.
Symptom: [WHAT HAPPENS — error message, wrong output, timing]
Expected: [WHAT SHOULD HAPPEN]
Code: [PASTE THE RELEVANT FUNCTION(S) ONLY]
Reason about the failure path before proposing anything. List the 3 most likely root causes ranked by probability, the one-line check that would confirm each, and the fix for the top candidate. Do not suggest rewriting the whole module.确定任务契约:明确任务目标、确定输入输出格式及禁绝的失败模式。
复制提示词模板:替换模板中的 [BRACKETS] 占位符为具体业务上下文。
首轮执行:将提示词输入 Claude Sonnet 5,要求先输出执行计划与推理路径。
验证与迭代:根据 Sonnet 5 给出的结构化检查清单验证输出,必要时触发后续子步骤。
来源指出:在 Sonnet 5 上直接套用泛化提示词容易产生冗余思考或过于发散的回答,而结构化模板(明确角色、上下文约束、可观测质量门禁、输出契约)能让 Sonnet 5 保持高生产级首轮采纳率。
强调 Sonnet 5 拥有更强的指令遵循与自动纠错能力,但在面对模糊指令时倾向于过度生成辅助代码,因此必须在提示词中显式加入约束(如“Do not suggest rewriting the whole module”)。
提示词中的约束规则必须具体明确;若使用主观形容词(如“写得更好”),Sonnet 5 可能会花费额外 token 循环自检却无法提升核心指标。
在超长上下文场景下,需将核心约束置于提示词开头或结尾,避免中间信息衰减。
来源指出:“Claude Sonnet 5 is the model we route 80% of our work through... near-frontier output at a speed and cost that turns 'should I ask the AI?' into a non-question.”
Claude Sonnet 5