# Claude Code Operation — Practice reading

Exam: CCDV-F — Claude Certified Developer - Foundations
Knowledge domain: Claude Code
HTML: https://learningpathx.com/learning-path/CCDV-F/learn/413

This public learning practice includes correct answers and existing explanations. Reading does not save progress or create a test.

## Question 1

Type: multiple\_choice
Knowledge point: Rules, Skills, Commands, Agents, and Agent Memory

Which two slash commands help manage a Claude Code session’s context or history? (Choose 2.)

### Options

**A**

/deploy

**B**

/publish

**C**

/compact

**D**

/resume

Correct answer: C, D

### Explanation

* A. /deploy is not the session-history command described here.
* B. /publish does not manage Claude Code conversation context.
* C. /compact summarizes prior context while preserving specified important information.
* D. /resume restores a session from its history.

## Question 2

Type: multiple\_choice
Knowledge point: Rules, Skills, Commands, Agents, and Agent Memory

Which two statements correctly describe CLAUDE.md in a project? (Choose 2.)

### Options

**A**

Its core project rules can remain at the top of the prompt buffer during compaction.

**B**

It can contain workspace-level directives.

**C**

It replaces the need for every source file.

**D**

It is only a temporary terminal transcript.

Correct answer: A, B

### Explanation

* A. Core project rules in CLAUDE.md are preserved to support context and prompt caching.
* B. CLAUDE.md is used for workspace-level directives.
* C. It provides guidance, not a replacement for the codebase.
* D. It is a persistent project instruction file, not a transcript.

## Question 3

Type: single\_choice
Knowledge point: Rules, Skills, Commands, Agents, and Agent Memory

A project skill should run when a user explicitly invokes it, but Claude must not invoke it automatically. Its current SKILL.md begins:

```yaml
---
name: release-notes
description: Write release notes from the reviewed change list
---
```

Which frontmatter addition selects the documented invocation behavior?

### Options

**A**

`user-invocable: false`

**B**

`context: fork`

**C**

`allowed-tools: Read`

**D**

`disable-model-invocation: true`

Correct answer: D

### Explanation

Invocation control and execution context are separate mechanisms. The requested user-only initiation uses the documented disable-model-invocation field.

## Question 4

Type: single\_choice
Knowledge point: Rules, Skills, Commands, Agents, and Agent Memory

Which documented Claude Code permission mode is intended for researching and proposing an implementation before editing, rather than immediate unrestricted implementation?

### Options

**A**

auto

**B**

bypassPermissions

**C**

default

**D**

plan

Correct answer: D

### Explanation

Plan mode supports a research-and-proposal phase before implementation. Its actual permission behavior has documented exceptions; the mode name does not establish a universal read-only guarantee.

## Question 5

Type: single\_choice
Knowledge point: Rules, Skills, Commands, Agents, and Agent Memory

Which command analyzes a repository and creates a starter project memory manifest?

### Options

**A**

/init

**B**

/clear

**C**

/context

**D**

/cost

Correct answer: A

### Explanation

* A. /init analyzes the repository and writes a starter CLAUDE.md manifest.
* B. /clear resets active conversation memory.
* C. /context visualizes token consumption.
* D. /cost displays cost information.

## Question 6

Type: single\_choice
Knowledge point: Session management and slash commands

Which Claude Code slash command starts a new conversation and can optionally label the previous conversation for later resume?

### Options

**A**

/clear

**B**

/compact

**C**

/cost

**D**

/context

Correct answer: A

### Explanation

/clear starts a new conversation and can label the previous one for later resume. Normally enabled persistent project memory still loads; this is not deletion of every saved memory or a guarantee of an immutable checkpoint.

## Question 7

Type: single\_choice
Knowledge point: Session management and slash commands

Why would a developer use /compact before the context window is exhausted?

### Options

**A**

To summarize history while retaining crucial instructions and reduce context use

**B**

To grant broader filesystem permissions

**C**

To install a new MCP server

**D**

To change the active model automatically

Correct answer: A

### Explanation

Compaction reduces retained history while preserving selected important context. A focused conversation summary frees context while retaining useful information. Compaction is a lossy summary, so important facts must be preserved and checked. Root project instructions are reloaded under the documented memory behavior; arbitrary prior details are not guaranteed retained.

## Question 8

Type: single\_choice
Knowledge point: Session management and slash commands

In a Claude Code terminal session using the archived current command contract, the developer wants to inspect what occupies the context window before deciding whether to shorten the conversation. The repository also has a project-root `CLAUDE.md`. Which command and interpretation fit this immediate task?

### Options

**A**

Run /compact; it only displays context usage

**B**

Run /clear; it keeps the active conversation and only hides its display

**C**

Run /context; inspection does not itself summarize the conversation

**D**

Run /compact; it summarizes the conversation and removes project-root CLAUDE.md

Correct answer: C

### Explanation

The documented command distinction is inspection with /context and conversation summarization with /compact. Repository instructions are a separate persistent file, so inspecting context is not a file deletion operation.

## Question 9

Type: single\_choice
Knowledge point: Session management and slash commands

Which interactive Claude Code slash command resumes a saved conversation by its session ID or name?

### Options

**A**

/context

**B**

/resume \[session-id\]

**C**

/compact \[instructions\]

**D**

/init

Correct answer: B

### Explanation

/resume restores state from a selected or specified session history. /resume supports conversation ID/name, not proven specified history-file path.

## Question 10

Type: multiple\_choice
Knowledge point: Session management and slash commands

Which two statements about /compact \[instructions\] are correct? (Choose 2.)

### Options

**A**

It permanently deletes the repository.

**B**

It can preserve specified architectural rules and file paths.

**C**

It restarts the interactive process.

**D**

It summarizes preceding conversation history.

Correct answer: B, D

### Explanation

* A. Context compaction does not alter repository files.
* B. Its instructions can preserve important rules, paths, and parameters.
* C. Slash commands run in the existing interactive REPL.
* D. /compact truncates and summarizes prior history.

## Question 11

Type: single\_choice
Knowledge point: Headless, streaming, and auto modes

A CI job must run one automated Claude Code task and then exit with a machine-readable final report. Which approach best fits?

### Options

**A**

Use claude -p "<task prompt>" with --output-format json and an approved permission configuration.

**B**

Use /context as the only command.

**C**

Start an interactive REPL and wait for manual input.

**D**

Use claude --continue without a task prompt.

Correct answer: A

### Explanation

Print mode runs the supplied task noninteractively and JSON serializes the final report; approved permissions/tool access must already allow the unattended task.

## Question 12

Type: multiple\_choice
Knowledge point: Headless, streaming, and auto modes

In a successful streaming Claude Code result event, which two offered entries describe result content rather than a newly created external resource? (Choose 2.)

### Options

**A**

A mandatory dedicated Git-push-confirmation field, present even when no Git operation occurred.

**B**

Final response text

**C**

Session metadata

**D**

A newly created operating-system user account as a result-event field

Correct answer: B, C

### Explanation

The final result message contains the completed response text. The success result carries final response text. It also includes session metadata. The result includes session metadata.

## Question 13

Type: multiple\_choice
Knowledge point: Headless, streaming, and auto modes

A Claude Code command already uses -p and --verbose. Which two additional options enable generated-token partial messages as streaming JSON events? (Choose 2.)

### Options

**A**

\--output-format stream-json

**B**

\--permission-mode plan

**C**

\--continue

**D**

\--include-partial-messages

Correct answer: A, D

### Explanation

Stream JSON is the event serialization format. Stream-json supplies event serialization in print mode. Including partial messages provides generated tokens as they arrive. Include-partial-messages enables partial streaming events; print/stream-json are prerequisites.

## Question 14

Type: single\_choice
Knowledge point: Headless, streaming, and auto modes

Consider an inert Claude Code permission trace. The declared environment is an interactive terminal running Claude Code v2.1.293 with a direct Anthropic API connection and claude-sonnet-4-6\. Auto mode is available for this session; the organization and server have not disabled it. The workspace is already trusted, the action paths are resolved, and none is a symlink. The managed policy denies any Edit whose resolved target is below /srv/protected, permits Read below /work/project, and explicitly asks on Bash commands starting with git push. These describe the effective policy, not literal settings syntax.

The user asks to check Python source and then change a protected policy file. Two queued actions are:

```text
X: Bash("python -m compileall src") in /work/project
Y: Edit("/srv/protected/policy.txt", replace "old" with "new")
```

For this trace, X matches no allow/ask/deny rule and is an eligible command requiring classifier review. Its stipulated classifier verdict is ALLOW. Y matches the managed deny rule. These are supplied trace facts, not an observed host run. The protected file starts with "old".

The adapter is missing its permission-dispatch step. Which completed trace applies the auto-mode boundary?

### Options

**A**

Hold X and leave Y blocked: auto mode is plan mode, so even the eligible command cannot execute after the supplied classifier approval.

**B**

Run X and Y: the classifier approval for X also pre-approves the user's remaining requested actions.

**C**

Run X after its applicable classifier approval; block Y at the managed deny rule before classifier approval can authorize it, leaving the protected file "old".

**D**

Run X and Y by treating auto as bypassPermissions; bypassPermissions removes the managed deny rule.

**E**

Run X because dontAsk automatically approves unmatched commands; use the same reasoning to run Y despite its deny rule.

**F**

Hold X for routine human permission approval despite its supplied classifier verdict, while denying Y: auto is exactly the Manual(default) prompt flow under another name.

Correct answer: C

### Explanation

Auto review applies to X. The managed deny resolves Y and its effect remains blocked. Auto, plan, dontAsk and bypass do not have interchangeable permission behavior.

## Question 15

Type: single\_choice
Knowledge point: CLAUDE.md hierarchy and repository initialization

A project has workspace-wide rules and more focused path/task rules and skills. What role should its root CLAUDE.md have in that guidance hierarchy?

### Options

**A**

Replace scoped rules by embedding every subdirectory detail into the always-loaded baseline.

**B**

Keep only cache billing data and leave all reusable project directives in transient conversation.

**C**

Cause every specialized skill to execute automatically when the file is read.

**D**

Provide broadly loaded baseline directives, with focused path/task material kept in its appropriate rules or skills.

Correct answer: D

### Explanation

Use root CLAUDE.md for the broadly needed project baseline. Keep focused path and task guidance in its applicable rules and skills instead of indiscriminately adding every detail to the shared context.

## Question 16

Type: multiple\_choice
Knowledge point: CLAUDE.md hierarchy and repository initialization

A repository has no initial CLAUDE.md guidance yet. Which two actions establish and verify that initial Claude Code project guidance? (Choose 2.)

### Options

**A**

Run /init in the repository.

**B**

Copy another repository’s CLAUDE.md without checking its assumptions.

**C**

Treat the generated file as approved without reviewing the project’s actual conventions.

**D**

Review and refine the generated CLAUDE.md.

Correct answer: A, D

### Explanation

/init analyzes the repository and writes a starter memory manifest. /init starts repository guidance initialization. The starter manifest is the project guidance artifact to maintain. Generated guidance should be reviewed for accurate project conventions.

## Question 17

Type: single\_choice
Knowledge point: CLAUDE.md hierarchy and repository initialization

After /init completes, where does Claude Code write the starter memory manifest?

### Options

**A**

The Git remote’s issue tracker

**B**

A temporary browser cache only

**C**

The project root as CLAUDE.md

**D**

The operating system boot directory

Correct answer: C

### Explanation

* A. An issue tracker is not the manifest location.
* B. The generated manifest is a repository artifact, not browser cache.
* C. /init writes a starter CLAUDE.md in the project root.
* D. System boot files are unrelated.

## Question 18

Type: single\_choice
Knowledge point: CLAUDE.md hierarchy and repository initialization

Which slash command should a new repository use to generate starter Claude Code guidance?

### Options

**A**

/clear

**B**

/resume

**C**

/init

**D**

/cost

Correct answer: C

### Explanation

* A. /clear resets active conversation memory.
* B. /resume restores an existing session.
* C. /init analyzes repository structure and creates starter project memory.
* D. /cost reports session cost details.

## Question 19

Type: single\_choice
Knowledge point: CLAUDE.md hierarchy and repository initialization

Why does Claude Code preserve core project rules during context compaction?

### Options

**A**

To prevent all token use

**B**

To change the repository’s remote URL

**C**

To retain crucial guidance while reducing prior history

**D**

To grant unrestricted tool permissions

Correct answer: C

### Explanation

Compaction reduces retained conversation history while the documented memory process reloads core root project guidance from disk. Nested or path-scoped guidance may reload when applicable; this does not mean every arbitrary history detail is preserved.

## Question 20

Type: multiple\_choice
Knowledge point: CLAUDE.md hierarchy and repository initialization

Which two outcomes follow from maintaining clear project rules in CLAUDE.md? (Choose 2.)

### Options

**A**

The file automatically removes all code defects.

**B**

Claude Code can retain crucial architectural guidance during compaction.

**C**

Project-specific directives are available in the workspace.

**D**

The file eliminates the need for session context limits.

Correct answer: B, C

### Explanation

* A. Guidance does not automatically repair code.
* B. Core project rules can stay available during context summarization.
* C. CLAUDE.md is the workspace-level directive file.
* D. Context-window limits still exist.

## Question 21

Type: single\_choice
Knowledge point: settings.json configuration

A developer wants to persist a Read-tool denial for the project's `.env` file, only for themselves in this one local project. The existing `.claude/settings.local.json` is:

```json
{"permissions":{"allow":["Bash(npm run lint)"],"deny":[]}}
```

The lint allowance must remain. Which action writes the intended declaration in the requested scope?

### Options

**A**

Leave the JSON unchanged and open /status to persist the denial.

**B**

Save `.claude/settings.local.json` as `{"permissions":{"allow":["Bash(npm run lint)","Read(./.env)"],"deny":[]}}`.

**C**

Save `.claude/settings.local.json` as `{"permissions":{"allow":["Bash(npm run lint)"],"deny":["Read(./.env)"]}}`.

**D**

Save the same JSON in `~/.claude/settings.json` instead.

Correct answer: C

### Explanation

The operation is a persistent file modification with an exact key, value and scope. Save the deny declaration in the existing project-local JSON, preserving its lint allowance; runtime permission verification remains a separate check.

## Question 22

Type: single\_choice
Knowledge point: settings.json configuration

In current Claude Code, which file in a project's working folder stores permissions.allow rules intended to be committed and shared with teammates?

### Options

**A**

.claude/settings.json

**B**

.claude/settings.local.json

**C**

\~/.claude/settings.json

**D**

\~/.claude.json

Correct answer: A

### Explanation

Use .claude/settings.json for settings intended to be committed and shared in the project, with persistent tool allowances under permissions.allow. Project-local and user-wide settings have different sharing scopes; \~/.claude.json is state storage. Shared allowance rules remain subject to project trust and applicable ask or deny policy.

## Question 23

Type: single\_choice
Knowledge point: settings.json configuration

A reviewer must read, without modifying it, the selected project-local file `.claude/settings.local.json`. Its complete relevant stored content is:

```json
{"permissions":{"allow":["Bash(npm run lint)"],"ask":[],"deny":[]}}
```

Other settings sources may contain additional rules, but their values are not supplied. Which statement is justified by a read-only JSON inspection of this selected file?

### Options

**A**

The selected file has no permission rules because its deny array is empty.

**B**

This file declares one allow rule, `Bash(npm run lint)`; the effective merged runtime rule set is not established by this inspection.

**C**

The running session's entire effective allow list contains exactly one rule.

**D**

Opening /status returns every selected key's final merged value, so no file inspection is needed.

Correct answer: B

### Explanation

Name the object actually inspected and preserve the stored-versus-effective distinction. The selected declaration can be read without mutation, while merged runtime behavior needs its own evidence.

## Question 24

Type: multiple\_choice
Knowledge point: settings.json configuration

Which two statements about allowedTools are correct? (Choose 2.)

### Options

**A**

It forces all tools to run without confirmation.

**B**

It replaces the need for model selection.

**C**

It allows fine-grained authorization of commands or file paths.

**D**

It supports explicit tool names and parameter patterns.

Correct answer: C, D

### Explanation

* A. Unlisted tools can remain gated.
* B. Model selection is a separate configuration concern.
* C. The setting provides fine-grained tool authorization.
* D. Rules can define exact tool names and parameter patterns.

## Question 25

Type: multiple\_choice
Knowledge point: settings.json configuration

Which two patterns can an allowedTools rule allow without confirmation? (Choose 2.)

### Options

**A**

Bash(git status)

**B**

Any browser download regardless of policy

**C**

Every unlisted destructive command

**D**

Bash(npm test)

Correct answer: A, D

### Explanation

* A. Bash(git status) is another example of an allowed pattern.
* B. Tool authorization is explicit rather than unrestricted.
* C. Unlisted tools remain gated.
* D. The documented field supports command patterns such as Bash(npm test).

