TimoBy Amotion AI

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 listsWhat it means in practice
Core components: Rules, Skills, Commands, Agents, Agent MemoryWhere each lives, when it loads, what it is for
Session managementContinue, resume, name, branch and clear conversations
Built-in and custom slash commandsUse the built-ins and write your own as skills
Headless mode and streaming modeRun claude -p with JSON or streamed JSON output
Auto modeA 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 configurationCovered on Configuration Management

The five components and where they live

ComponentLocationWhen it loadsUse it for
Rules.claude/rules/*.md (project) and ~/.claude/rules/ (personal)At start, or only for matching files if it has a paths fieldTopic conventions, such as testing rules
Skills.claude/skills/<name>/SKILL.md and ~/.claude/skills/<name>/SKILL.mdThe description at start; the body when invokedRepeatable workflows
Commands.claude/commands/<name>.mdWhen 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 oneWork needing its own context or narrow tools
Agent memory (auto memory)~/.claude/projects/<project>/memory/, indexed by MEMORY.mdEvery 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:

SymptomCauseFix
A path restriction near line 350 of CLAUDE.md is brokenThe file grew into a log; every line dilutes the restKeep 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 sessionFolders only organise rules; scoping comes from paths frontmatterAdd a paths list; a rule without one loads at launch like CLAUDE.md
Project conventions are missing from a delegated searchThe built-in Explore and Plan subagents leave out CLAUDE.md and git status to stay fastDelegate to general-purpose or a custom subagent when the rules must apply
A custom subagent ignores a team skillSubagents do not inherit the parent's skillsList the skill in the subagent's skills frontmatter
A "never touch" rule is still broken sometimesCLAUDE.md is context, not enforcementAdd 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 toUse
Continue the most recent conversation in this folderclaude -c (or --continue)
Return to a specific conversationclaude -r <id or name> or /resume
Give a session a name you can resume byclaude -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:

CommandWhat it does
/initWrites a starting CLAUDE.md for the project
/memoryEdits CLAUDE.md files and toggles auto memory
/compactSummarises the conversation to free context
/modelSwitches model and saves it as your default
/permissionsManages allow, ask and deny rules
/statusShows 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 with result, session_id, cost and usage; --json-schema adds checked data in structured_output.
  • --output-format stream-json: newline-delimited JSON events, with --verbose; add --include-partial-messages for 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.

ModeWhat runs without askingBest for
default (shown as Manual)Reads onlyReviewing every action
acceptEditsReads, file edits, common file commandsIterating on code you review
planReads (plus classifier-approved commands where auto mode is available); no source edits until you approveExploring before changing
autoEverything, with a classifier reviewing actions in the backgroundLong tasks with fewer prompts
dontAskReads and pre-approved tools; anything else is deniedLocked-down CI and scripts
bypassPermissionsEverythingIsolated 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:

  • acceptEdits also approves rm, rmdir, mv, cp and sed on paths inside the working directory. A broad pattern can delete files there with no prompt; only default mode asks first.
  • bypassPermissions drops 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.

SituationChooseWhy
Convention for test files everywhereRule with a paths globLoads only for matching files
Release workflow you trigger by nameSkill with disable-model-invocation: trueRuns only when you call it
Verbose analysisSubagent or skill with context: forkSeparate context; summary returns
Same script result on every machineclaude --bare -pIgnores local configuration
Live token output in another toolstream-json with --verbose and --include-partial-messagesEmits events as they are generated
Long task, few prompts, some guardrailsAuto modeClassifier 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.
  • -p for no-human runs. Use --output-format json to parse, or stream-json with --verbose for live events.
  • Branch to explore, compact to save space. Only /branch keeps 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 Stop hook, and unattended CI suits dontAsk with allow rules.
  • Bare mode for reproducible scripts. Without --bare, -p loads the same local configuration as an interactive session.
  • Scope comes from frontmatter, not folders. A rule needs paths to load selectively, and a subagent needs skills to 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.

Question 1

A developer runs Claude Code from a script and wants an internal dashboard to show Claude's answer token by token while it is being written. Which invocation fits?

Answer: C. Streamed JSON with partial messages emits text deltas as they are generated. A returns one object at the end. B adds logging to text output without a parseable event stream. D changes how input is sent, not how output arrives.

Question 2

After an hour of analysis in Claude Code, a developer wants to try a risky refactoring approach. If it fails, they want to return to the conversation exactly as it stands now. What should they do?

Answer: B. /branch creates a branch of the conversation, switches into it and preserves the original, which they can return to with /resume. A starts without the hour of analysis. C summarises the same conversation, leaving no untouched original. D moves back in time instead of keeping both paths.

Build exercise

  1. Run /init, then add a rule with a paths field and confirm it loads only for matching files.
  2. Turn a prompt you type often into a skill and call it from claude -p "/name".
  3. Run the script above on a real diff, with and without --bare, and compare.
  4. Name a session with -n, /branch it, and move between branches with /resume.

Practise this topic

Sources