From claude-code-expert
Routes research tasks to optimal tools via decision tree: Context7 for library docs, Perplexity Ask/Search/Research for Q&A/events/deep analysis, Firecrawl for URL scraping/mapping/extraction.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-expert:research-routingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Optimal routing of research tasks across Perplexity MCP, Firecrawl MCP, and Context7 MCP.
Optimal routing of research tasks across Perplexity MCP, Firecrawl MCP, and Context7 MCP. Each tool has distinct strengths — use the right one for each job.
| Tool | Best For | Cost | Speed |
|---|---|---|---|
| Context7 | Library/framework docs, API reference | Free | Fast (cached <5ms) |
| Perplexity Ask | Knowledge Q&A, current events, fact-checking | ~$0.02/query | Fast |
| Perplexity Research | Deep investigations, comprehensive reports | ~$0.10/query | Slow |
| Firecrawl Scrape | Extract content from specific URL | 1 credit | Fast |
| Firecrawl Map | Discover all URLs on a site | 1 credit | Fast |
| Firecrawl Extract | Structured JSON from pages | 5-20 credits | Medium |
| Firecrawl Agent | Autonomous multi-page research | 100-1500+ credits | Slow |
What do you need to find out?
├─ LIBRARY DOCS?
│ "How does React useEffect work?"
│ "What's the Prisma findMany API?"
│ "Next.js App Router conventions?"
│ └─→ Context7 (resolve-library-id → query-docs)
│ Free, current, version-specific, no hallucination
│
├─ GENERAL KNOWLEDGE?
│ "What is the latest in AI?"
│ "Explain event sourcing"
│ "Compare Redis vs Memcached"
│ └─→ Perplexity Ask (perplexity_ask)
│ Fast, cheap, citations included
│
├─ CURRENT EVENTS?
│ "What happened at AWS re:Invent?"
│ "Latest security vulnerability in Log4j?"
│ └─→ Perplexity Search (perplexity_search)
│ Real-time web search with ranked results
│
├─ DEEP RESEARCH?
│ "Comprehensive comparison of 5 auth solutions"
│ "Full analysis of microservice vs monolith tradeoffs"
│ └─→ Perplexity Research (perplexity_research)
│ Deep-Research model, thorough, multiple sources
│
├─ EXTRACT FROM KNOWN URL?
│ "Get the pricing from https://example.com/pricing"
│ "Extract the API reference from this page"
│ └─→ Firecrawl Scrape (firecrawl_scrape)
│ 1 credit, clean markdown or JSON output
│
├─ FIND PAGES ON A SITE?
│ "What docs pages exist on docs.example.com?"
│ "Find the webhook documentation page"
│ └─→ Firecrawl Map (firecrawl_map)
│ Discover URLs, then scrape the relevant ones
│
├─ STRUCTURED DATA EXTRACTION?
│ "Get all product prices as JSON from this catalog"
│ "Extract API endpoints with parameters"
│ └─→ Firecrawl Extract (firecrawl_extract)
│ Custom JSON schema extraction
│
└─ COMPLEX MULTI-SOURCE?
"Research X across official docs, blogs, and forums"
└─→ Chain: Context7 → Perplexity → Firecrawl
1. Context7: Official library docs (free)
2. Perplexity: Broader knowledge synthesis ($0.02)
3. Firecrawl: Extract from specific URLs found (1 credit each)
onlyMainContent: true to skip headers/footerswaitFor: 5000search parameter to find specific pageslimit and maxDiscoveryDepthfirecrawl_agent_statusQuality audits and planners MUST use Context7.
Before auditing code:
1. Identify libraries used in the code under review
2. Context7: resolve-library-id for each library
3. Context7: query-docs for current best practices
4. Compare code against official patterns
5. Flag deviations as audit findings with doc links
Before designing architecture:
1. List all proposed libraries/frameworks
2. Context7: verify API compatibility for each
3. Context7: check for breaking changes between versions
4. Context7: find recommended integration patterns
5. Include doc-backed justifications in plan
During review:
1. Identify library API calls in changed code
2. Context7: verify correct API usage
3. Context7: check for deprecated methods
4. Flag incorrect usage with links to official docs
For a typical research task:
| Approach | Cost | When to Use |
|---|---|---|
| Context7 only | Free | Library docs, API reference |
| Perplexity only | ~$0.02 | Knowledge Q&A, current events |
| Context7 + Perplexity | ~$0.02 | Library + broader context |
| Perplexity + Firecrawl Scrape | ~$0.03 | Knowledge + extraction |
| Full chain (all 3) | ~$0.05 | Comprehensive research |
| Firecrawl Agent | $0.08-$1.20 | AVOID — use chain instead |
Rule: Start cheap (Context7 → Perplexity → Firecrawl Scrape). Only escalate if cheaper tools don't have the answer.
npx claudepluginhub markus41/claude --plugin claude-code-expertPerforms web search and scraping with context isolation using Python subprocesses. Only curated output enters the context, saving 100-200x tokens. Triggered by 'search for', 'look up', 'find', 'research'.
Executes web searches via Tavily, filters and extracts content inside Python so only curated results enter the context window. Activates on research queries like "search for", "look up", or "find".
Token-efficient web research protocol that prioritizes minimal fetching. Guides API-based GitHub repo analysis, layered URL scraping, and search queries.