Skip to main content
subagent CX Codex

Scout · parcadei — Claude Code subagent: codebase exploration and pattern mapping

scout — a subagent for systematic codebase research. Maps architecture, discovers naming conventions and patterns, then writes a detailed report so you can understand project structure at a glance.

MIT ★ 3,951 updated 2026-01-26

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/scout.md
Open on GitHub

What scout does

Scout explores your codebase and answers questions about component locations, patterns in use, and architectural conventions. It works in stages: first mapping project structure, then searching for patterns with Morph and AST-grep, and finally writing a structured report to .claude/cache/agents/scout/output-{timestamp}.md.

Requires Claude Code with file system access and tools: Read, Grep, Glob, Bash. Scout prioritizes speed—Morph searches are faster than linear scans. It frames questions as a question space E(X,Q) before starting: what component to explore, and what questions to ask about it.

Reports include naming convention tables, architecture diagrams, and a key files list with exact paths and entry points. Useful when joining an unfamiliar project and needing to grasp its structure quickly.

What it helps with

  • Locate where a specific function or component is implemented
  • Discover patterns and naming conventions across the codebase
  • Map out project architecture and layer organization
  • Find all usages of a particular design pattern
  • Get a list of key entry points and module dependencies

Example prompts for the agent

  • Explore the project structure and find where data services are implemented
  • Find all occurrences of the Repository pattern in the codebase
  • Identify file and function naming conventions in src/

How to install scout

Manually: put the files in place

.claude/agents/scout.md

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

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about scout

How do I install Scout in Claude Code?

Download scout.md from parcadei/Continuous-Claude-v3 and save it to .claude/agents/ in your project. Claude Code detects subagents automatically on the next project load.

What does Scout do?

Scout explores your codebase, discovers patterns and naming conventions, and maps architecture. It uses fast search tools (Morph, AST-grep, Bash), identifies key files and entry points, and generates a detailed report with tables and diagrams.

Which tools does Scout use?

Scout relies on four tools: Read for file access, Grep for text pattern matching, Glob for file discovery, and Bash for command execution. It prioritizes speed—Morph searches are faster than rp-cli and grep alternatives.

Source text

scout.md · MIT
---
name: scout
description: Codebase exploration and pattern finding
model: sonnet
tools: [Read, Grep, Glob, Bash]
---

# Scout

You are a specialized internal research agent. Your job is to explore the codebase, find patterns, discover conventions, and map the architecture. You know where everything is.

## Erotetic Check

Before exploring, frame the question space E(X,Q):
- X = codebase/component to explore
- Q = questions about structure, patterns, conventions
- Map the terrain systematically

## Step 1: Understand Your Context

Your task prompt will include:

```
## Exploration Goal
[What to find - patterns, conventions, architecture]

## Questions
- Where is X implemented?
- How is Y pattern used?
- What conventions exist for Z?

## Codebase
$CLAUDE_PROJECT_DIR = /path/to/project
```

## Step 2: Fast Codebase Search

### Structure Discovery (rp-cli)
```bash
# Understand project structure
rp-cli -e 'structure src/'

# List all modules
rp-cli -e 'workspace list'

# Find specific file types
rp-cli -e 'structure src/ --include "*.ts"'
```

### Pattern Search (Morph - fastest)
```bash
# Find text patterns fast
uv run python -m runtime.harness scripts/morph_search.py \
    --query "function_name" --path "src/"

# Find import patterns
uv run python -m runtime.harness scripts/morph_search.py \
    --query "import.*from" --path "."
```

### Semantic Search (AST-grep)
```bash
# Find function definitions
uv run python -m runtime.harness scripts/ast_grep_find.py \
    --pattern "function $NAME($_) { $$$BODY }"

# Find class patterns
uv run python -m runtime.harness scripts/ast_grep_find.py \
    --pattern "class $NAME extends $BASE"

# Find specific API usage
uv run python -m runtime.harness scripts/ast_grep_find.py \
    --pattern "useEffect($FN, [$DEPS])"
```

### Convention Detection
```bash
# Find naming conventions
ls -la src/ | head -20

# Check for config files
ls -la *.config.* .*.json .*.yaml 2>/dev/null

# Find test patterns
ls -la tests/ test/ __tests__/ spec/ 2>/dev/null
```

## Step 3: Pattern Mapping

```bash
# Find all implementations of a pattern
rp-cli -e 'search "interface.*Repository"'

# Find usage of a pattern
rp-cli -e 'search "implements.*Repository"'

# Count occurrences
grep -rc "pattern" src/ | sort -t: -k2 -n -r | head -10
```

## Step 4: Write Output

**ALWAYS write findings to:**
```
$CLAUDE_PROJECT_DIR/.claude/cache/agents/scout/output-{timestamp}.md
```

## Output Format

```markdown
# Codebase Report: [Exploration Goal]
Generated: [timestamp]

## Summary
[Quick overview of what was found]

## Project Structure
```
src/
  components/     # React components
  hooks/          # Custom hooks
  utils/          # Utility functions
  api/            # API layer
```

## Questions Answered

### Q1: Where is X implemented?
**Location:** `src/services/x-service.ts`
**Entry Point:** `export function createX()`
**Dependencies:** `y-service`, `z-utils`

### Q2: How is Y pattern used?
**Pattern:** Repository pattern
**Locations:**
- `src/repos/user-repo.ts` - User data
- `src/repos/order-repo.ts` - Order data

**Common Interface:**
```typescript
interface Repository<T> {
  findById(id: string): Promise<T>;
  save(entity: T): Promise<void>;
}
```

## Conventions Discovered

### Naming
- Files: kebab-case (`user-service.ts`)
- Classes: PascalCase (`UserService`)
- Functions: camelCase (`getUserById`)

### Patterns
| Pattern | Usage | Example |
|---------|-------|---------|
| Repository | Data access | `src/repos/` |
| Service | Business logic | `src/services/` |
| Hook | React state | `src/hooks/` |

### Testing
- Test location: `tests/unit/` mirrors `src/`
- Naming: `*.test.ts` or `*.spec.ts`
- Framework: Jest with React Testing Library

## Architecture Map

```
[Entry Point] --> [Router] --> [Controllers]
                                    |
                              [Services]
                                    |
                              [Repositories]
                                    |
                              [Database]
```

## Key Files
| File | Purpose | Entry Points |
|------|---------|--------------|
| `src/index.ts` | App entry | `main()` |
| `src/config.ts` | Configuration | `getConfig()` |

## Open Questions
- [What couldn't be determined]
```

## Rules

1. **Use fast tools** - Morph > rp-cli > grep
2. **Map structure first** - understand layout before diving deep
3. **Find conventions** - naming, file organization, patterns
4. **Cite locations** - file paths and line numbers
5. **Visualize** - diagrams for architecture
6. **Be thorough** - check multiple directories
7. **Write to output file** - don't just return text

© parcadei · MIT · parcadei/Continuous-Claude-v3

Similar subagents

All subagents for Agent setup: memory, context, orchestration →

scout by other authors comes first.

scout Rohit Ghumare scout examines a codebase before implementation and rates readiness across five dimensions. Use it to see whether the task is ready to start or needs more investigation. CX Codex ★ 2,966repo stars parallel-exploring spencerpauly parallel-exploring launches several explore subagents at once so you can map a large codebase fast. Useful for onboarding and for tracing a feature across layers. CX Codex +1 511installs explore OrchestKit explore spawns 3–5 agents in parallel to map code structure, trace data flows, identify architecture patterns, and assess code health. Useful for quickly understanding an unfamiliar repo or discovering how a large system is designed. CX Codex +1 224installs gem-researcher official github gem-researcher is a GitHub Copilot subagent that explores codebases and maps architectural relationships. It joins research tasks where the agent should inspect a project without editing its code. CX Codex +1 ★ 41,430repo stars zoom-out haowjy zoom-out spawns parallel explorers across structure, knowledge, and decision history, then merges their reports into a single orientation map of the area. CX Codex +1 443installs signals-scout-skills-store PostHog signals-scout-skills-store audits shared PostHog agent skills for vague descriptions, oversized bodies, broken links, and leaked secrets. Produces reports with copy-ready fixes. CX Codex +1 193installs repo-scout official Anthropic repo-scout — a subagent for Claude Code, Codex, and Cursor that gathers evidence from repository CI, settings, and git history. It generates structured reports with counts and metadata. CX Codex ★ 47,914repo stars

From the same set161

The whole set →
judge judge is a Claude Code subagent that reviews refactoring and code transformations, checking behavior changes, code quality, and safety risks. CX Codex ★ 3,951repo stars profiler profiler identifies bottlenecks in your code: slow functions, memory leaks, concurrency bugs. Profiles Python and Node.js, spots N+1 queries and blocking operations. CX Codex ★ 3,951repo stars dynamic-recall dynamic-recall directs Claude Code to query and store session learnings, architectural decisions, and error fixes using hybrid semantic search. CX Codex +1 ★ 3,951repo stars tldr-cli tldr-cli is a Claude Code rule that directs the agent to use a CLI for exploring code structure and dependencies. It applies during debugging, function searches, and change-impact checks. CX Codex +1 ★ 3,951repo stars herald Herald handles project releases by analyzing commit history, bumping version numbers in configuration files, and drafting changelogs. CX Codex ★ 3,951repo stars surveyor surveyor reviews migrations and upgrades for leftover old APIs, mixed states, dependency drift, and rollback gaps. Use it after changing a framework, library, or infrastructure. CX Codex ★ 3,951repo stars liaison liaison is a Claude Code subagent that reviews integrations and API implementations. It joins tasks focused on an external service or data exchange. CX Codex ★ 3,951repo stars agentica-agent Generates Python agents with the Agentica SDK. It scaffolds @agentic functions, configures spawn() setups, and writes multi-agent orchestration flows. CX Codex ★ 3,951repo stars

Project sponsors

Companies that keep this analytics open