search-router
Automatically routes code queries to the most appropriate search utility.
Install
mkdir -p .claude/skills/search-router && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4676" && unzip -o skill.zip -d .claude/skills/search-router && rm skill.zipInstalls to .claude/skills/search-router
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Choose the right search tool for each query typeKey capabilities
- →Route queries to TLDR search
- →Route queries to AST-grep
- →Route queries to TLDR Semantic
- →Route queries to Grep
- →Route queries to Read tool
How it works
It evaluates the query type to select the most token-efficient search tool from a predefined hierarchy. It prioritizes TLDR search for code exploration and reserves Grep for literal text searches.
Inputs & outputs
When to use search-router
- →Exploring code symbols and call chains
- →Investigating conceptual logic
- →Locating code structures
- →Searching for regex patterns
About this skill
Search Tool Router
Use the most token-efficient search tool for each query type.
When to Use
- Searching for code patterns
- Finding where something is implemented
- Looking for specific identifiers
- Understanding how code works
Decision Tree
Query Type?
├── CODE EXPLORATION (symbols, call chains, data flow)
│ → TLDR Search - 95% token savings
│ DEFAULT FOR ALL CODE SEARCH - use instead of Grep
│ Examples: "spawn_agent", "DataPoller", "redis usage"
│ Command: tldr search "query" .
│
├── STRUCTURAL (AST patterns)
│ → AST-grep (/ast-grep-find) - ~50 tokens output
│ Examples: "def foo", "class Bar", "import X", "@decorator"
│
├── SEMANTIC (conceptual questions)
│ → TLDR Semantic - 5-layer embeddings (P6)
│ Examples: "how does auth work", "find error handling patterns"
│ Command: tldr semantic search "query"
│
├── LITERAL (exact text, regex)
│ → Grep tool - LAST RESORT
│ Only when TLDR/AST-grep don't apply
│ Examples: error messages, config values, non-code text
│
└── FULL CONTEXT (need complete understanding)
→ Read tool - 1500+ tokens
Last resort after finding the right file
Token Efficiency Comparison
| Tool | Output Size | Best For |
|---|---|---|
| TLDR | ~50-500 | DEFAULT: Code symbols, call graphs, data flow |
| TLDR Semantic | ~100-300 | Conceptual queries (P6, embedding-based) |
| AST-grep | ~50 tokens | Function/class definitions, imports, decorators |
| Grep | ~200-2000 | LAST RESORT: Non-code text, regex |
| Read | ~1500+ | Full understanding after finding the file |
Examples
# CODE EXPLORATION → TLDR (DEFAULT)
tldr search "spawn_agent" .
tldr search "redis" . --layer call_graph
# STRUCTURAL → AST-grep
/ast-grep-find "async def $FUNC($$$):" --lang python
# SEMANTIC → TLDR Semantic
tldr semantic search "how does authentication work"
# LITERAL → Grep (LAST RESORT - prefer TLDR)
Grep pattern="check_evocation" path=opc/scripts
# FULL CONTEXT → Read (after finding file)
Read file_path=opc/scripts/z3_erotetic.py
Optimal Flow
1. AST-grep: "Find async functions" → 3 file:line matches
2. Read: Top match only → Full understanding
3. Skip: 4 irrelevant files → 6000 tokens saved
Related Skills
/tldr-search- DEFAULT - Code exploration with 95% token savings/ast-grep-find- Structural code search/morph-search- Fast text search
When not to use it
- →When a specific tool is already known to be optimal
- →For non-code text when TLDR or AST-grep apply
Limitations
- →Grep is a last resort
- →Read tool is only for full context after finding the file
How it compares
Unlike manual searching, this router enforces a token-efficient strategy by automatically selecting the tool based on query intent.
Compared to similar skills
search-router side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| search-router (this skill) | 1 | 7mo | Review | Beginner |
| firecrawl-scrape | 5 | 7mo | Review | Beginner |
| call-prep | 3 | 6mo | No flags | Beginner |
| adaptyv | 7 | 7mo | Caution | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by parcadei
View all by parcadei →You might also like
firecrawl-scrape
parcadei
Scrape web pages and extract content via Firecrawl MCP
call-prep
anthropics
Prepare for a sales call with account context, attendee research, and suggested agenda. Works standalone with user input and web research, supercharged when you connect your CRM, email, chat, or transcripts. Trigger with "prep me for my call with [company]", "I'm meeting with [company] prep me", "call prep [company]", or "get me ready for [meeting]".
adaptyv
davila7
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding assays, expression testing, thermostability measurements, enzyme activity assays, or protein sequence optimization. Also use for submitting experiments via API, tracking experiment status, downloading results, optimizing protein sequences for better expression using computational tools (NetSolP, SoluProt, SolubleMPNN, ESM), or managing protein design workflows with wet-lab validation.
universal-learner
huangserva
通用学习器 - 从任何领域的Prompt中自动提取可复用元素,持续学习和积累知识
youtube-collector
greatSumini
유튜브 채널을 등록하고 새 컨텐츠를 수집하여 자막 기반 요약을 생성하는 skill. 사용자가 (1) 유튜브 채널 등록/관리를 요청하거나, (2) 등록된 채널의 새 영상 수집을 요청하거나, (3) 유튜브 영상 요약을 요청할 때 사용. 데이터는 .reference/ 폴더에 YAML 형식으로 저장됨.
batch-research
miantiao-me
批量数据采集技能,负责分批并发调度 researcher agent 抓取所有数据源。