Glean 拾遗
日刊 /2026-07-18 / 让 Fable 自行判断:节省 Claude Code token 的实战技巧

让 Fable 自行判断:节省 Claude Code token 的实战技巧

原文 simonwillison.net 收录 2026-07-18 06:00 阅读 2 min
AI 解读

Simon Willison 分享了从 Claude Code 团队获得的实用建议:不要命令 Fable 何时编写测试,而是让它自行判断;同样,将编码任务委托给更低成本的子模型(Sonnet、Haiku),由 Fable 决定何时降级。在 Claude Code 即将涨价之际,这一技巧尤为实用。他展示了通过记忆文件配置,让主模型在处理每个编码任务时自主选择合适模型并派生子代理。实测表明,这能在保持开发效率的同时显著降低 Fable token 消耗。文章适合所有使用 Claude Code 并关注成本控制的开发者。

原文 2 分钟
原文 simonwillison.net ↗
§ 1

One of the most interesting tips I got from the Fireside Chat I hosted with Cat Wu and Thariq Shihipar from the Claude Code team at AIE on Wednesday was to let Fable (and to a certain extent Opus) use their own judgement rather than dictating how they should work.

周三,我在与 Claude Code 团队的 Cat Wu 和 Thariq Shihipar 进行的炉边谈话中,得到了一个最有趣的建议:让 Fable(以及一定程度上 Opus)自行判断工作方式,而不是指令性地规定它们该如何工作。

§ 2

The example they gave was testing. You can tell Fable "only use automated testing for larger features, don't update and run tests for small copy or design changes" - but it's better to just tell Fable to use its own judgement when deciding to write tests instead.

他们举的例子是测试。你可以告诉 Fable“只为较大的功能使用自动化测试,不要为小的文案或设计更改更新和运行测试”——但更好的做法是,直接让 Fable 在决定是否编写测试时自行判断。

§ 3

Jesse Vincent just gave me a related tip to help avoid burning too many of those valuable Fable tokens in the few days we left before the prices go up. Tell Fable to use other models for smaller tasks, applying its own judgement about which model to use.

Jesse Vincent 刚刚给了我一个相关的建议,帮助我们在涨价前的最后几天避免消耗太多宝贵的 Fable token。告诉 Fable 将较小的任务改用其他模型,并自行判断该用哪个模型。

§ 4

I prompted Claude Code just now with:

For all coding tasks use your judgement to decide an appropriate lower power model and run that in a subagent

Claude saved this memory file in ~/.claude/projects/name-of-project/memory/delegate-coding-to-subagents.md:


name: delegate-coding-to-subagents description: Simon wants coding tasks delegated to subagents running an appropriately lower-power model metadata: node_type: memory type: feedback originSessionId: 30068d78-43a9-4fb1-bb29-9799e18c526a

Stated by Simon on 2026-07-03: "For all coding tasks use your judgement to decide an appropriate lower power model and run that in a subagent."

我刚刚向 Claude Code 这样指令:

“对于所有编码任务,使用你的判断来决定一个合适的较低功率模型,并在子代理中运行它。”

Claude 将这个记忆文件保存在了 ~/.claude/projects/name-of-project/memory/delegate-coding-to-subagents.md:


name: delegate-coding-to-subagents description: Simon wants coding tasks delegated to subagents running an appropriately lower-power model metadata: node_type: memory type: feedback originSessionId: 30068d78-43a9-4fb1-bb29-9799e18c526a

由 Simon 于 2026-07-03 声明:“对于所有编码任务,使用你的判断来决定一个合适的较低功率模型,并在子代理中运行它。”

§ 5

Why: cost/efficiency — implementation work rarely needs the top-tier model; judgment, review, and synthesis stay with the main loop.

How to apply: when a task in this project is primarily writing/editing code, spawn an Agent with a model override (sonnet for substantive implementation, haiku for trivial/mechanical edits) and a self-contained prompt; review the result in the main loop before committing. Design, auditing, data synthesis, and anything judgment-heavy stays in the main model. See also [[project-goals]].

理由:成本/效率——实现类工作极少需要顶级模型;判断、审核和综合工作留在主循环中。

应用方式:当该项目中的任务主要是编写/编辑代码时,生成一个 Agent,使用模型覆盖(sonnet 用于实质性实现,haiku 用于琐碎/机械性编辑)和一个自包含的提示;在提交之前,在主循环中审查结果。设计、审计、数据合成以及任何涉及大量判断的工作都留在主模型中。参见 [[project-goals]]。

§ 6

So far it seems to be working well. I'm getting a ton of work done and my Fable allowance is shrinking less quickly than before.

目前看来效果不错。我完成了大量工作,而我的 Fable 额度消耗速度比以前慢了。

打开原文 ↗