---
name: deepsearch
description: Thorough codebase search for finding all occurrences of a pattern
---

# Deep Search Skill

Perform a comprehensive search of the codebase for a specified query, pattern, or concept.

## When to Use

- When you need to find ALL occurrences of something
- When exploring how a feature or concept is used across the codebase
- When tracking down dependencies or usage patterns
- When a simple grep isn't enough

## Search Strategy

### 1. Broad Search
- Search for exact matches of the query
- Search for related terms and variations (plural, camelCase, snake_case)
- Check common locations (components, utils, services, hooks)

### 2. Deep Dive
- Read files with matches to understand context
- Check imports/exports to find connections
- Follow the trail (what imports this? what does this import?)

### 3. Synthesize
- Map out where the concept is used
- Identify the main implementation
- Note related functionality

## Output Format

Provide results in this structure:

### Primary Locations
Files containing the main implementations:
- `path/to/file.ts:42` - [description]

### Related Files
Files that use, import, or relate to the concept:
- `path/to/consumer.ts` - [how it uses the concept]

### Usage Patterns
Common ways this is used across the codebase.

### Key Insights
Patterns, conventions, or gotchas discovered.

## Tips

- Use multiple search terms (exact match, regex, variations)
- Don't stop at the first result - be comprehensive
- Always cite file paths and line numbers
- Note any inconsistencies or technical debt found
