2.5 — Built-in Tools

CCAR-F Domain 2 · Task 2.5

What You Need to Know

Claude Code provides six built-in tools: Read, Write, Edit, Bash, Grep, Glob.

Grep vs Glob

Tool Purpose
Grep Searches file contents for patterns (function callers, error messages, imports)
Glob Matches file paths by naming patterns (test files, config files, extensions)

Grep finds what is inside files. Glob finds files by their names.

Read, Write, and Edit

  • Edit — targeted changes using unique text matching. Fast and precise. Default for modifications.
  • When Edit cannot find a unique anchor → Read + Write (fallback). Do not default to Read + Write for every change (burns context tokens).

Real-work order:

  1. Try Edit with shortest plausible unique anchor.
  2. Widen old_string or use replace_all: true if needed.
  3. Fall back to Read + Write only when neither works.

On the exam: answer Read + Write as the fallback.

Incremental Codebase Understanding

Never read every file upfront. Instead:

  1. Grep to find entry points.
  2. Read to follow imports and trace flows.
  3. Grep again for wrapper / re-exported names.
  4. Read only what you need.

Tracing Function Usage Across Wrappers

  1. Grep for the function definition.
  2. Read the defining file to identify exported names.
  3. Grep for each exported name.
  4. If re-exported through a barrel, Grep for the barrel module name too.

Finding Callers and Their Tests

  1. Grep for the function name (finds callers and direct test imports).
  2. Glob for sibling test files by naming convention.
  3. Grep again for wrapper names if applicable.

Exam Traps

  • Using Glob to find function callers
  • Using Grep to find files by extension or naming pattern
  • Reading all source files upfront
  • Defaulting to Read + Write for every modification
  • Wrong tool sequence for deprecation / caller+test discovery

Check your understanding

Practice Scenario

🔒 This practice scenario is part of Skillmarked Pro

The lessons stay free. Pro unlocks the other 23 CCAR-F practice scenarios and the 60-question timed mock exam, plus everything for every other exam.

See plans

Cancel anytime. Or €199 a year, which saves 17%.

Not sure yet? Try 10 free mock exam questions.

Already Pro? Log in.

Sources