中文
← Back to news
ToolsJun 23, 2026

Anthropic Releases Claude Code Tuning Guide: A Detailed Look at Seven Customization Mechanisms

Anthropic's official blog has published a tuning guide for Claude Code, detailing seven customization mechanisms to help developers precisely control AI assistant behavior. These mechanisms include CLAUDE.md file, rules, skills, subagents, hooks, output styles, and append-system-prompt. The guide categorizes them across three dimensions: loading timing, context overhead, and execution permissions, and provides specific usage recommendations.

Overview of the Seven Mechanisms

Anthropic presents a summary table of the seven mechanisms, each corresponding to three core dimensions: when instructions enter the context, whether they persist after long session compression, and permission level. These mechanisms are not mutually exclusive but form a well-defined toolbox.

  • CLAUDE.md: A Markdown file placed in the project root directory, loaded at session start and persistent. Suitable for global instructions like build commands, directory layout, and coding conventions. Recommended to keep under 200 lines and assign a reviewer for changes.
  • rules: Placed in the .claude/rules/ directory, providing specific constraints. The main difference from CLAUDE.md is path control capability, using the paths field to limit loading timing and avoid wasting tokens on irrelevant sessions.
  • skills: Placed in the .claude/skills/ directory, as folder-based collections of instructions, scripts, and resources. Only names and descriptions are loaded at session start; the body is loaded on demand. Suitable for procedural instructions like deployment workflows and code review processes.
  • subagents: Placed in the .claude/agents/ directory, defining isolated assistants for specific subtasks. The body runs in a separate context window and does not enter the main conversation. Suitable for subtasks like deep search and log analysis that could fill the context.
  • hooks: User-defined commands, HTTP endpoints, or LLM prompts that provide deterministic control triggered by lifecycle events. Low context overhead, configured outside the main context window.
  • output styles and append-system-prompt: Used to control output format and append system prompts, with further details elaborated in the guide.

Core Principles for Choosing Mechanisms

Anthropic emphasizes three questions when selecting a mechanism: Does the instruction need to persist after long session compression? Is it worth the cost of staying in the context? Is deterministic control needed over model autonomous judgment?

  • For persistence needs, use CLAUDE.md or global rules.
  • For path-limited needs, use rules with paths or subdirectory CLAUDE.md.
  • For procedural instructions, use skills instead of CLAUDE.md to save context.
  • For isolated subtasks, use subagents to avoid filling the main conversation with intermediate results.
  • For deterministic control, use hooks for precise behavior.

Practical Application Tips

The guide also provides pitfalls to avoid:

  • Keep CLAUDE.md concise; move team-specific conventions to path-limited rules and procedural content to skills.
  • In monorepos, configure subdirectory CLAUDE.md for each team directory to avoid global loading.
  • Organization-level standards can be deployed via MDM or configuration management tools.
  • When using subagents, up to five levels of nesting are supported, enabling orchestration of dozens to hundreds of background agents, suitable for large-scale tasks like dependency auditing.

Other Updates

On the same day, Anthropic also announced that usage limits for all Claude Cowork paid users have been doubled (lasting one month), and released a 23-page product guide covering seven work scenarios. Unlike chat AI, Cowork runs on the desktop, can read and write local files, connect to external services via MCP, and supports parallel processing with sub-agents. Anthropic data shows that lawyers are one of the most active user groups of Cowork, as it excels at repetitive tasks like contract review and clause comparison.

Also available in 中文.