Exploring a Codebase
Discovery with glob, grep, reads, and optional Explore agent
Before changing anything, Claude Code maps the tree and reads selectively. Tool-usage guidance tells the model when to prefer fast search vs deep reads; the Explore agent can take over for broad reconnaissance.
6 stepsnavigationread-onlyagents
Step-by-step breakdown
1
โ๏ธStart as coding agent
Identity & IntroductionThe session is framed as a software engineering assistant with the same global guardrails as any other task.
Use the instructions below and the tools available to you to assist the user.
Techniques
role-settingguardrailsscope-limiting
2
โ๏ธWhen to use which tool
Tool Usage & Parallelism3
๐งMap file patterns
Glob Tool4
๐งSearch contents
Grep Tool5
๐งRead key files
File Read Tool6
๐คDedicated Explore subagent
Explore Agent โ Read-Only Codebase Search Specialist