Path-scoped rule
A markdown file in .claude/rules/ whose paths globs decide when it loads.
Exam context: A convention for one kind of file should not occupy every turn. When: Tests, Terraform, or another subtree has rules the rest of the repo does not. When not: The fact is true for every edit. Put that in project CLAUDE.md.
See also: 3.1 Claude Code Operation
Skill
A directory with SKILL.md that becomes a slash command and loads when used.
Exam context: The body is a metered context cost, not a permanent one. When: A multi-step procedure the team runs sometimes. When not: A one-line naming rule, or a tool ban that must be enforced.
See also: 3.1 Claude Code Operation
Slash command
Input that starts with /. Built-ins manage the session. Custom ones are skills or .claude/commands/ files.
Exam context: Repeating the same prompt by hand drifts, and the session controls already exist. When: You need /init, /compact, /memory, or a team procedure. When not: You are looking for a permission gate. A command is still a prompt.
See also: 3.1 Claude Code Operation
Subagent
A focused Claude instance defined under .claude/agents/ or the user agents directory.
Exam context: Its transcript does not fill the parent window, and its tools can be narrower. When: A subtask is self-contained and would dump pages of tool output. When not: The worker needs the whole parent conversation. Fork, or put the facts in the spawn prompt.
See also: 3.1 Claude Code Operation
Auto memory
Notes Claude writes under the user projects directory. The MEMORY.md index loads first, within 200 lines or 25KB.
Exam context: Corrections survive the next launch without a commit. When: A preference is yours and should not become the team's file. When not: A clone must see the instruction. That is project CLAUDE.md.
See also: 3.1 Claude Code Operation
Session
One conversation transcript, resumable by id or name unless persistence is off.
Exam context: History and project memory answer different questions. When: Continue unfinished work, or isolate a new task with /clear. When not: You wanted a shared convention. Clearing the session does not edit CLAUDE.md.
See also: 3.1 Claude Code Operation
CLAUDE.md hierarchy
Managed, user, project, and local instruction files concatenated into context.
Exam context: There is a load order and no override chain. Conflicts are not resolved by scope. When: You are deciding who sees an instruction after clone, and what loads together. When not: You need the client to refuse a tool. Use settings or a hook.
See also: 3.1 Claude Code Operation
settings.json
JSON configuration with a real precedence stack: managed, session flags, local, shared project, user.
Exam context: The client applies it whether or not the model agrees. When: Permissions, hooks, and other keys that must hold. When not: You are explaining coding style. That can stay in CLAUDE.md.
See also: 3.1 Claude Code Operation
Print mode
claude -p runs one prompt and exits. text, json, and stream-json choose how the caller reads the result.
Exam context: CI has no terminal prompt to approve. When: A script or pipeline should run Claude Code and parse the output. When not: A person is reviewing a plan interactively. Use a normal session and plan mode.
See also: 3.1 Claude Code Operation
Auto mode
A permission mode where a classifier approves routine actions and escalates the rest.
Exam context: It is hands-off without being the same as skipping every check. When: You want fewer prompts and still want risky actions reviewed. When not: The job runs unattended in CI. Use an allow-list and dontAsk or a sandboxed bypass, not a classifier waiting on a person.
See also: 3.1 Claude Code Operation