Domain 3 — Claude Code Configuration & Workflows (20%)
How to configure and operate Claude Code: built-in tools, CLAUDE.md memory, plan mode, sessions, slash commands, skills, hooks, and subagents — plus CI/CD usage.
Subtopics to cover
- Built-in tools and exploration — Grep, Glob, Read, Edit, MultiEdit, Write, Bash, Task.
- CLAUDE.md and memory — hierarchy, imports, path scoping.
- Plan mode and sessions — plan vs. direct, plan vs. extended thinking, session flags.
- Slash commands, skills, hooks, permissions.
- Subagents in Claude Code.
- CI/CD workflows.
Key concepts
Built-in tools and exploration
- Grep — search file contents. Glob — search filenames. Read — a known file. Edit — targeted change. MultiEdit — several edits. Write — full file replacement. Bash — tests/commands. Task — delegation to a subagent.
- Exploration workflow: grep for identifiers → read matches → follow imports → trace paths → summarize findings.
- File references like
@src/payments/repository.tspoint Claude at concrete examples.
CLAUDE.md and memory
- Hierarchy: root
CLAUDE.md(repo-wide) → subdirectoryCLAUDE.md(area-specific) → userCLAUDE.md(personal, global). @importslet you reuse content without duplication.- Path scoping is done by
CLAUDE.mdplacement, not YAML frontmatter — put area rules in that area’s directory. /memoryinspects what memory is currently loaded.- Don’t bloat global memory with workflow-specific checklists — those belong in a slash command or a scoped file.
Plan mode and sessions
- Plan mode fits multi-file changes, architectural work, migrations, anything needing approval, and exploration. Direct execution fits small, localized changes.
- Invoke with
--permission-mode plan. - Plan mode (workflow control) ≠ extended thinking (reasoning quality) — different levers.
- Session flags:
--continue(latest session),--resume/-r(a specific session),--session-id(a UUID),--fork-session(branch off). - Sessions store the conversation transcript, not filesystem state — use git for file isolation; fork a session to try an alternative approach.
- Don’t resume the same session in multiple terminals concurrently.
- When resuming with a modified codebase, state which files changed.
Slash commands, skills, hooks, permissions
- Slash commands encode explicit workflows (
/review,/release-notes,/migration-plan). Project commands are shared; user commands are personal. - Agent Skills use a
SKILL.mdwith frontmatter; they can fork context and restrict tools. - Hooks fire at lifecycle points:
PreToolUse(before a tool call),PostToolUse(after),UserPromptSubmit(on user input),SessionStart.PreToolUseenforces hard rules: allow/deny, require approval, defer, inject context, modify input.- Hooks execute as shell commands — real security implications.
Subagents in Claude Code
- Subagents have separate context, focused prompts, limited tools.
- A subagent does not inherit the parent conversation — the parent must restate facts.
AgentDefinitionsets the subagent’s role and tool access; define a clear output contract for the parent.
CI/CD
- Claude Code in CI/CD does automated code review, test generation, and PR feedback.
- Tune output formatting and minimize false positives — a noisy reviewer gets ignored.
Common pitfalls (distractor patterns)
- Using YAML frontmatter to scope
CLAUDE.mdrules instead of placing the file in the right directory. - Bloating global memory with occasional workflow details.
- Assuming a subagent inherits project context.
- Resuming the same session in multiple terminals.
- Forgetting the Task/Agent tool in the parent’s
allowedTools. - Not specifying which files changed when resuming with a modified codebase.
- Confusing plan mode with extended thinking.
Interview / exam angle
- “A rule should only apply to
services/billing/— where does it go?” — In aCLAUDE.mdinsideservices/billing/. Path scoping is by file placement. - “Big multi-file migration — plan mode or direct?” — Plan mode; direct execution is for small localized edits.
- “You need to hard-block any
rm -rfthe agent attempts — prompt or hook?” — APreToolUsehook that denies it. Prompts don’t enforce. - “Search for where a function is called vs. find files named
*.test.ts?” — Grep for the calls (contents), Glob for the filenames.
See also: ../01_agentic_architecture_orchestration/README.md (orchestration patterns), ../02_tool_design_and_mcp/README.md (MCP scope precedence).
Interview angle
- “How do you make an agent behave consistently across a team?” - project-level configuration checked into the repository, so conventions, allowed tools and workflows travel with the code rather than living in each person’s local setup.
- “Where do hooks belong?” - deterministic enforcement that must not depend on the model choosing to comply: formatting, linting, blocking a dangerous command. Anything you would be unhappy to see skipped belongs in a hook, not a prompt.
- “Subagent or one context?” - a subagent when the work is separable and would otherwise flood the main context with intermediate output. The cost is that the subagent’s reasoning is not visible to the parent, so it needs a clean, well-specified return.
- “How do you keep permissions safe without making it unusable?” - allow the reversible things broadly, require confirmation for the irreversible ones. A configuration that prompts on everything trains people to approve without reading.