Skip to main content

Quiz: Claude Code

Why This Matters

Most Claude Code questions are really about ownership: who should a setting apply to, and how strongly must it be enforced? The questions are written by Learn Automated Testing, not taken from the real exam.

Quiz

1. A developer wants Claude Code to use their local Docker socket path in the TestPilot project, without affecting colleagues. Where does it go?

  • A. CLAUDE.md
  • B. .claude/settings.local.json
  • C. .claude/settings.json
  • D. ~/.claude/settings.json
Show answer
B. Personal, and only true for this project on this machine: local scope, which is not committed. C would apply to the whole team; D to all of the developer’s projects; A is context for the agent, not configuration.
Quiz

2. Claude Code must never edit fixtures/golden/ without a recorded reason. What enforces that most reliably?

  • A. A line in CLAUDE.md
  • B. A path-scoped rule for fixtures/golden/**
  • C. A reminder in the pull request template
  • D. A PreToolUse hook that blocks the edit unless the reason exists
Show answer
D. A PreToolUse hook that exits with code 2 blocks the tool call. A and B are context that Claude usually follows but is not forced to; C only helps after the fact.
Quiz

3. Your team wants the TestPilot MCP server available in Claude Code for everyone who clones the repository. Where do you configure it?

  • A. .mcp.json in the repository
  • B. Each developer’s ~/.claude.json
  • C. CLAUDE.local.md
  • D. The system prompt
Show answer
A. Project MCP servers live in .mcp.json, committed with the code. B is per person, C is personal context, D is not configuration at all.
Quiz

4. Claude Code wrote a change and reviewed it in the same session. It found nothing. What do you do?

  • A. Merge it
  • B. Ask the same session to review again more carefully
  • C. Run an independent review in a fresh session with only the diff and the criteria
  • D. Raise the effort setting and ask again
Show answer
C. A reviewer that shares the author’s context shares its blind spots. A fresh session with only the diff and the criteria is independent.
Quiz

5. In a long session, Claude Code keeps returning to an approach you rejected three times. What is usually the best next step?

  • A. Correct it a fourth time, more firmly
  • B. Write a short status note with the decisions and start a fresh session from it
  • C. Fork the session
  • D. Switch to plan mode in the same session
Show answer
B. The rejected attempts are now part of the context and keep pulling the agent back. A fresh session with a clean brief removes them. A fork (C) keeps the same polluted history.
Quiz

6. You need a CI job that fails when Claude Code’s review finds a blocker. What is the most reliable setup?

  • A. Ask for a structured JSON result with a severity per finding and fail on that field
  • B. Fail when the review text contains the word “problem”
  • C. Run Claude Code interactively in CI
  • D. Let Claude Code push a revert itself
Show answer
A. Pipelines should decide on structure, not on wording. Use print mode with JSON output (and a schema), then check the field. C cannot work without a person; D gives CI far more power than a review needs.