Glean 拾遗
Recent picks

1pick · chronological

07-02

Steering Claude Code: CLAUDE.md, skills, hooks, rules, subagents and more

This official guide from Claude Code maps out seven mechanisms for injecting instructions: CLAUDE.md, rules (with optional path scoping to save tokens), skills (dynamically loaded on invocation), subagents (fully isolated context, ideal for side tasks), hooks (deterministic triggers with low context cost), output styles (highest instruction weight, but replace defaults), and append-system-prompt (additive but has diminishing returns). It details when each loads, its context cost, and typical use cases. Key advice: use hooks for deterministic behavior over CLAUDE.md, skills for multi-step procedures, path-scoped rules for API-specific constraints, and managed settings for non-overridable guardrails. Aimed at engineers customizing Claude Code for production workflows.

claude.com · 11 min · Agent Architecture · Ai Tooling · Claude Code