explore — Claude Code subagent: what it does, how to install
Read-only codebase explorer for Claude Code. Locates files, traces execution flows, and finds symbol callers without modifying code.
/plugin install claude-security@claude-plugins-officialWhat explore does
The explore subagent runs on sonnet with xhigh effort. Other agents dispatch it to map a repository, trace end-to-end flows, or locate where a specific function lives. It operates via absolute paths provided by the dispatch (SCAN_ROOT) and queries git strictly with git -C <root>, ensuring working directory changes never break the search.
Safety is enforced at the tool level. The subagent has access to Read, Glob, Grep, and a restricted Bash tool. Terminal usage is limited strictly to read-only commands such as find, cat, head, and git grep. It cannot run package managers, edit files, or execute test runners. Modifying repository files is impossible here: it lacks file-writing tools.
Every file it inspects is treated as untrusted data. Instructions embedded in comments, commit messages, or CLAUDE.md are treated as research targets rather than agent prompts. Its final report leads with a direct answer, provides file:line citations, and explicitly lists any unverified assumptions.
What it helps with
- locate where a specific symbol or function is defined and called
- trace execution flows across multiple files end to end
- map unfamiliar codebases before writing patches or tests
- inspect code without risks of accidental edits or running unwanted builds
Example prompts for the agent
- Find all callers and definitions of the
processPaymentfunction. - Trace the webhook handler flow from the router down to database writes.
- Where does the repository configure Redis connection timeouts?
How to install explore
1Plugin marketplace
/plugin install claude-security@claude-plugins-official2Manually: put the files in place
.claude/agents/explore.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/explore.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/explore.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about explore
How to install explore in Claude Code?
Run /plugin install claude-security@claude-plugins-official.
What does the explore subagent do?
It inspects codebases in read-only mode, maps execution flows, and returns answers backed by exact file:line references.
Can explore modify project files or run builds?
No, it has no file-editing capabilities. Terminal commands are restricted to read-only utilities like find, cat, and git grep.