deepsearch
Scannednpx machina-cli add skill speson/not-my-reforge/deepsearch --openclawYou have the deepsearch skill. When invoked, execute a multi-strategy search across the codebase.
Usage
/not-my-reforge:deepsearch <query>
Search Strategies
Execute these strategies in parallel using the Task tool:
1. Text Search (Grep)
- Search for the exact query string
- Search for variations: camelCase, snake_case, PascalCase, kebab-case
- Search with context (-C 3) for surrounding code
2. File Pattern Search (Glob)
- Find files whose names match the query
- Search related naming patterns (e.g., "auth" →
*auth*,*login*,*session*)
3. Git History (Bash)
git log --all --oneline --grep="<query>"— commits mentioning the querygit log --all --diff-filter=A -- "*<query>*"— when files were addedgit log -p -S "<query>" --all -- "*.ts" "*.js"— pickaxe search for code changes
4. Import/Reference Tracing (Grep + Read)
- Find all files that import/require modules matching the query
- Trace the dependency chain: who uses what
- Check re-exports and barrel files
5. Symbol Definition Search (Grep)
function <query>,class <query>,interface <query>,type <query>const <query>,export .* <query>- Language-appropriate patterns based on detected tech stack
Output Format
## DeepSearch Results: "<query>"
### Definitions (N found)
- `file:line` — type/function/class definition
### Usage Sites (N found)
- `file:line` — how it's used (import, call, reference)
### Related Files (N found)
- `file` — related by name or content
### Git History (N commits)
- `hash` — commit message (date)
### Confidence
- High: exact match in definition
- Medium: usage/import reference
- Low: name similarity only
Rules
- Launch strategies in parallel for speed
- Deduplicate results across strategies
- Sort by relevance: definitions → usages → references → history
- Cap at 20 results per strategy to avoid noise
- Show file:line format for easy navigation
- If no results, suggest alternative queries
Source
git clone https://github.com/speson/not-my-reforge/blob/main/skills/deepsearch/SKILL.mdView on GitHub Overview
deepsearch runs five strategies in parallel to locate code across a base: text search, file patterns, git history, import tracing, and symbol definitions. It’s designed to be fast and thorough, uncovering definitions, usages, references, and historical context to help you understand code relationships at scale.
How This Skill Works
When invoked, deepsearch launches Text Search, Glob, Git History, Import Tracing, and Symbol Definition searches in parallel using the Task tool. It deduplicates results, sorts by relevance (definitions → usages → references → history), and caps results at 20 per strategy. Output follows a structured DeepSearch Results format to ease navigation.
When to Use It
- You need to locate where a function or symbol is defined and all its usages across a mixed TS/JS codebase
- You want to discover where a module or API is imported, used, or re-exported across files
- You're auditing code changes and want commits mentioning a specific term or feature
- You're dealing with naming variations (camelCase, snake_case, PascalCase) and need to surface all forms
- You aim to quickly scan a large repo for all occurrences of a particular query and its related files
Quick Start
- Step 1: /not-my-reforge:deepsearch <query>
- Step 2: review results; adjust query variants and add context as needed
- Step 3: open file:line results to inspect definitions, usages, and history
Best Practices
- Run all five strategies in parallel and review results collectively to catch cross-cutting references
- Provide precise queries (including casing variants and common patterns) to improve hits
- Use context options (-C upstream/downstream) in text searches for meaningful code snippets
- Deduplicate across strategies to avoid repeating the same file:line results
- Respect the 20-result cap per strategy to keep results focused and actionable
Example Use Cases
- Find where a function authenticateUser is defined and all call sites across a TS project
- Trace where a module named dbClient is imported, used, and re-exported in barrel files
- Identify commits mentioning feature flag rollout across all branches with git history
- Locate all references to a symbol RequestHandler and its definitions in a Node backend
- Scan for initializeServer occurrences in JS/TS files to map startup sequences