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:
- Try Edit with shortest plausible unique anchor.
- Widen
old_stringor usereplace_all: trueif needed. - 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:
- Grep to find entry points.
- Read to follow imports and trace flows.
- Grep again for wrapper / re-exported names.
- Read only what you need.
Tracing Function Usage Across Wrappers
- Grep for the function definition.
- Read the defining file to identify exported names.
- Grep for each exported name.
- If re-exported through a barrel, Grep for the barrel module name too.
Finding Callers and Their Tests
- Grep for the function name (finds callers and direct test imports).
- Glob for sibling test files by naming convention.
- 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.
Cancel anytime. Or €199 a year, which saves 17%.
Not sure yet? Try 10 free mock exam questions.
Already Pro? Log in.
Sources
- How Claude Code works, Claude Code Docs
- Configure permissions, Claude Code Docs
- Best practices for Claude Code, Claude Code Docs