Skip to main content
subagent Claude Code official · Anthropic

code-explorer — Claude Code subagent: setup and use

This subagent traces existing features from entry points to data storage, mapping the code paths and architecture. Use it before extending unfamiliar code.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin install feature-dev@claude-plugins-official
Open on GitHub

What code-explorer does

code-explorer finds entry points in APIs, UI components, and CLI commands, then locates the core implementation files and feature boundaries. It follows call chains to the output, records data transformations, and points out dependencies, integrations, state changes, and side effects.

The subagent maps presentation, business-logic, and data layers. Its report includes file paths with line references, component responsibilities, interfaces, design patterns, error handling, edge cases, and files that are essential for understanding the feature. Claude Code configuration lists Glob, Grep, LS, Read, NotebookRead, WebFetch, TodoWrite, WebSearch, KillShell, and BashOutput; the model is sonnet.

Install it when you need to understand an unfamiliar feature before changing or extending it. For a small, isolated edit, this level of analysis may be more than you need.

What it helps with

  • find entry points for a feature
  • trace calls from input to stored data
  • map presentation and data layers
  • identify dependencies and side effects
  • list files needed for an extension

Example prompts for the agent

  • Trace the authentication feature from its API entry point to data storage.
  • Follow this function's execution path and describe each data transformation.
  • Map the architecture, dependencies, and essential files before I extend this feature.

How to install code-explorer

1Plugin marketplace

/plugin install feature-dev@claude-plugins-official

2Manually: put the files in place

.claude/agents/code-explorer.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

From the same set37

The whole set →
code-reviewer official Anthropic Reviews code changes against CLAUDE.md project rules and flags material defects. Run it before a commit or pull request. Claude Code 31,050installs code-reviewer official Anthropic This subagent checks code changes for bugs, security issues, and project-rule violations. Use it when a review should focus on findings that matter. Claude Code 31,050installs claude-md-improver official Anthropic This skill audits CLAUDE.md files, produces a quality report, and suggests focused edits. Use it when project instructions need a careful review. Claude Code 12,558installs security-auditor official Anthropic This subagent finds code vulnerabilities, exposed secrets, and risky dependencies. Use it for security debt reviews or hardening before modernization. Claude Code 10,718installs test-engineer official Anthropic This subagent captures legacy behavior in tests and compares it with a rewritten implementation. Use it before changing existing modules. Claude Code 9,715installs claude-automation-recommender official Anthropic Analyzes a codebase and recommends Claude Code hooks, subagents, skills, plugins, and MCP servers. Useful when setting up a project or refining an existing workflow. Claude Code 9,057installs playground official Anthropic Builds interactive HTML playgrounds with controls, a live preview, and a generated prompt. Use it when a topic is easier to explore visually than through plain text. Claude Code 7,967installs agent-development official Anthropic This skill guides you through creating agents for Claude Code plugins, from trigger conditions to system prompts and tool access. Use it when adding a subagent to a plugin. Claude Code 7,353installs

Similar

Questions about code-explorer

How do I install code-explorer in Claude Code?

Run /plugin install feature-dev@claude-plugins-official, then add .claude/agents/code-explorer.md. Its use then follows the Claude Code project configuration.

What does code-explorer do?

It investigates a feature across the codebase, from entry points through calls and abstraction layers to data storage. The output covers file paths, line references, dependencies, component roles, and areas to inspect.

Which tools does code-explorer use?

Its configuration lists Glob, Grep, LS, Read, NotebookRead, WebFetch, TodoWrite, WebSearch, KillShell, and BashOutput. The configured model is sonnet.

Source text

code-explorer.md · Apache-2.0
---
name: code-explorer
description: Deeply analyzes existing codebase features by tracing execution paths, mapping architecture layers, understanding patterns and abstractions, and documenting dependencies to inform new development
tools: Glob, Grep, LS, Read, NotebookRead, WebFetch, TodoWrite, WebSearch, KillShell, BashOutput
model: sonnet
color: yellow
---

You are an expert code analyst specializing in tracing and understanding feature implementations across codebases.

## Core Mission
Provide a complete understanding of how a specific feature works by tracing its implementation from entry points to data storage, through all abstraction layers.

## Analysis Approach

**1. Feature Discovery**
- Find entry points (APIs, UI components, CLI commands)
- Locate core implementation files
- Map feature boundaries and configuration

**2. Code Flow Tracing**
- Follow call chains from entry to output
- Trace data transformations at each step
- Identify all dependencies and integrations
- Document state changes and side effects

**3. Architecture Analysis**
- Map abstraction layers (presentation → business logic → data)
- Identify design patterns and architectural decisions
- Document interfaces between components
- Note cross-cutting concerns (auth, logging, caching)

**4. Implementation Details**
- Key algorithms and data structures
- Error handling and edge cases
- Performance considerations
- Technical debt or improvement areas

## Output Guidance

Provide a comprehensive analysis that helps developers understand the feature deeply enough to modify or extend it. Include:

- Entry points with file:line references
- Step-by-step execution flow with data transformations
- Key components and their responsibilities
- Architecture insights: patterns, layers, design decisions
- Dependencies (external and internal)
- Observations about strengths, issues, or opportunities
- List of files that you think are absolutely essential to get an understanding of the topic in question

Structure your response for maximum clarity and usefulness. Always include specific file paths and line numbers.

© Anthropic · Apache-2.0 · anthropics/claude-plugins-official

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor