search
Deep search mode - parallel multi-source search across codebase, docs, and web
When & Why to Use This Skill
This Claude skill implements a sophisticated 'Deep Search Mode' that orchestrates parallel agent swarms to perform multi-source technical discovery. By simultaneously scanning local codebases using AST and LSP tools while querying external documentation and global repositories, it solves the problem of fragmented information gathering, allowing developers to synthesize complex technical answers from both internal logic and external best practices instantly.
Use Cases
- Large-Scale Codebase Navigation: Quickly locate specific architectural patterns or symbol usages across massive local repositories using structural search (ast_grep) and LSP references.
- Comprehensive Technical Research: Simultaneously retrieve official documentation and real-world open-source examples from GitHub to implement new libraries using best practices.
- Complex Debugging & Root Cause Analysis: Trace local execution logic while searching web-based issue trackers and git history to understand why a specific behavior occurs.
- Automated Technical Documentation: Execute deep searches and automatically format the findings into structured Obsidian notes for project knowledge management.
| name | search |
|---|---|
| description | Deep search mode - parallel multi-source search across codebase, docs, and web |
DEEP SEARCH MODE
Current Time: !date
Execute a comprehensive search using parallel agent swarms across multiple sources.
Search Protocol
Layer 1: Local Codebase (Parallel)
Launch explore swarm with different angles:
background_task(agent="explore", prompt="Find [pattern] by filename...")
background_task(agent="explore", prompt="Find [pattern] in code content...")
background_task(agent="explore", prompt="Find related patterns and usages...")
Simultaneously use direct tools:
glob— Find files by name patterngrep— Find content matchesast_grep_search— Find structural patternslsp_find_references— Find symbol usages
Layer 2: External Research (Parallel)
Launch librarian for external sources:
background_task(agent="librarian", prompt="Find official docs for [topic]...")
background_task(agent="librarian", prompt="Find OSS examples of [pattern]...")
Librarian searches:
- Context7 — Official library documentation
- grep.app — GitHub code search across millions of repos
- Exa — Web search for blog posts, tutorials, discussions
Layer 3: Deep Dive (As Needed)
For complex searches:
- Clone relevant repos for source analysis
- Check git history for evolution
- Search issues/PRs for context
Search Output Format
## Local Codebase Results
### Direct Matches
- `/path/to/file.go:42` — [why this matches]
- `/path/to/file.go:128` — [why this matches]
### Related Code
- `/path/to/related.go` — [how it's related]
### Patterns Found
[Describe any patterns or conventions discovered]
## External Resources
### Official Documentation
- [Link] — [what it covers]
### Code Examples
- [GitHub permalink] — [what this demonstrates]
### Articles/Tutorials
- [Link] — [relevance]
## Summary
[Synthesize findings: what was found, what's most relevant, what to do next]
## Recommended Next Steps
1. [Action based on findings]
Search Strategies by Query Type
| Query Type | Strategy |
|---|---|
| "Where is X?" | explore swarm + glob + grep |
| "How does Y work?" | explore + read key files + trace |
| "Best practice for Z" | librarian (context7 + exa) |
| "Examples of W" | librarian (grep.app + context7) |
| "Why does V behave..." | explore + librarian + git history |
Output
Write to Obsidian via obsidian_append_content at:
$OBSIDIAN_PATH/Searches/YYYY-MM-DD-query.md
Note:
$OBSIDIAN_PATHmust be a vault-relative path (e.g.,Projects/myapp), set per-project via direnv. Theobsidian_append_contenttool expects paths relative to the vault root.
Document Structure
Use this template for the Obsidian document:
@~/.config/opencode/templates/search-results.md
Search Query
$ARGUMENTS