Claude Code Configuration & Workflows

Roughly 20% of the exam.

Memory: CLAUDE.md

CLAUDE.md is project memory loaded into context at session start — build commands, conventions, architecture notes, the "why" behind the structure. It is hierarchical:

  • ~/.claude/CLAUDE.md — personal, applies to every project.
  • Project root CLAUDE.md — checked in, shared with the team.
  • Nested CLAUDE.md in subdirectories — guidance scoped to that subtree.
  • @path/to/file inside any CLAUDE.md imports another file, letting you split memory across organized files.

Settings files

  • .claude/settings.json — project settings, committed, shared with the team.
  • .claude/settings.local.json — personal overrides, git-ignored. Extra permissions, machine-specific config.
  • ~/.claude/settings.json — user-global settings across projects.

Permissions

Tool calls run behind a permission system. Allow rules (e.g. Bash(npm test*)) remove prompts for trusted operations while everything else stays gated. Plan mode is the read-only end of the spectrum: Claude researches and proposes an approach, and edits start only after you approve the plan. Bypassing permissions entirely is the opposite end — every action, including destructive shell commands, executes without review. Reserve it for sandboxed or disposable environments.

Hooks

Hooks are shell commands the harness runs at lifecycle events — PreToolUse (can block or modify a tool call before it runs), PostToolUse, UserPromptSubmit, SessionStart, Stop, and friends. The exam-grade insight: automated "every time X happens, do Y" behaviors belong in hooks because the harness enforces them deterministically; a CLAUDE.md instruction relies on the model remembering to comply.

Slash commands & skills

Markdown files in .claude/commands/ become project slash commands (the filename is the command, the body is the prompt template); ~/.claude/commands/ holds personal ones. Skills extend the same idea with richer, on-demand instructions the model loads when relevant.

Subagents

A subagent runs a task in its own isolated context window with its own prompt, tool access, and optionally a different model, returning only a summary to the parent. Custom subagent definitions live in .claude/agents/. Use them to keep exploratory noise out of the main thread or to fan out across independent work.

MCP in Claude Code

Project-scoped MCP servers are declared in a checked-in .mcp.json at the repository root, so the whole team shares the same servers. User-scoped servers can be added to personal config instead.

Sessions & automation

  • /compact condenses a long conversation while keeping key context; /clear wipes it.
  • claude -p "prompt" runs headless — a single prompt, printed result, no interactive session. The building block for CI gates and scripting.
  • Big refactor? Plan mode first, approve the plan, then execute with normal permissions — the human decision lands on the approach, before any edit.

→ Drill this domain in practice mode

Independent community study resource — not affiliated with or endorsed by Anthropic. Claude is a trademark of Anthropic, PBC. All study material and practice questions here are original, written from Anthropic's public documentation. Everything runs in your browser; nothing you answer is stored or transmitted.