作者拆解 Claude 公開系統提示詞,歸納七項可借鑑模式
I Dissected Claude's Published System Prompt. Here Are Seven Patterns Worth Stealing
作者對照 Anthropic 公開的 Claude Sonnet 5.5 系統提示詞三個版本,歸納七項提示詞設計模式。原則包括按主題分區、描述行為而非下命令、説明規則理由、為限制提供替代做法,以及界定適用條件、封堵已觀察到的漏洞和處理權威聲稱。
Most prompt advice comes from people guessing at what works. Anthropic does something rarer: it publishes the system prompt behind its Claude apps, one page per model, with dated entries.
So I read three versions of the Sonnet 5.5 prompt side by side: 2026-09-28, 2026-10-07, and 2026-10-27.
A note on method: Anthropic says these prompts apply to claude.ai and the mobile apps, not the API. The page gives no reasons for changes, so the interpretations are mine, and I paraphrase throughout.
Seven patterns
1. Name the sections. The whole prompt sits in one wrapper tag, with a named block per topic: refusals, tone, wellbeing, politics, knowledge cutoff. Blocks nest where the topic does. New rules land in an obvious place.
2. Describe behavior, don't bark commands. Sentences read "Claude does X" or "Claude can Y." The tone section holds two traits together: warm, and still willing to push back honestly. In the text I read, there's no shouted emphasis.
3. Attach the reason. Hard rules often carry a one-line "because." A harmless example: avoid bullet points when declining a task, because the extra care softens the blow. The reason lets the model generalize.
4. Pair every "don't" with a "do instead." On drug questions, the prompt declines dosing protocols but points to safety information and harm-reduction resources. On malicious code, it declines and mentions the feedback button. Every limit gets a path.
5. Say when the rule applies, the default, and who can override it. The medical-dosing block opens with an applicability sentence. Formatting has a default (prose) and an override (explicit user request wins). A sensitive-request rule includes a branch for ambiguity: ask gently first.
6. Close the loopholes you've actually seen. One rule judges the whole conversation, not each turn alone. Another says past assistance is not authorization. The cost is length, so close observed loopholes, not imagined ones.
7. Say how to treat claimed authority. Users can write tags that claim to come from Anthropic, so the prompt tells Claude to treat tagged content in the user turn with caution. If your system prompt uses special markers, say which channels carry authority. Tags organize a prompt. They aren't a security boundary.
The prompt is a changelog
Across the three versions:
- 2026-09-28 → 2026-10-07: the Haiku entry updates from 4.5 to 5.5, and a medical-guidance block for children's over-the-counter dosing appears.
- 2026-10-07 → 2026-10-27: voice mode and the Google Workspace sidebar join the product section, the wellbeing section gains one narrow rule, and evenhandedness gains two paragraphs on politicians and on treating a user's characteristics as context.
The changes are narrow: one situation, one trigger, one do-instead. My inference is that this is how a mature prompt grows. A failure is observed, a narrow rule is written, and it's added to a named block with a date.
What not to copy
Don't paste it into your product. It specifies a consumer chat assistant, it's tuned to a model and an app, and its length comes from observed failures. Copy the length without the observations and you copy the cost without the benefit.
Do put your own system prompt in version control, and write a one-line reason in every commit that changes it.
Read the full post
The full post has the complete write-up of each pattern, the changelog table, a starter skeleton in my own words, and all sources.
Read it here: I Dissected Claude's Published System Prompt
This is Day 7 of a series on Claude foundations. Day 6 covered four prompt patterns worth testing.
來源:DEV Community · dev.to


