Skip to content

Domain 3 — Mixed Scenario Quiz

Claude Code Configuration & Workflows — Exam Style

Use this as a closed-book drill. Each question has one best answer.


Question 1: User vs Project CLAUDE.md

A tech lead adds this instruction to ~/.claude/CLAUDE.md:

Always run pnpm test from the package directory before finalizing changes.

A new teammate clones the repo and Claude keeps suggesting npm test from the root.

What is the most likely cause?

A) Claude Code does not support persistent instructions.
B) The instruction is in user-level configuration, which is not shared through version control.
C) The teammate needs to restart their terminal.
D) The instruction should be moved to .mcp.json.

Answer **B.** User-level `~/.claude/CLAUDE.md` applies only to that user. Team-shared instructions should live in project-level `CLAUDE.md` or `.claude/CLAUDE.md` and be committed.

Question 2: Directory-Level Scoping

A monorepo has frontend and backend packages. The root CLAUDE.md contains detailed React component rules, and Claude sometimes applies them while editing backend API handlers.

What is the best fix?

A) Add more React examples to the root file.
B) Move frontend-specific rules into the frontend package’s CLAUDE.md or a path-scoped rule.
C) Put all instructions in ~/.claude/CLAUDE.md.
D) Delete all React rules.

Answer **B.** Root `CLAUDE.md` should contain project-wide rules. Package- or file-specific conventions should be scoped closer to where they apply.

Question 3: Diagnosing Loaded Memory

Claude follows an API rule in one session but not another. The team suspects the relevant CLAUDE.md was not loaded.

What is the best first diagnostic step?

A) Add the rule again to the prompt.
B) Run /memory to inspect which instruction files are loaded.
C) Increase context length.
D) Convert the rule to a Bash script.

Answer **B.** `/memory` is the right diagnostic tool for checking which `CLAUDE.md`, local memory, and rule files are active in the session.

Question 4: Modular CLAUDE.md

A project’s CLAUDE.md has grown to 700 lines. It includes architecture notes, testing standards, deployment instructions, and API conventions. The team wants better organization.

What is the best first improvement?

A) Move everything into one even larger README.md.
B) Use @ imports and/or .claude/rules/ files to split the content into focused files.
C) Delete all long instructions.
D) Put the file in ~/.claude/CLAUDE.md.

Answer **B.** `@` imports and `.claude/rules/` help modularize project guidance. Rules are especially useful when instructions can be scoped by topic or file path.

Question 5: Import vs Context Reduction

A team splits a huge CLAUDE.md into:

@docs/testing.md
@docs/api.md
@docs/deployment.md

They expect this alone to reduce context usage, but all imported content still loads.

What is the issue?

A) @ imports organize content but do not necessarily reduce loaded context.
B) @ imports are unsupported.
C) Imported files must be JSON.
D) Imports only work in user-level memory.

Answer **A.** Imports are useful for organization. To reduce irrelevant context, use path-scoped `.claude/rules/` or move occasional workflows into skills.

Question 6: Project vs User Slash Commands

A team wants every developer to have /prepare-release, a shared workflow for checking release notes, changelog updates, and release validation.

Where should the command live?

A) ~/.claude/commands/prepare-release.md
B) .claude/commands/prepare-release.md or .claude/skills/prepare-release/SKILL.md
C) ~/.claude/CLAUDE.md
D) .gitignore

Answer **B.** Team-wide commands or skills should be project-scoped and version-controlled.

Question 7: Personal Skill Variant

The project has a shared skill:

.claude/skills/pr-review/SKILL.md

A developer wants a personal version that adds extra checks for API compatibility and data migration risk.

What should they do?

A) Edit the shared project skill.
B) Create a personal skill under ~/.claude/skills/ with a different name.
C) Add personal preferences to project CLAUDE.md.
D) Remove the shared skill.

Answer **B.** Personal customization belongs in user scope. A different name avoids changing or overriding the team’s shared workflow.

Question 8: context: fork

A codebase-analysis skill searches many files and produces verbose intermediate notes. These notes pollute the main session and affect later implementation.

What frontmatter option should you use?

A) argument-hint
B) context: fork
C) paths
D) output-format: json

Answer **B.** `context: fork` runs the skill in an isolated subagent context and returns a summary, keeping exploratory noise out of the main session.

Question 9: argument-hint

A skill is invoked as:

/fix-issue

but developers frequently forget to provide the issue number.

What should be added?

A) context: fork
B) argument-hint: "[issue-number]"
C) paths: ["**/*.ts"]
D) allowed-tools: Bash(*)

Answer **B.** `argument-hint` tells developers what arguments are expected when invoking the skill or command.

Question 10: allowed-tools

A skill generates a database migration file. It needs to inspect existing migration files and create a new file, but it should not run database commands.

Which tool configuration is best?

A) allowed-tools: Bash(*)
B) allowed-tools: Read Glob Write
C) allowed-tools: WebSearch Bash(*)
D) No tool constraints

Answer **B.** The skill needs file discovery, reading, and writing. Broad Bash access is unnecessary and riskier.

Question 11: Skill vs CLAUDE.md

A 120-line security review checklist is used only occasionally during PR reviews. It currently lives in CLAUDE.md and consumes context every session.

What is the best change?

A) Move it to a project skill such as .claude/skills/security-review/SKILL.md.
B) Move it to ~/.claude/CLAUDE.md.
C) Duplicate it into every prompt.
D) Delete the checklist.

Answer **A.** Occasional, multi-step workflows belong in skills. `CLAUDE.md` should hold always-loaded project standards and durable context.

Question 12: Path-Specific Rules

A repo has tests colocated with source files across apps/, packages/, and services/. The team wants the same testing conventions for all *.test.tsx files.

What is the best configuration?

A) Add the rules to root CLAUDE.md.
B) Duplicate test rules in every package-level CLAUDE.md.
C) Create .claude/rules/testing.md with paths: ["**/*.test.tsx"].
D) Create a /test slash command.

Answer **C.** The convention applies to a file pattern spread across the repo. A path-specific rule is the best fit.

Question 13: YAML Frontmatter

A team creates this file:

paths:
  - "terraform/**/*"

# Terraform Rules

- Do not hardcode secrets.

Claude does not apply the rule.

What is wrong?

A) The paths field must be inside YAML frontmatter delimiters.
B) Terraform files cannot use rules.
C) Rules must be in ~/.claude/CLAUDE.md.
D) Glob patterns are not supported.

Answer **A.** The correct format is:
---
paths:
  - "terraform/**/*"
---

# Terraform Rules
...

Question 14: Directory CLAUDE.md vs Path Rule

A backend package has conventions that apply to every file under packages/api/: build commands, service-layer rules, API error handling, and test commands.

Where should these rules go?

A) packages/api/CLAUDE.md
B) .claude/rules/testing.md only
C) ~/.claude/CLAUDE.md
D) A skill

Answer **A.** When conventions map cleanly to a directory subtree, a directory-level `CLAUDE.md` is appropriate.

Question 15: Path Rules Without paths

A .claude/rules/security.md file has no YAML paths field.

What happens?

A) It never loads.
B) It loads unconditionally.
C) It loads only for files named security.md.
D) It becomes a slash command.

Answer **B.** Rules without `paths` are unconditional. Add `paths` when you want conditional loading.

Question 16: Plan Mode vs Direct Execution

A user asks Claude to add a single date validation check to one known function and update the nearest unit test.

What should Claude use?

A) Plan mode
B) Direct execution
C) Explore subagent for broad discovery
D) Multi-agent planning

Answer **B.** The task is small, well-scoped, and unambiguous. Direct execution is appropriate.

Question 17: Plan Mode for Architecture

A team wants to replace synchronous order processing with an event-driven queue. The change affects idempotency, retries, observability, deployment order, and rollback.

What should Claude use first?

A) Direct execution
B) Plan mode, likely with exploration
C) A single Edit call
D) Glob only

Answer **B.** This has architectural implications and multiple valid approaches. Plan mode reduces the risk of costly rework.

Question 18: Explore Subagent

Claude needs to understand every place entitlement checks happen across a large codebase before proposing a refactor. The discovery phase will require many searches and file reads.

What is the best tool or mode for discovery?

A) Explore subagent
B) Write
C) Direct execution only
D) Forced Edit

Answer **A.** Explore is suited for verbose, read-only codebase discovery and returns a concise summary to preserve main-session context.

Question 19: Combining Plan and Execution

Claude has completed a plan for a library migration. The user approves phase 1 only.

What should Claude do next?

A) Keep planning indefinitely.
B) Execute only the approved phase.
C) Implement all phases immediately.
D) Discard the plan.

Answer **B.** A strong workflow is plan first, approve, then directly execute the agreed phase.

Question 20: Concrete Examples

Claude keeps misinterpreting a requirement to “normalize customer names.”

What is the best next step?

A) Repeat the prose instruction more forcefully.
B) Provide 2–3 concrete input/output examples.
C) Move the requirement to .mcp.json.
D) Increase the number of tools.

Answer **B.** Concrete examples are the clearest way to communicate expected transformations when prose is interpreted inconsistently.

Question 21: Test-Driven Iteration

Claude must implement a migration with tricky null handling, idempotency, and performance requirements.

What is the strongest approach?

A) Implement first, test later.
B) Write tests for expected behavior, edge cases, and performance first; then iterate using test failures.
C) Tell Claude to “be careful.”
D) Skip tests because migrations are one-time scripts.

Answer **B.** Tests provide executable specifications. Sharing failures gives Claude a precise feedback loop.

Question 22: Interview Pattern

You need to add caching to a pricing service, but you are unsure about invalidation, acceptable staleness, tenant isolation, and failure behavior.

What should you ask Claude to do first?

A) Implement the simplest cache immediately.
B) Use the interview pattern to ask design questions before implementation.
C) Add a path-specific rule.
D) Run formatting.

Answer **B.** The interview pattern surfaces design considerations the developer may not have anticipated before implementation.

Question 23: Interacting Issues

A migration has three related problems: null handling, idempotency, and batch processing. The fix strategy depends on all three.

How should you provide feedback?

A) Provide all three issues together in one detailed message.
B) Reveal one issue at a time after each implementation.
C) Only mention null handling.
D) Ask Claude to guess the remaining constraints.

Answer **A.** Interacting issues should be handled together because fixing one in isolation may cause rework or conflict with another.

Question 24: Independent Issues

A UI component has three unrelated issues: a typo, a missing aria-label, and an incorrect icon size.

What is the best refinement strategy?

A) Fix them sequentially and verify each small change.
B) Force a full component rewrite.
C) Use the interview pattern.
D) Use plan mode for a multi-phase architecture review.

Answer **A.** Independent issues are best fixed sequentially to keep each change small and verifiable.

Question 25: CI Non-Interactive Mode

A CI job runs:

claude "Review this PR"

It sometimes hangs waiting for input.

What is the best fix?

A) Use claude -p or claude --print.
B) Add a longer prompt.
C) Use path-specific rules.
D) Move the workflow to ~/.claude/commands.

Answer **A.** The `-p` / `--print` flag runs Claude Code in non-interactive mode, which is required for reliable CI execution.

Question 26: Structured CI Output

A pipeline needs to post Claude’s findings as inline PR comments. The current output is prose and hard to parse.

What should you use?

A) --output-format json and --json-schema
B) Plan mode
C) Glob
D) CLAUDE.local.md

Answer **A.** Structured JSON output with a schema lets automation parse fields like file, line, severity, and message.

Question 27: Avoiding Duplicate CI Comments

A Claude review runs on every push and repeatedly posts the same PR comments.

What should the pipeline do?

A) Disable re-runs.
B) Include prior findings in context and instruct Claude to report only new or still-unaddressed issues.
C) Remove structured output.
D) Ask Claude to be more concise.

Answer **B.** Prior findings allow Claude to deduplicate comments and classify unresolved findings correctly.

Question 28: Independent Review Instance

Claude generated code in one long session. The team wants a final review before merging.

What is best?

A) Ask the same session to review its own changes.
B) Use an independent review instance or fresh context that sees the diff and review criteria.
C) Skip review because Claude wrote the code.
D) Only run formatting.

Answer **B.** A fresh review context is more likely to catch gaps because it does not share the implementation session’s assumptions.

Question 29: Test Generation in CI

Claude’s CI-generated tests duplicate existing scenarios and ignore project fixture conventions.

What should you provide?

A) Only the production file.
B) Existing related test files, fixture documentation, and testing standards from CLAUDE.md.
C) A generic “write good tests” prompt.
D) No context.

Answer **B.** Claude needs existing tests and fixture standards to identify real coverage gaps and avoid low-value duplicates.

Question 30: --bare and CLAUDE.md

A CI script uses --bare, and Claude no longer follows the project’s CLAUDE.md review criteria.

What happened?

A) --bare skips auto-discovered context like CLAUDE.md unless equivalent context is provided explicitly.
B) CLAUDE.md never works in CI.
C) JSON schema disables memory.
D) -p prevents reading files.

Answer **A.** `--bare` is useful for hermetic runs, but it omits automatically discovered project context unless you pass that context explicitly.

Answer Key

1. B
2. B
3. B
4. B
5. A
6. B
7. B
8. B
9. B
10. B
11. A
12. C
13. A
14. A
15. B
16. B
17. B
18. A
19. B
20. B
21. B
22. B
23. A
24. A
25. A
26. A
27. B
28. B
29. B
30. A

Scoring Guide

27–30 correct: Strong Domain 3 readiness.
23–26 correct: Good readiness; review missed subtopics.
18–22 correct: Solid basics, but scenario tradeoffs need more drilling.
Below 18: Revisit D3.1–D3.6 before moving on.

Most Important Domain 3 Exam Traps

1. Putting team instructions in user-level ~/.claude/CLAUDE.md.
2. Using root CLAUDE.md for package-specific or file-specific rules.
3. Assuming @ imports reduce context by themselves.
4. Forgetting YAML frontmatter in .claude/rules files.
5. Using skills for always-on standards instead of CLAUDE.md/rules.
6. Using context: fork for passive guidance instead of task workflows.
7. Using plan mode for trivial changes.
8. Directly executing high-blast-radius architecture changes.
9. Giving vague feedback instead of examples or test failures.
10. Running interactive Claude Code in CI instead of claude -p.
11. Producing prose in CI when automation needs JSON.
12. Letting the same session review its own generated code.