category: "Reference"
category_id: 10
source_file: "guide/ultimate-guide.md"

questions:
  - id: "10-001"
    difficulty: "junior"
    profiles: ["junior", "senior", "power"]
    question: "What keyboard shortcut enters Plan Mode (toggles plan/execute)?"
    options:
      a: "Ctrl+P"
      b: "Shift+Tab"
      c: "Alt+P"
      d: "Ctrl+Shift+P"
    correct: "b"
    explanation: |
      `Shift+Tab` toggles between Plan Mode and Execute Mode.

      Plan Mode navigation:
      - `Shift+Tab` once: Toggle plan/execute
      - `Shift+Tab` twice: Enter deep Plan Mode (with Opus in OpusPlan)

      Plan Mode allows safe, read-only exploration before making changes.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.2 Keyboard Shortcuts"
      anchor: "#session-control"

  - id: "10-002"
    difficulty: "junior"
    profiles: ["junior", "senior", "power"]
    question: "What keyboard shortcut rewinds to a previous checkpoint (undo Claude's changes)?"
    options:
      a: "Ctrl+Z"
      b: "Esc (double-tap)"
      c: "Ctrl+R"
      d: "Alt+Z"
    correct: "b"
    explanation: |
      Double-tap `Esc` (Esc×2) rewinds to the previous checkpoint.

      This is equivalent to the `/rewind` command.
      It undoes Claude's recent changes in the current session without creating git commits.

      Use when Claude made a mistake and you want to try a different approach.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.2 Keyboard Shortcuts"
      anchor: "#session-control"

  - id: "10-003"
    difficulty: "junior"
    profiles: ["junior", "senior", "power"]
    question: "What does `/compact` do?"
    options:
      a: "Compresses files on disk"
      b: "Summarizes and compresses the conversation context"
      c: "Minimizes the terminal window"
      d: "Reduces Claude's response length"
    correct: "b"
    explanation: |
      `/compact` summarizes and compresses the conversation context.

      Use `/compact` when:
      - Context usage reaches 70-90%
      - Responses become slow
      - Claude starts forgetting earlier context

      This frees up context space while preserving important information.
      Check context usage with `/status`.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.1 Commands Table"
      anchor: "#built-in-commands"

  - id: "10-004"
    difficulty: "senior"
    profiles: ["senior", "power"]
    question: "At what context percentage should you run /compact according to best practices?"
    options:
      a: "50%"
      b: "70-90%"
      c: "95%+"
      d: "Only when errors occur"
    correct: "b"
    explanation: |
      Context management guidelines:

      | Context Level | Action |
      |--------------|--------|
      | 0-50% | Work freely |
      | 50-75% | Be selective |
      | **75-90%** | **Use `/compact`** |
      | 90%+ | Use `/clear` |

      Proactive compaction at 70% prevents context degradation and maintains performance.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.4 Troubleshooting"
      anchor: "#context-recovery"

  - id: "10-005"
    difficulty: "junior"
    profiles: ["junior", "senior", "power"]
    question: "What keyboard shortcut cancels the current operation?"
    options:
      a: "Esc"
      b: "Ctrl+C"
      c: "Ctrl+Z"
      d: "Alt+C"
    correct: "b"
    explanation: |
      `Ctrl+C` cancels the current operation.

      Important shortcuts:
      - `Ctrl+C`: Cancel operation
      - `Ctrl+D`: Exit Claude Code
      - `Ctrl+R`: Retry last operation
      - `Ctrl+L`: Clear screen (keeps context)
      - `Esc`: Dismiss current suggestion
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.2 Keyboard Shortcuts"
      anchor: "#session-control"

  - id: "10-006"
    difficulty: "senior"
    profiles: ["senior", "power"]
    question: "What is the correct permission pattern to allow ALL git commands?"
    options:
      a: 'Bash(git)'
      b: 'Bash(git *)'
      c: 'git:*'
      d: 'Bash(*git*)'
    correct: "b"
    explanation: |
      The pattern `Bash(git *)` allows any git command.

      Permission pattern examples:
      - `Bash(git *)` - Any git command
      - `Bash(npm test)` - Exactly "npm test"
      - `Edit` - All file edits
      - `mcp__serena__*` - All Serena tools

      Wildcards (*) enable flexible permission matching.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.3 Configuration Reference"
      anchor: "#permission-patterns"

  - id: "10-007"
    difficulty: "junior"
    profiles: ["junior", "senior", "power"]
    question: "Where should project-specific CLAUDE.md be placed (committed to git)?"
    options:
      a: "~/.claude/CLAUDE.md"
      b: "/project/.claude/CLAUDE.md"
      c: "/project/CLAUDE.md"
      d: "~/.config/claude/project.md"
    correct: "c"
    explanation: |
      CLAUDE.md locations:

      | Location | Scope | Committed |
      |----------|-------|-----------|
      | `~/.claude/CLAUDE.md` | All projects | N/A (global) |
      | `/project/CLAUDE.md` | This project | **Yes** |
      | `/project/.claude/CLAUDE.md` | Personal | No |

      The root `CLAUDE.md` is committed and shared with the team.
      The `.claude/CLAUDE.md` is personal and should be in `.gitignore`.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.3 Configuration Reference"
      anchor: "#claudemd-locations"

  - id: "10-008"
    difficulty: "senior"
    profiles: ["senior", "power"]
    question: "What does the --mcp-debug flag do?"
    options:
      a: "Disables MCP servers"
      b: "Debugs MCP server connections with verbose output"
      c: "Tests MCP configurations"
      d: "Enables MCP auto-discovery"
    correct: "b"
    explanation: |
      The `--mcp-debug` flag enables debug mode for MCP server connections.

      MCP debugging techniques:
      ```bash
      claude --mcp-debug  # Debug all MCP connections
      /mcp               # View MCP status inside Claude Code
      ```

      Use when MCP servers aren't connecting or tools aren't appearing.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.4 Troubleshooting"
      anchor: "#mcp-debugging-techniques"

  - id: "10-009"
    difficulty: "power"
    profiles: ["power"]
    question: "If an MCP server name validation fails with pattern error, what characters ARE allowed?"
    options:
      a: "Letters only"
      b: "Letters, numbers, underscores, hyphens (max 64 chars)"
      c: "Any characters except spaces"
      d: "Alphanumeric and periods"
    correct: "b"
    explanation: |
      MCP server names must match: `^[a-zA-Z0-9_-]{1,64}`

      Allowed:
      - Letters (a-z, A-Z)
      - Numbers (0-9)
      - Underscores (_)
      - Hyphens (-)
      - Maximum 64 characters

      Not allowed:
      - Spaces
      - Special characters (@, #, etc.)
      - More than 64 characters
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.4 Troubleshooting"
      anchor: "#error-1-tool-name-validation-failed"

  - id: "10-010"
    difficulty: "junior"
    profiles: ["junior", "senior", "power"]
    question: "What command shows session info including context usage and cost?"
    options:
      a: "/info"
      b: "/status"
      c: "/stats"
      d: "/session"
    correct: "b"
    explanation: |
      The `/status` command shows session information.

      Output includes:
      - Model being used
      - Context usage percentage
      - Session cost
      - Token counts

      Example output:
      `Model: Sonnet | Ctx: 45.2k | Cost: $1.23 | Ctx(u): 42.0%`

      Use `/stats` for usage statistics with activity graphs.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.1 Commands Table"
      anchor: "#built-in-commands"

  - id: "10-011"
    difficulty: "senior"
    profiles: ["senior", "power"]
    question: "What flag limits maximum API spend in headless mode?"
    options:
      a: "--cost-limit"
      b: "--max-budget-usd"
      c: "--spending-cap"
      d: "--budget"
    correct: "b"
    explanation: |
      The `--max-budget-usd` flag sets maximum API spend (only with `--print`):

      ```bash
      claude -p "analyze" --max-budget-usd 5.00
      ```

      This prevents runaway costs in automated pipelines.
      The operation stops if the budget is exceeded.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.3 Configuration Reference"
      anchor: "#cli-flags-reference"

  - id: "10-012"
    difficulty: "junior"
    profiles: ["junior", "senior", "power"]
    question: "How do you run a shell command directly from Claude Code prompt?"
    options:
      a: "shell: command"
      b: "!command"
      c: "$command"
      d: "run command"
    correct: "b"
    explanation: |
      The `!command` prefix runs a shell command directly.

      Quick actions:
      - `!command` - Run shell command
      - `@filename` - Reference file
      - `Ctrl+C` - Cancel operation
      - `Ctrl+R` - Retry last

      Example: `!git status` runs git status without Claude interpreting it.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.1 Commands Table"
      anchor: "#quick-actions"

  - id: "10-013"
    difficulty: "senior"
    profiles: ["senior", "power"]
    question: "What is the correct way to resume a specific session by ID?"
    options:
      a: "claude --session abc123"
      b: "claude -r abc123"
      c: "claude --load abc123"
      d: "claude -s abc123"
    correct: "b"
    explanation: |
      Use `-r` or `--resume` to resume a specific session:

      ```bash
      claude -r abc123           # Resume session abc123
      claude --resume abc123     # Same as above
      claude -c                  # Resume last session (short)
      claude --continue          # Resume last session (long)
      ```

      Combine with `-p` for scripting: `claude -r abc123 -p "check status"`
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.3 Configuration Reference"
      anchor: "#cli-flags-reference"

  - id: "10-014"
    difficulty: "power"
    profiles: ["power"]
    question: "What is the recommended .gitignore pattern for Claude Code files?"
    options:
      a: "Ignore all .claude/ contents"
      b: "Ignore settings.local.json and .claude/CLAUDE.md, keep agents/commands/hooks"
      c: "Don't ignore anything"
      d: "Ignore only agents/"
    correct: "b"
    explanation: |
      Recommended .gitignore:

      ```gitignore
      # Claude Code - Personal (ignore)
      .claude/settings.local.json
      .claude/CLAUDE.md
      .claude/.serena/

      # Claude Code - Team (keep/commit)
      # .claude/agents/
      # .claude/commands/
      # .claude/hooks/
      # .claude/settings.json
      ```

      This keeps team workflows shared while personal settings stay private.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "9.11 Common Pitfalls & Best Practices"
      anchor: "#recommended-gitignore"

  - id: "10-015"
    difficulty: "junior"
    profiles: ["junior", "senior", "power"]
    question: "What is the daily workflow morning setup according to the guide?"
    options:
      a: "Just start coding"
      b: "Git pull, /status, load project memory, review yesterday's progress"
      c: "Run all tests first"
      d: "Clear all context"
    correct: "b"
    explanation: |
      Morning setup workflow:

      1. Git pull latest changes
      2. Review context with `/status`
      3. Load project memory (`/sc:load` if using Serena)
      4. Review yesterday's progress

      This ensures you start with fresh code and full context awareness.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.6 Daily Workflow & Checklists"
      anchor: "#daily-workflow-pattern"

  - id: "10-016"
    difficulty: "senior"
    profiles: ["senior", "power"]
    question: "What flag allows Claude's tools to access directories outside the current working directory?"
    options:
      a: "--include-dir"
      b: "--add-dir"
      c: "--context-dir"
      d: "--load-dir"
    correct: "b"
    explanation: |
      Use `--add-dir` to allow tool access to additional directories:

      ```bash
      claude --add-dir ../shared ../utils
      claude --add-dir packages/api
      ```

      By default, Claude can only access files in the current working directory.
      Use --add-dir to extend permissions to other directories (e.g., shared libraries in a monorepo).
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.3 Configuration Reference"
      anchor: "#cli-flags-reference"

  - id: "10-017"
    difficulty: "power"
    profiles: ["power"]
    question: "When Sequential Thinking MCP seems slow or unresponsive, what should you expect?"
    options:
      a: "It's broken and needs restart"
      b: "10-30 second responses are normal due to significant compute"
      c: "Switch to a different MCP"
      d: "Reduce the query complexity"
    correct: "b"
    explanation: |
      Sequential Thinking uses significant compute - expect 10-30 second responses.

      This is not an error, just be patient.

      Tips for Sequential:
      - Works best with specific, well-defined problems
      - Good: "Debug why user authentication fails on mobile"
      - Bad: "Make the app better"

      The longer response time reflects deeper analysis.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.4 Troubleshooting"
      anchor: "#sequential-thinking-mcp-issues"

  - id: "10-018"
    difficulty: "junior"
    profiles: ["junior", "senior", "power"]
    question: "What shortcut opens an external editor for composing long text input?"
    options:
      a: "Ctrl+E"
      b: "Ctrl+G"
      c: "Ctrl+O"
      d: "Ctrl+L"
    correct: "b"
    explanation: |
      `Ctrl+G` opens an external editor for composing long text.

      Useful input shortcuts:
      - `Ctrl+A`: Jump to beginning of line
      - `Ctrl+E`: Jump to end of line
      - `Ctrl+W`: Delete previous word
      - `Ctrl+G`: Open external editor
      - `Tab`: Autocomplete file paths

      The external editor allows comfortable editing of complex prompts.
    doc_reference:
      file: "guide/ultimate-guide.md"
      section: "10.2 Keyboard Shortcuts"
      anchor: "#input--navigation"
