◂ LibraryChecked 2026-10-20
Official-source review · local examples · 2026-10-20

Claude Code guide

Updated from official documentation on 2026-10-20. This localized digest covers the current essentials; the Chinese edition contains the detailed commentary.

01 / 19

Context, tools and execution location

Claude Code combines a model, context and tools. CLI, IDE, desktop and cloud do not necessarily read the same environment or authentication backend. Confirm where code and tools execute.

依据:Official reference

02 / 19

Five working principles

Give the goal, scope, evidence and acceptance criteria. Plan when there is a material design choice. Keep changes focused, verify the current result and report uncertainty. Authorization to implement does not automatically include publishing.

依据:Official reference

03 / 19

Recent changes and version boundaries

Official release notes checked show 2.1.304 on October 19, 2026; the local installation was 2.1.283 and was not upgraded. Newer features such as allowedProviders must not be assumed available locally.

依据:Official reference

04 / 19

Install and verify

Use the official channel for your platform. Native installations and Homebrew have different update mechanisms and release channels. Check version and help, then use /status after sign-in. Native Windows and WSL have different tool and sandbox support.

依据:Official reference

05 / 19

Command reference

claude -p runs noninteractively; JSON and stream-json are different formats. Check --help for schema, budget and permission flags. Use auth status, mcp list and doctor for their separate purposes. /status lists loaded setting sources, not each key winner.

依据:Official reference

06 / 19

Input and shortcuts

Esc interrupts generation; Ctrl+O expands the transcript. Mode switching and multiline keys depend on the terminal and current configuration. Use the official interactive reference and inspect host shortcut conflicts.

依据:Official reference

07 / 19

Choose extensions by need

Use CLAUDE.md for standing guidance, skills for reusable workflows, MCP for external tools, subagents for independent context, hooks for events and plugins for distribution. Validate the source and required permissions.

依据:Official reference

08 / 19

Skills, hooks, MCP and subagents

Check skill frontmatter and paths, hook matchers and failure behavior, MCP transport and OAuth, and each agent role model and tools. Shared .mcp.json and personal MCP settings have distinct scopes. Do not copy old nesting or quota numbers.

依据:Official reference

09 / 19

Usage, costs and context

Consult /usage and /context for different measurements. Subscription plans do not make Console or cloud-provider calls free. /compact does not refund usage. Background execution and parallel agents may add costs.

依据:Official reference

10 / 19

Images, artifacts and computer use

Claude web artifacts and computer-use capabilities are not synonymous with the terminal toolset. Confirm the tools, account and execution machine, then verify the requested file format and interactions.

依据:Official reference

11 / 19

Eight engineering scenarios

Repository exploration, incident analysis, bug fixes, features, refactoring, review, documentation and CI require different evidence. Link findings to active sources and choose validation that proves the outcome.

依据:Official reference

12 / 19

Context and memory

Keep stable team guidance in CLAUDE.md and scoped rules. Auto memory and compressed context can be stale or incomplete. A new session does not reset usage, and resuming an old session can consume context.

依据:Official reference

13 / 19

Permissions, rules and sandbox

Permission rules and OS isolation are separate layers. Deny rules take priority over allows. Current auto and bypassPermissions defaults cannot be enabled through project or local settings. File-tool rules alone are not a universal secret-access barrier.

依据:Official reference

14 / 19

Settings and authentication

Managed settings precede CLI --settings, local project, shared project and user settings. Environment precedence is decided per key; arrays have exceptions. Authentication includes subscriptions, Console, API credentials, cloud providers and enterprise gateways. Desktop/cloud do not simply inherit CLI helpers.

依据:Official reference

config.toml →

15 / 19

Working with Codex and other tools

Assign an implementer and a reviewer against the same base. Configuration and hook semantics differ between tools. Preview migration with claude import codex --dry-run, then inspect the proposed changes before applying them.

依据:Official reference

16 / 19

Common pitfalls

Check version and loaded sources before deleting settings or logging in again. A custom base URL does not choose billing or credentials. Manually created local settings must be ignored by Git. Compression does not promise fixed savings.

依据:Official reference

17 / 19

A reusable task brief

State the outcome, allowed scope, invariants, evidence and checks. Request a concrete result with validation and limitations. For review-only work, explicitly prohibit edits and supply the comparison baseline.

依据:Official reference

18 / 19

Local diagnostics

Use claude --version, --help, auth status, doctor and mcp list. Safe mode, when supported, disables customizations while managed policy still applies. Do not share raw tokens, credential files or full environment values.

依据:Official reference

19 / 19

Sources and verification scope

Checked on 2026-10-20 against official documentation and local help. No personal configuration, login, provider, permission or installed version was changed. Real gateway and account behavior still requires target-environment validation.

依据:Official reference