用 Fable 5.2 改进代码库 / 项目的 Prompt 合集
By 陈成 · Published November 10, 2026 · Updated November 11, 2026
新模型发布后,社区都用哪些 prompt 让 Fable 5.2 审计和改进代码库?
整理时间:2026-11-10(Fable 5.2 发布当天) 来源:X 书签、X 搜索、Reddit r/ClaudeAI 与 r/ClaudeCode、GitHub、Anthropic 官方 prompting guide
TL;DR
- 社区的共识是:新模型一出,就拿同一个 prompt 把所有项目重扫一遍。Fable 5.2 比较擅长在一堆问题里分出哪些是真问题、哪些是噪音。
- 流行的 prompt 大致有五类:全量体检、删繁就简、隐式状态机显式化、审 agent 配置、先审计后出计划(advisor / executor 分离)。
- 评论区最常补的几条:先只读、先列清单再动手、没测试覆盖的别碰、删了什么要说明理由、在独立分支上跑并和旧模型的结果做 diff。
- 官方 prompting guide 里有个反直觉的技巧(Simon Willison 转出来的):在 prompt 里说 "This codebase is yours",Fable 5.2 就更愿意合并重复代码、顺手修旁边的问题;不说的话,它倾向于在原结构上堆代码、只报告不修。代价是改动范围变大,要看 diff。
- 同一份 guide 的其他要点(第 7 节):长任务容易半路停,官方给了一段 "Finishing work" 片段;谨慎指令会在 memory / 笔记里越积越多,让它不敢动手;为旧模型写的"多用 subagent""别想太多"等指令要重审。
- 成本:一个全量 prompt 可能吃掉 20% 周额度。Reddit 上的 benchmark 讨论认为 Fable 5.2 medium 性价比最好,max 会想太多,成本翻好几倍,效果不升反降。官方的建议是从 high 开始,eval 显示质量不掉的地方再降到 medium。
flowchart LR
A[新模型发布] --> B{选 prompt 类型}
B --> C1[全量体检<br/>Alex Albert]
B --> C2[删繁就简<br/>Anthony Riera]
B --> C3[隐式状态机<br/>Steve Ruiz / Kun Chen]
B --> C4[审 agent 配置<br/>WquGuru / Vox]
B --> C5[审计→计划→廉价模型执行<br/>shadcn /improve]
C1 & C2 & C3 & C4 & C5 --> D[只读:输出带证据的清单]
D --> E[人工审阅 / 打分排序]
E --> F[新分支实施 + 测试兜底]
F --> G[跟旧模型结果 diff<br/>= 私人 eval]
1. 全量体检(Alex Albert,Anthropic)
每次有新模型,他都会在所有项目上跑这一句:
Read this entire project and find everything that's broken, inconsistent, inefficient,
or no longer needed. Fix what you're sure about and list the rest for me to review.
评论区补充(值得加进 prompt):
- @Spocsk:加一句 "Don't touch anything you can't test." 看起来最"显然正确"的修复反而最危险。
- @abdHafizR:加一句 "list what you deleted and why"。
- @LeThinkr:让它确认所谓的 bug 不是有意设计,不确定就继续往下挖。
- @girish_builds:加 "find regression hotspots and add the test coverage"。
- @kasparbuilds:模型眼里的 "no longer needed" 可能包括只有 Stripe 才会调用的 webhook。
- @leehoo48415921:"Fix what you're sure about" 里的 sure 是模型自己判断的,模型越强越自信,没有回归测试兜底就很危险。
- @dani_akash_:每个模型都在新分支上跑一遍,diff 它们各自改了什么,这就是一份私人 eval。
2. 删繁就简(Anthony Riera)
I want you to audit our codebase, is anything here unnecessary, overly complicated in our
current setup, or based on weak assumptions? Challenge them.
- What can be deleted entirely?
- What can be simplified now that unnecessary pieces are gone?
Then make the changes. Prefer deleting over simplifying, simplifying over optimizing,
and optimizing over automating.
This product is being used by thousands of customers, do not cut any corners.
要点是优先级链:删除 > 简化 > 优化 > 自动化(和马斯克的"五步法"同一个思路)。
3. 找隐式状态机(Steve Ruiz 原句,Kun Chen 改进版)
原句(Steve Ruiz):find all of the implicit state machines in my app
Kun Chen 的版本(他称"最能感受 Fable 5.2 实力的 prompt"):
audit and find implicit state machines in this <codebase/directory/module> that would drive
concrete improvements if made explicit. explain before/after of each one and discuss with me
in lavish-axi. fewer words, big visuals
- 加上 "would drive concrete improvements" 是为了过滤噪音,只留能带来实际改进的点。
- 用 lavish-axi 把结果做成可视化页面,可以直接在页面上批注讨论(可选)。
- Warp 官方也转了这个思路:显式状态机能让代码库对 agent 更友好、更好导航。
@RicardoSawir 的变体,同时考虑 UX / DX / AX:
Find all of the implicit state machines in my app (there are probably a ton). Make the best
decision that will elevate all three: the user experience (UX), developer experience (DX),
and agent experience (AX) always, without breaking anything. Also, make state machines explicit.
stateDiagram-v2
direction LR
note left of Before: 隐式:isLoading / isError / data<br/>多个 boolean 组合,可能出现非法状态
Before --> After: Fable 5.2 识别并重构
state After {
idle --> loading
loading --> success
loading --> error
error --> loading: retry
}
4. 审 agent 配置(WquGuru / Vox)
WquGuru(中文圈):
Review my entire agent setup: AGENTS.md, CLAUDE.md, skills, commands, subagents, hooks,
settings/permissions, and MCP servers.
Check for gaps in guardrails and whether it follows current best practices for Fable 5.2.
回复里有人给了个更短的:直接用 /claude-api prompt-audit。
Vox 的长版本,基于 Anthropic 新发的选型指南 Which Claude model should you build with。核心检查三类问题:
- subagent 用错模型:Explore 这类只搜索、只读的 subagent 现在默认跑在主模型上(换成 Fable 5.2 后很贵),建议自定义一个叫
Explore的 subagent,设model: haiku;反过来,要改代码、做判断的 subagent 不该被CLAUDE_CODE_SUBAGENT_MODEL压到小模型上。 - 模型 / effort 和任务不匹配:日常工程用 Opus 5.5 medium,边界清楚的修 bug / 按 spec 开发用 Sonnet 5.5,大重构 / 迁移 / 指挥大量 subagent 用 Fable 5.2。默认 effort 高于 high 要标出来;
opusplan会把改代码的活交给 Sonnet,也要标出来。 - agent 没法自我验证:CLAUDE.md 没写怎么跑测试或构建。指南建议的顺序是:先保证能验证 → 再把 effort 提一档 → 最后才换更大的模型。
最后要求:先给建议,每条都引用你的配置和指南原文,给出可以直接粘贴的最小改动,先别改。完整 prompt 见原帖。
可以再加一份参照:官方 prompting guide 的 7.3(谨慎指令越积越多)和 7.4(为旧模型写的指令)列出了具体要找的问题,让它按这两节逐条对照你的配置。
5. 审计 → 出计划 → 交给便宜模型执行(shadcn /improve)
shadcn 说用 Fable 5.2 跑 /improve 能发现 Opus 5.5 漏掉的问题。安装:npx skills add shadcn/improve
思路是:贵的模型只负责理解代码库、判断哪些值得做、写 spec,不亲自实现,"计划就是产出物"。
flowchart TD
R[Recon<br/>摸清技术栈 / 约定 / build-test-lint 命令<br/>读 ADR、PRD、DESIGN.md] --> A[Audit<br/>并行 subagent 覆盖 9 类:<br/>正确性 安全 性能 测试 技术债<br/>依赖 DX 文档 方向]
A --> V[Vet<br/>advisor 逐条复核 file:line<br/>剔除误报,记录被拒理由]
V --> P[Prioritize<br/>按 影响÷工作量×置信度 排序]
P --> PL[Plan<br/>plans/001-*.md 自包含<br/>每步有验证命令 + STOP 条件]
PL --> X[execute<br/>便宜模型在 worktree 执行<br/>advisor 像 tech lead 一样审 diff]
X --> RC[reconcile<br/>下次会话核对、解阻、清理 backlog]
常用子命令:/improve quick、/improve deep、/improve security、/improve branch(PR 前只审本分支)、/improve next(产品方向建议)、/improve review-plan <file>。
评论区:@_FrenchSalmon 建议把 Opus 写的计划交给 Fable 跑 review-plan,更容易判断它是真找到了漏掉的 bug,还是只是偏好另一种重构;@i_mika_el 提醒新模型对着同一个仓库总能找出点东西,要统计真 bug 和噪音各占多少。
6. 多项目只读审计 + 打分 + 审批页(Techguyver)
号称 20 分钟找出 633 个修复点:
Audit every live project I have. Read-only: change nothing.
1. List my live sites and repos, with real numbers per project (visits, signups, paid).
2. Per project, one agent: walk the live site as a visitor, then read the code. Find what is
broken, inconsistent, wasteful or no longer needed. Every finding needs evidence
(file:line or command + output).
3. Score each finding: gain (1-5) x proof (0-1) / work (1-5). Write the reason for every score.
4. Re-run the top findings yourself before I see them. Say where you were wrong.
5. Build one local page: findings ranked by score, and for each fix the exact diff with
Approve / Change / Drop.
Fix nothing until I approve. Approved fixes go on a branch as a draft PR, never main,
never deployed.
这一条把社区的各种补充基本都写进去了:只读、每条都要证据、打分公式、自我复核、可视化审批、draft PR。
7. 官方 prompting guide 要点(Anthropic《Prompting Claude Fable 5.2》)
Simon Willison 的建议是每次新模型发布都去翻官方的 prompting guide。这份 guide 按"你观察到什么现象 → 看哪一节"组织,下面挑和"改进代码库"相关的部分,原句保留英文方便直接粘贴。
guide 开头有一条容易踩的坑:下面这些 system prompt 改动只在新会话里做。Fable 5.2 对所有账号强制做 prefix 检查,改了 system / tools / 历史消息后再把 thinking block 发回去会返回 400。会话中途要改指令,就写进最新一轮消息。
7.1 告诉它"代码是你的"(Simon Willison 转出来的那条)
原句(出自 Say who owns the code 一节):
This codebase is yours: what it's for and how it's built are your call, and you'll keep building on it.
guide 里的说法:
- 不加这句(或者 prompt 说代码是别人的):模型倾向于在现有结构上继续加代码,哪怕会重复;旁边的问题只报告,不修。
- 加了这句:模型更常合并重复代码,顺手修相关问题。Anthropic 在小型编码任务上测,合并重复代码的比例从不到 1/10 升到约一半。放在很长的 system prompt 里也有效。两种情况下需求本身几乎都能做对。
- 代价:输出 token 约 1.5 倍;会做一些没人要求的改动(多是新测试和文档);除修 bug 外,每 6–10 次里有 1 次改了已有功能的行为,effort 越高越常见。收尾总结只提大改动,小改动经常漏,要看 diff,别只看总结。
- 什么时候别加:代码归用户所有、希望改动越少越好的场景。在 prompt 里另写 "No drive-by refactors, renames or cleanups" 也压不住它,测试中仍有约 1/3 的情况合并了重复代码。
和前面几类 prompt 的关系:第 1、2 类(全量体检、删繁就简)本来就想让模型大胆动结构,加上这句会更彻底;第 6 类这种"先只读、批准后才改"的流程里,它会让模型在审计阶段更愿意提结构性的建议,但实施阶段的范围要靠审批页兜住。
评论区:Simon 自己补了一句,读这些 guide 能明显看出 Anthropic 对自家新模型的怪癖也和大家一样意外。@ShaneBOly 玩梗:"told it 'this codebase is yours' and now it won't let me touch it either"。
7.2 别半路停下(Finish the whole task)
长任务里 Fable 5.2 有时活没干完就结束这一轮:列一份"还剩什么"、问"要不要继续",或者碰到超时这种普通障碍就停。low / medium effort 下更常见。全量体检这类大任务正好会撞上。官方给的 system prompt 片段:
# Finishing work
Please avoid stopping while you still owe work the user asked for. Be persistent and do not stop unless needed.
While status notes are welcome, as is clarifying with the user on open decisions, carry on with work that does not depend on the user's answer without unnecessary stops.
If you notice yourself inviting the user to redirect you or offering to wait, instead proceed on the next part of the task. You may meet ordinary obstacles like errors, timeouts, locked files, empty results or failing tools. Diagnose them first, and when they are not real blockers, work through them with the access you have (wait and retry, fix the request, use another tool or source) rather than stopping unnecessarily.
If someone clearly decided something is a hard blocker, such as a file marked not to be touched, access that was intentionally withheld, or a safety guardrail, leave it alone, say plainly what you found, and look for another safe way to finish the task. Stopping before the task is complete is very rarely merited, as in when the task can't move forward without user input, or where the blocker is deliberate and should not be worked past. This does not override the need for confirmation on risky or destructive actions.
- 关键是区分两种障碍:普通障碍(报错、超时、工具失败)要诊断并绕过去;刻意设的障碍(标了别碰的文件、故意不给的权限、安全护栏)要留着并如实报告。
- 效果:medium effort 回放真实会话,留着可做的活就结束的会话减少约一半。"要不要继续"这类结尾基本消失,但"列完剩余事项再停"这类结尾还在。输出 token 多约 30%。
- 模型问得少了,所以危险或不可逆操作要自己保留确认步骤。
7.3 审批规则要写具体(Approvals / Keep caution from piling up)
- 让它继续时别只回 "continue" 或 "go",要说清楚做什么,比如 "Yes, run the migration on the staging database"。
- system prompt 里的审批规则要点名具体动作,模型会照字面执行。测试里一条规则把"给本对话以外的人发消息"列为需要审批,模型就压下了约一半的日常请求。
- 谨慎类指令会在 memory、笔记、指令文件、agent 之间的消息里越积越多。Fable 5.2 跟得很紧,结果是要不必要的审批、该做的事不做。这种情况多出在多 agent 协作里。官方的做法:
- 删掉过期笔记:十几条旧笔记里有一条"永远别重试",工具忙时的重试率就从接近 100% 掉到约 40%。
- 点名哪些步骤不需要审批:在规则末尾写明"重试不需要审批",重试率从几乎为零升到约一半;只说一句笼统的"放开点做"没有效果。只对可以安全重复的调用这样写。
- 检查 reviewer agent 塞进来的条件:一句 "stop at the first error" 就能让 Fable 5.2 约 1/3 的情况不重试,Fable 5.1 和 Opus 5.5 则照样重试。
- 例外要写进规则本身:另起一行写"已批准的步骤可以执行"基本没用;把"先拿到批准"写进那条 "never" 规则里,执行率从 1/10 升到 9/10。
这一节和第 4 类(审 agent 配置)直接相关:让 Fable 5.2 审 CLAUDE.md / memory 时,可以要求它专门找这几类问题。
7.4 迁移时要重审的旧指令(Review instructions written for earlier models)
为旧模型写的这些指令,在 Fable 5.2 上可能增加成本、带来副作用,或者已经不起作用:
| 旧指令 | 在 Fable 5.2 上的问题 | 建议 |
|---|---|---|
| 常驻的"多用 subagent"指令 | 在本来就鼓励委派的 harness 里,它委派得很积极,subagent 可能占掉大部分 token | 先审 system prompt / skills / agent 文件里的委派语句,还是太多再改 subagent 工具描述 |
| harness 写进 prompt 的 token 预算 | 预算大小会影响它花多少;high / xhigh 下去掉大预算,成本降了、效果不变 | 测一下不带预算的效果 |
| 改历史轮次的 harness 代码 | 会让后面的 thinking block 失效,Messages API 直接拒绝 | 历史只追加,压缩用 context editing / compaction |
| Opus 5.5 guide 里的 "treat that answer as done" | 追问时想得少了,但也几乎不再指出自己之前答案的错误 | 需要它反复检查旧答案的场景别加 |
| "answer directly without deliberating" 这类让它少想的话 | medium 及以上不起作用 | 删掉,改用降低 effort |
| 硬性写作风格规则(如每句 20 词以内) | 跟得太紧,文字变得很碎 | 删掉不需要的,再加 7.5 的片段 |
| 积累下来的规则、笔记、memory | 堆满了谨慎指令,有些还是模型自己写的 | 删掉理由已不成立的,把绝对规则改成写明范围和理由 |
subagent 相关的补充:在 xhigh / max 下,Fable 5.2 会主动用 subagent 审自己的工作(Fable 5.1 不会);早期测试者用它给其他模型当 planner / orchestrator 效果不错,这和第 5 类(shadcn /improve)的思路一致。要查清 harness 默认让 subagent 跑在哪个模型上,这和 Vox 的第 1 条检查是同一件事。
7.5 报告写给没看过过程的人(Make reports easy to follow)
审计类任务最后交出来的是报告,读的人没看过工具调用和文件。官方片段:
# Communicating clearly
Write for an intelligent but low-context reader. The person reading has not seen your tool calls, your reasoning or the files you opened, and may be switching in from other work. Messages should generally be self-contained: the reader should understand what you mean without having to dig for other context. Put the key points in the first few sentences. Practice progressive disclosure in your sentence order, and do not use undefined references and ideas in line 1 that won't make sense until the reader reaches line 12.
Use plain words, and write in clear, understandable full sentences. Do not use a term or abbreviation that you made up during the work. Say what the thing is in a way any reader would understand. Write mostly in the style of ASD-STE100 Simplified Technical English: short sentences, one idea per sentence, active voice, and consistently using the same word for the same thing. Use a paragraph of flowing prose where ideas connect, and keep bullets for lists of separate items. Leave out unnecessary details unless the reader asks and practice concision, but do ensure that your messages have the key context. Aim to make your user-facing text as human-readable and clear as possible.
测试里报告变得没那么密,分号更少,句子更短。
7.6 其他几节(简述)
- 长任务里不说话:先确认客户端能收到进度更新(
thinking.display设为"updates"或"summarized")。有人盯着看时可以加 "Before you start, say in a line what you're about to do; …" 那段,代价是输出 token 多约 20%;改不了 harness 就加一句 "Every few tool calls, give the user a one-line update on where things stand."。 - Safeguard refusals:
stop_reason: "refusal"会带类别(cyber / bio / frontier_llm / reasoning_extraction / general_harms)。安全审计类 prompt 可能误触 cyber 分类器。另外,要求模型把推理写进回复正文会被拒,要看推理就读 summarized thinking。
7.7 官方建议的迁移顺序(Where to start)
- 显式把 effort 设为 high,同时在 medium 和 xhigh 上跑 eval。
- 通读要带过来的 system prompt、skills、agent 文件、memory、笔记、harness 文本,按 7.4 删掉或测试。
- 跑最长的 agentic 任务,记下它在哪里提前停、要不必要的审批、长时间不说话、委派过多,或者在你希望重构的地方往原结构上堆代码。
- 针对观察到的每种问题一次只加一条对策,测效果和 token 成本。
自己用的组合模板(综合以上)
(可选,想让它大胆改结构时加)This codebase is yours: what it's for and how it's built are your call, and you'll keep building on it.
审计这个 <仓库/目录/模块>。先只读,不改任何东西。
1. 先摸清技术栈、约定和 build/test/lint 命令;读已有的 ADR / DESIGN / CLAUDE.md,已经定下来的取舍不要重复报。
2. 找出:坏掉的、不一致的、低效的、不再需要的、基于弱假设的;以及值得显式化的隐式状态机。
3. 每条发现都要有证据(file:line 或 命令+输出),说明影响、工作量、置信度。
打分 = 收益(1-5) × 证据强度(0-1) / 工作量(1-5)。
4. 给我看之前先自己复核前几条,说明哪里判断错了;如果某处看起来像 bug 但可能是有意设计,继续深挖再下结论。
5. 处理优先级:删除 > 简化 > 优化 > 自动化。
6. 用可视化页面展示:before/after、diff,每条可以 Approve / Change / Drop。少字,多图。
批准后在新分支上实施;没有测试覆盖的地方先补测试再改;列出删了什么、为什么删。
长任务在 low / medium effort 下跑时,再把 7.2 的 "Finishing work" 片段放进 system prompt;最终报告给别人看时加 7.5 的 "Communicating clearly" 片段。
成本与 effort 建议
| 观点 | 来源 |
|---|---|
| 一个全量 prompt 吃掉 20% 周额度 | @ryan_ntk、@virattt(Alex Albert 帖评论) |
| Fable 5.2 medium 精度超过 Opus 5.5 high,成本相近,性价比最好;low 基本不用 | r/ClaudeAI 发布帖 |
| max 会过度思考,在 frontier-code 这类惩罚过度工程的 benchmark 上反而掉分;成本从约 $6 涨到约 $50 | r/ClaudeAI 发布帖 |
| 用 orchestrator 先拆任务,再给每个子任务分配模型和 effort | r/ClaudeAI 发布帖 |
| 只读类 subagent(Explore)显式设为 haiku,省主模型额度 | @Voxyz_ai |
| 发布当天订阅用户得到 1-3 次 Fable 额度重置 | r/ClaudeAI 发布帖 |
| 从 high 开始(API 默认);大部分能力提升在 high 已经拿到,eval 显示质量不掉的地方降到 medium;xhigh 分数只略升、token 多很多;max 留给测上限或开放问题 | 官方 prompting guide |
| low / medium 下更容易半路停,跑 agentic 任务要加 "Finishing work" 片段(输出 token 约 +30%) | 官方 prompting guide |
| "This codebase is yours" 让输出 token 约 1.5 倍 | 官方 prompting guide |
| high 及以上连打招呼都会先思考;"直接回答别想"在 medium 以上无效,要省就降 effort | 官方 prompting guide |
| 可以混用:medium 规划和迭代,无人值守的长段再调高 effort | 官方 prompting guide |
参考链接
X 帖子
- Alex Albert,全量体检 prompt:https://x.com/alexalbert__/status/2119884951550386671
- Anthony Riera,删繁就简 prompt:https://x.com/anthonyriera/status/2119870644514893997
- Kun Chen,隐式状态机 + lavish-axi:https://x.com/kunchenguid/status/2119924895060795492
- Steve Ruiz 原句(被引用):https://x.com/steveruizok (2026-10-31)
- Ricardo Sawir,UX/DX/AX 变体:https://x.com/RicardoSawir/status/2119891925671305268
- Warp,状态机让代码库对 agent 更友好:https://x.com/warpdotdev/status/2119926128945340752
- WquGuru,审 agent 配置:https://x.com/wquguru/status/2119962410056642797
- Vox,按官方选型指南审 Claude Code 配置:https://x.com/Voxyz_ai/status/2119943123250078141
- shadcn,用 Fable 5.2 跑 /improve:https://x.com/shadcn/status/2119879610724720702
- Techguyver,多项目审计 633 个修复点:https://x.com/techguyver/status/2119975465855377740
- Simon Willison,"This codebase is yours":https://x.com/simonw/status/2120029347948220500
GitHub / 官方
- shadcn/improve:https://github.com/shadcn/improve
- kunchenguid/lavish-axi:https://github.com/kunchenguid/lavish-axi
- Which Claude model should you build with:https://claude.dev/blog/which-claude-model-should-you-build-with
- Prompting Claude Fable 5.2(官方 prompting guide):https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-2
- Anthropic 发布页:https://www.anthropic.com/claude-fable-and-mythos-5-2
- r/ClaudeAI「Fable 5.2 just landed」:https://www.reddit.com/r/ClaudeAI/comments/1xs0dct/fable_52_just_landed/
- r/ClaudeCode「Introducing Claude Fable 5.2 and Claude Mythos 5.2」:https://www.reddit.com/r/ClaudeCode/comments/1xs0i9s/introducing_claude_fable_52_and_claude_mythos_52/
- 注:Reddit 上关于"用 Fable 5.2 改进代码库的 prompt"的专门讨论很少,两个发布帖主要在聊 effort 和成本、降智周期、额度重置。