Getting startedBuild with Claude CodeAdministrationConfigurationReferenceAgent SDKWhat's NewResources
核心贡献 · Key contributions
Claude Code 是一个智能体式编码环境,能自主读取文件、运行命令并实现解决方案。 Claude Code is an agentic coding environment that autonomously reads files, runs commands, and implements solutions.
管理上下文窗口至关重要;随着上下文填满,性能会下降,需要采用 /clear 和子智能体等策略。 Managing the context window is critical; performance degrades as context fills, requiring strategies like /clear and subagents.
提供可运行的检查(测试、构建、截图)可闭合验证循环,实现无人值守的迭代。 Providing a runnable check (test, build, screenshot) closes the verification loop, enabling unattended iteration.
通过计划模式将研究/规划与实现分离,可减少解决错误问题的情况。 Separating research/planning from implementation via plan mode reduces solving the wrong problem.
CLAUDE.md 文件提供持久上下文;保持简洁并纳入版本控制可提高遵循度。 CLAUDE.md files provide persistent context; keeping them concise and version-controlled improves adherence.
使用子智能体进行隔离任务和验证可保留主上下文并提高结果质量。 Using subagents for isolated tasks and verification preserves main context and improves result quality.
局限 · Limitations
随着上下文窗口填满,性能会下降;长时间会话可能导致遗忘或错误。 Performance degrades as context window fills; long sessions may cause forgetting or mistakes.
自主模式可能在没有适当检查的情况下产生看似合理但错误的实现。 Autonomous mode may produce plausible but incorrect implementations without proper checks.
过于详细的 CLAUDE.md 文件会导致重要规则因噪音而被忽略。 Over-specified CLAUDE.md files cause important rules to be ignored due to noise.
子智能体审查者可能报告误报;追逐每个发现会导致过度工程化。 Subagent reviewers may report false positives; chasing every finding leads to over-engineering.
指南中的模式是起点;最佳使用需要随着时间的推移培养个人直觉。 The guide's patterns are starting points; optimal use requires developing personal intuition over time.
论文章节 · Sections(共 41)
概述Overview
在本页On this page
Claude Code 最佳实践Best practices for Claude Code
给 Claude 一个验证工作的方式(https://www.anthropic.com/engineering/claude-code-best-practices#give-claude-a-way-to-verify-its-work)