Claude Code Operation: CCDV-F study guide
CCDV-F · Claude Code, topic weight 3.1% of the exam
Claude Code Operation is the only topic in Domain 3, Claude Code, so its 3.1% is the whole domain. It tests whether you can run Claude Code day to day: put each customisation in the right component, manage sessions, use slash commands, and run without a person at the keyboard.
What the official guide covers
The Claude Certified Developer Foundations exam guide (version 1.0, effective July 2026) describes this topic as Claude Code's core components, its features, the CLAUDE.md hierarchy, repository initialisation and settings.json configuration:
| What the guide lists | What it means in practice |
|---|---|
| Core components: Rules, Skills, Commands, Agents, Agent Memory | Where each lives, when it loads, what it is for |
| Session management | Continue, resume, name, branch and clear conversations |
| Built-in and custom slash commands | Use the built-ins and write your own as skills |
| Headless mode and streaming mode | Run claude -p with JSON or streamed JSON output |
| Auto mode | A permission mode where a classifier reviews actions instead of you |
| CLAUDE.md hierarchy and repository initialisation | /init writes a starting CLAUDE.md; hierarchy is in CCAR-F 3.1 |
| settings.json configuration | Covered on Configuration Management |
The five components and where they live
| Component | Location | When it loads | Use it for |
|---|---|---|---|
| Rules | .claude/rules/*.md (project) and ~/.claude/rules/ (personal) | At start, or only for matching files if it has a paths field | Topic conventions, such as testing rules |
| Skills | .claude/skills/<name>/SKILL.md and ~/.claude/skills/<name>/SKILL.md | The description at start; the body when invoked | Repeatable workflows |
| Commands | .claude/commands/<name>.md | When you type /<name> | Older format, now merged into skills; still works |
| Agents (subagents) | .claude/agents/*.md and ~/.claude/agents/ | When Claude delegates or you name one | Work needing its own context or narrow tools |
| Agent memory (auto memory) | ~/.claude/projects/<project>/memory/, indexed by MEMORY.md | Every session (the start of MEMORY.md) | Notes Claude writes from your corrections |
A skill and a command file with the same name create the same slash command; skills add supporting files and frontmatter such as description, disable-model-invocation, allowed-tools and context: fork. You write CLAUDE.md, Claude writes auto memory, and /memory edits the first and toggles the second. Both are context, not enforcement; to block an action every time, use a hook.
Why Claude Code skips a rule you wrote
When an instruction is ignored, the cause is usually where it lives, not how it is worded:
| Symptom | Cause | Fix |
|---|---|---|
| A path restriction near line 350 of CLAUDE.md is broken | The file grew into a log; every line dilutes the rest | Keep each CLAUDE.md under about 200 lines (the docs' target); move history out and narrow guidance to path-scoped rules. An @import still loads at launch, so it organises but does not shrink |
A rule in .claude/rules/database/ loads in every session | Folders only organise rules; scoping comes from paths frontmatter | Add a paths list; a rule without one loads at launch like CLAUDE.md |
| Project conventions are missing from a delegated search | The built-in Explore and Plan subagents leave out CLAUDE.md and git status to stay fast | Delegate to general-purpose or a custom subagent when the rules must apply |
| A custom subagent ignores a team skill | Subagents do not inherit the parent's skills | List the skill in the subagent's skills frontmatter |
| A "never touch" rule is still broken sometimes | CLAUDE.md is context, not enforcement | Add a deny rule or a PreToolUse hook |
A path-scoped rule looks like this; it loads only when Claude reads or edits a matching file:
---
paths:
- "src/db/**/*.sql"
---
Every SQL change in src/db opens and commits an explicit transaction.
Repository initialisation
Run /init in a new repository. Claude reads the codebase and writes a CLAUDE.md with build commands, test instructions and conventions. If one exists, /init suggests improvements instead of overwriting it. With CLAUDE_CODE_NEW_INIT=1, it runs an interactive flow that also offers skills and hooks. Commit the result.
Session management
| You want to | Use |
|---|---|
| Continue the most recent conversation in this folder | claude -c (or --continue) |
| Return to a specific conversation | claude -r <id or name> or /resume |
| Give a session a name you can resume by | claude -n "auth-refactor" or /rename |
| Try a different direction and keep the original | /branch, or --fork-session with --resume |
| Start fresh with an empty context | /clear |
| Free context but keep the same conversation | /compact (optionally with focus instructions) |
| Undo to an earlier point in conversation or code | /rewind |
| Keep working until a stated condition holds | /goal <condition>; the checker reads only the conversation, so name a check whose result Claude prints, such as a test run |
| Run a saved prompt in the cloud on a schedule, an HTTP call or a GitHub event | /schedule to create a routine |
Slash commands
Built-in commands most likely to appear on the exam:
| Command | What it does |
|---|---|
/init | Writes a starting CLAUDE.md for the project |
/memory | Edits CLAUDE.md files and toggles auto memory |
/compact | Summarises the conversation to free context |
/model | Switches model and saves it as your default |
/permissions | Manages allow, ask and deny rules |
/status | Shows version, model, account and which settings sources loaded |
Custom slash commands are skills you write; in headless mode, put /skill-name in the prompt string. Skills from a plugin are prefixed with the plugin's name, so run-tests in a plugin called payments runs as /payments:run-tests; two plugins can ship the same skill name without a clash, and renaming a plugin renames every command it ships.
Headless and streaming mode
claude -p "<prompt>" runs once without the interface and exits non-zero on failure. Output formats:
--output-format text(default): plain text.--output-format json: one object withresult,session_id, cost and usage;--json-schemaadds checked data instructured_output.--output-format stream-json: newline-delimited JSON events, with--verbose; add--include-partial-messagesfor tokens as they are generated.
--input-format stream-json lets a program send messages on stdin. --bare turns off auto-discovery of CLAUDE.md, auto memory, hooks, skills, plugins and MCP servers, so a script behaves the same on every machine; it is recommended for scripts and needs ANTHROPIC_API_KEY. CI use is covered in CCAR-F 3.6.
#!/usr/bin/env bash
set -euo pipefail
# First pass: review a diff, no prompts, JSON result
out=$(git diff origin/main...HEAD | claude --bare -p "List bugs in this diff. Bugs only." \
--allowedTools "Read" \
--permission-mode dontAsk \
--max-turns 5 \
--output-format json)
echo "$out" | jq -r '.result'
session_id=$(echo "$out" | jq -r '.session_id')
# Follow-up in the same session
claude --bare -p "Suggest one test per bug." --resume "$session_id" --output-format json | jq -r '.result'
# Live view for a dashboard: stream text tokens as they arrive
claude --bare -p "Explain the last build failure in build.log" --allowedTools "Read" \
--output-format stream-json --verbose --include-partial-messages |
jq -rj 'select(.type == "stream_event" and .event.delta.type? == "text_delta") | .event.delta.text'
Auto mode and the other permission modes
A permission mode sets what Claude can do without asking. Switch with Shift+Tab or start with --permission-mode.
| Mode | What runs without asking | Best for |
|---|---|---|
default (shown as Manual) | Reads only | Reviewing every action |
acceptEdits | Reads, file edits, common file commands | Iterating on code you review |
plan | Reads (plus classifier-approved commands where auto mode is available); no source edits until you approve | Exploring before changing |
auto | Everything, with a classifier reviewing actions in the background | Long tasks with fewer prompts |
dontAsk | Reads and pre-approved tools; anything else is denied | Locked-down CI and scripts |
bypassPermissions | Everything | Isolated containers and VMs only |
In auto mode a second model, the classifier, reviews actions and blocks risky ones by default, such as force pushes, production deploys and sending sensitive data out. Repeated blocks make Claude Code fall back to prompting. The docs warn that auto mode reduces prompts but does not guarantee safety. The classifier judges whether an action is risky, not whether the code works, so pair an unattended run with a Stop hook that runs the tests and exits 2 on failure, which sends Claude back to work. A defaultMode of auto is ignored in project settings files; set it in user or managed settings or pass --permission-mode auto.
Pick the mode by asking what breaks if an action runs unchecked, not by how many prompts you want to avoid. Two details catch people out:
acceptEditsalso approvesrm,rmdir,mv,cpandsedon paths inside the working directory. A broad pattern can delete files there with no prompt; onlydefaultmode asks first.bypassPermissionsdrops the protected-path prompts too, so writes to repository and Claude configuration go through. Deny rules still block in every mode, so set them on sensitive directories before you relax the mode.
For unfamiliar or high-stakes code, work in three phases: explore and plan in plan mode, review the plan for paths you did not expect, then switch mode to let the edits run.
| Situation | Choose | Why |
|---|---|---|
| Convention for test files everywhere | Rule with a paths glob | Loads only for matching files |
| Release workflow you trigger by name | Skill with disable-model-invocation: true | Runs only when you call it |
| Verbose analysis | Subagent or skill with context: fork | Separate context; summary returns |
| Same script result on every machine | claude --bare -p | Ignores local configuration |
| Live token output in another tool | stream-json with --verbose and --include-partial-messages | Emits events as they are generated |
| Long task, few prompts, some guardrails | Auto mode | Classifier reviews actions |
Rules that decide exam answers
- Skills load on demand; CLAUDE.md always loads. Universal standards go in CLAUDE.md or rules, task workflows in skills; new commands belong in
.claude/skills/, though.claude/commands/still works. -pfor no-human runs. Use--output-format jsonto parse, orstream-jsonwith--verbosefor live events.- Branch to explore, compact to save space. Only
/branchkeeps the original conversation intact. - Auto mode is a classifier, not a guarantee. It screens risk, not correctness: hard rules need deny rules or hooks, tests need a
Stophook, and unattended CI suitsdontAskwith allow rules. - Bare mode for reproducible scripts. Without
--bare,-ploads the same local configuration as an interactive session. - Scope comes from frontmatter, not folders. A rule needs
pathsto load selectively, and a subagent needsskillsto see a skill.
Where it appears in the exam
Domain 3, Claude Code, is 3.1% of the exam and is this one topic, so expect one or two items out of 53. Questions describe a developer using Claude Code (a filling context window, a script that needs machine-readable output) and ask for the right component, command or flag.
Two sample questions
These are original Timo practice questions. They are not official exam questions.
Build exercise
- Run
/init, then add a rule with apathsfield and confirm it loads only for matching files. - Turn a prompt you type often into a skill and call it from
claude -p "/name". - Run the script above on a real diff, with and without
--bare, and compare. - Name a session with
-n,/branchit, and move between branches with/resume.
Practise this topic
- Claude Certified Developer practice exam: free, 20 questions, no sign-up
- CCDV-F study guide: all topics
- Worked example: CLAUDE.md hierarchy
- Same topic in another exam: 3.1 CLAUDE.md hierarchy
- Previous topic: Configuration Management
- Next topic: Debugging and Error Handling
Sources
- Claude Certified Developer Foundations Exam Guide, version 1.0, effective July 2026 (Anthropic), Domain 3 topic: Claude Code Operation
- Claude Code documentation: Run Claude Code programmatically
- Claude Code documentation: Commands
- Claude Code documentation: How Claude remembers your project
- Claude Code documentation: Choose a permission mode
By Amotion AI