跳到主内容
@wquguru
精选86VoxAI 产品与模型

Claude Code 技巧:用 Opus 5.5 做顾问审查代码

𝗖𝗹𝗮𝘂𝗱𝗲 𝗖𝗼𝗱𝗲 𝘁𝗶𝗽: before you hand a long task to Opus 5.5, put a second Opus 5.5…

原文
发到 X
推荐理由

这篇展示了具体的 AI 工作流设计,有清晰的架构图解和可执行的配置代码,结构完整且具备实操参考价值。

𝗖𝗹𝗮𝘂𝗱𝗲 𝗖𝗼𝗱𝗲 𝘁𝗶𝗽: before you hand a long task to Opus 5.5, put a second Opus 5.5 on call with /advisor to check its work.

𝗖𝗹𝗮𝘂𝗱𝗲 𝗖𝗼𝗱𝗲 技巧:在将长任务交给 Opus 5.5 之前,先用 /advisor 调用第二个 Opus 5.5 来检查其工作。

Run /advisor opus and Claude Code gets 𝗮𝗻 𝗮𝗱𝘃𝗶𝘀𝗼𝗿 𝗼𝗻 𝘁𝗵𝗲 𝘀𝗶𝗱𝗲𝗹𝗶𝗻𝗲𝘀. The main Opus keeps doing the work and usually calls the advisor in at three moments: → Before committing to a plan: is it right? → When the same error keeps coming back: am I heading the wrong way? → Before saying "done": did I miss anything? Each time it's called in, the advisor reads the whole session from scratch before giving advice. The main Opus and its subagents still write the code. The official docs describe this pairing as "a second Opus reviews the first," useful for high-stakes tasks.

运行 /advisor opus,Claude Code 就会获得一个 𝗮𝗻 𝗮𝗱𝘃𝗶𝘀𝗼𝗿 𝗼𝗻 𝘁𝗵𝗲 𝘀𝗶𝗱𝗲𝗹𝗶𝗻𝗲𝘀(侧边顾问)。主 Opus 继续执行工作,通常会在三个时刻调用顾问: → 在承诺执行计划前:这个计划对吗? → 当同一个错误反复出现时:我是否走错了方向? → 在说“完成”之前:我有没有遗漏什么? 每次被调用时,顾问都会从头开始阅读整个会话,然后再提供建议。主 Opus 及其子代理仍然负责编写代码。官方文档将这种配对描述为“第二个 Opus 审查第一个”,适用于高风险任务。

The tree is the full setup. Opus 5.5 on high runs the main session. The helpers run on Sonnet 5.5 and Haiku 5.5 for speed: Haiku reads code and looks up docs, and Sonnet edits and runs tests. They're hooked up to the same advisor, so when they get stuck, they can ask Opus too. Hand the tree and this prompt to Claude Code to set it up 👇

该树结构代表完整的设置。高负载模式下的 Opus 5.5 运行主会话。辅助程序在 Sonnet 5.5 和 Haiku 5.5 上运行以提升速度:Haiku 负责读取代码和查阅文档,Sonnet 负责编辑和运行测试。它们都连接到同一个顾问,因此当它们卡住时,也可以向 Opus 提问。将该树结构和此提示词交给 Claude Code 以进行设置 👇

"Set up my Claude Code to match this tree: 1. For the three subagents, reuse fitting ones from ~/.claude/agents and .claude/agents, and propose new ones only for missing roles. Set the ones that read code and look up docs to model: haiku, the one that edits and runs tests to model: sonnet, and all three to effort: medium. Leave any subagent that already sets a model different from the tree alone, and list it. 2. In ~/.claude/settings.json, set Opus 5.5's effort to high under modelSettings, as "modelSettings": {"claude-opus-5-5": {"effortLevel": "high"}}. A top-level effortLevel in this file doesn't apply to Opus 5.5, so leave it as it is. 3. Check for environment variables that turn the advisor off (CLAUDE_CODE_DISABLE_ADVISOR_TOOL, or DISABLE_TELEMETRY and anything else that stops flag fetching), CLAUDE_CODE_EFFORT_LEVEL, which overrides every subagent's effort, and CLAUDE_CODE_SUBAGENT_MODEL_FORCE, which forces every subagent onto one model. Report them; don't change them. Also tell me what advisorModel is set to now. If my Claude Code is older than 2.1.293, tell me (before that version, haiku still means Haiku 4.5), and don't upgrade it yourself. 4. Add one rule to ~/.claude/CLAUDE.md: ask the advisor before committing to a big plan, when the same error shows up a second time, and before calling a long task done.

"按照以下树结构设置我的 Claude Code: 1. 对于三个子代理,请从 ~/.claude/agents 和 .claude/agents 中复用合适的代理,仅针对缺失的角色提出新的代理。将负责读取代码和查阅文档的代理设置为 model: haiku,将负责编辑和运行测试的代理设置为 model: sonnet,并将所有三个代理的 effort 设置为 medium。保留任何已设置与树结构中不同模型的子代理不变,并将其列出。 2. 在 ~/.claude/settings.json 中,在 modelSettings 下将 Opus 5.5 的 effort 设置为 high,即 "modelSettings": {"claude-opus-5-5": {"effortLevel": "high"}}。此文件顶层的 effortLevel 不适用于 Opus 5.5,因此保持原样。 3. 检查是否存在关闭顾问的环境变量(CLAUDE_CODE_DISABLE_ADVISOR_TOOL,或 DISABLE_TELEMETRY 以及任何其他阻止标志获取的变量),覆盖所有子代理 effort 的 CLAUDE_CODE_EFFORT_LEVEL,以及强制所有子代理使用单一模型的 CLAUDE_CODE_SUBAGENT_MODEL_FORCE。报告这些变量;不要更改它们。另外告诉我当前的 advisorModel 设置为何值。如果我的 Claude Code 版本低于 2.1.293,请告诉我(在此版本之前,haiku 仍指 Haiku 4.5),并且不要自行升级。 4. 在 ~/.claude/CLAUDE.md 中添加一条规则:在承诺执行大型计划前、同一错误第二次出现时,以及在宣布长任务完成前,询问顾问。"

Show me the changes first. Don't edit any files yet."

先向我展示更改内容。暂时不要编辑任何文件。"

https://code.claude.com/docs/en/advisor

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件