Skip to content

搞英语 → 看世界

翻译英文优质信息和名人推特

Menu
  • 首页
  • 作者列表
  • 独立博客
  • 专业媒体
  • 名人推特
  • 邮件列表
  • 关于本站
Menu

Claude Code:代理编码的最佳实践

Posted on 2025-04-20

Claude Code:代理编码的最佳实践

Anthropic 提供了大量关于如何从Claude Code CLI 编码代理工具中获得最佳结果的新文档,其中包括以下令人着迷的技巧:

我们建议使用“思考”一词来触发扩展思维模式,这为克劳德提供了额外的计算时间来更彻底地评估替代方案。这些特定短语直接映射到系统中不断增加的思维预算水平:“思考”<“认真思考”<“更加努力思考”<“超思考”。每个级别都会分配逐渐更多的思考预算供克劳德使用。

显然超思考是一个神奇的词!

我很好奇这是否是克劳德模型本身或特别是克劳德代码的一个特征。 Claude Code 不是开源的,但您可以查看它的混淆 JavaScript,并通过Prettier运行它来稍微减少混淆。在克劳德的帮助下,我使用了这个食谱:

 mkdir -p /tmp/claude-code-examine cd /tmp/claude-code-examine npm init -y npm install @anthropic-ai/claude-code cd node_modules/@anthropic-ai/claude-code npx prettier --write cli.js

然后使用ripgrep搜索“ultrathink”:

 rg ultrathink -C 30

并找到了这段代码:

令B = W 。信息。内容。转为小写( ) ; 如果(   B.​包括( “更加努力地思考” ) ||   B.​包括( “认真思考” ) ||   B.​包括( “想得更久” ) ||   B.​包括( “认真思考” ) ||   B.​包括( “认真思考” ) ||   B.​包括( “认真思考” ) ||   B.​包括( “超思考” ) )   返回(     l1 ( "tengu_thinking" , { tokenCount : 31999 , messageId : Z ,提供者: G } ) ,     31999   ) ; 如果(   B.​包括( “考虑一下” ) ||   B.​包括( “想很多” ) ||   B.​包括( “深入思考” ) ||   B.​包括( “认真思考” ) ||   B.​包括( “多想” ) ||   B.​包括( “megathink” ) )   返回(     l1 ( "tengu_thinking" , { tokenCount : 1e4 , messageId : Z ,提供者: G } ) , 1e4   ) ; if ( B .包括( “思考” ) )   返回(     l1 ( "tengu_thinking" , { tokenCount : 4000 , messageId : Z ,提供者: G } ) ,     4000   ) ;

所以,是的,看起来“ultrathink”是一个 Claude Code 功能 – 大概 31999 是一个影响代币思维预算的数字,特别是因为“megathink”映射到 1e4 代币(10,000),而简单的“think”映射到 4,000。

通过@HamelHusain

标签:人类、克劳德、人工智能辅助编程、 LLM 推理、生成人工智能、人工智能、 LLMS

原文: https://simonwillison.net/2025/Apr/19/claude-code-best-practices/#atom-everything

本站文章系自动翻译,站长会周期检查,如果有不当内容,请点此留言,非常感谢。
  • Abhinav
  • Abigail Pain
  • Adam Fortuna
  • Alberto Gallego
  • Alex Wlchan
  • Answer.AI
  • Arne Bahlo
  • Ben Carlson
  • Ben Kuhn
  • Bert Hubert
  • Bits about Money
  • Brian Krebs
  • ByteByteGo
  • Chip Huyen
  • Chips and Cheese
  • Christopher Butler
  • Colin Percival
  • Cool Infographics
  • Dan Sinker
  • David Walsh
  • Dmitry Dolzhenko
  • Dustin Curtis
  • eighty twenty
  • Elad Gil
  • Ellie Huxtable
  • Ethan Marcotte
  • Exponential View
  • FAIL Blog
  • Founder Weekly
  • Geoffrey Huntley
  • Geoffrey Litt
  • Greg Mankiw
  • Henrique Dias
  • Hypercritical
  • IEEE Spectrum
  • Investment Talk
  • Jaz
  • Jeff Geerling
  • Jonas Hietala
  • Josh Comeau
  • Lenny Rachitsky
  • Liz Danzico
  • Lou Plummer
  • Luke Wroblewski
  • Matt Baer
  • Matt Stoller
  • Matthias Endler
  • Mert Bulan
  • Mostly metrics
  • News Letter
  • NextDraft
  • Non_Interactive
  • Not Boring
  • One Useful Thing
  • Phil Eaton
  • Product Market Fit
  • Readwise
  • ReedyBear
  • Robert Heaton
  • Rohit Patel
  • Ruben Schade
  • Sage Economics
  • Sam Altman
  • Sam Rose
  • selfh.st
  • Shtetl-Optimized
  • Simon schreibt
  • Slashdot
  • Small Good Things
  • Taylor Troesh
  • Telegram Blog
  • The Macro Compass
  • The Pomp Letter
  • thesephist
  • Thinking Deep & Wide
  • Tim Kellogg
  • Understanding AI
  • 英文媒体
  • 英文推特
  • 英文独立博客
©2025 搞英语 → 看世界 | Design: Newspaperly WordPress Theme