research-routing
# Research Tool Routing
What this skill does
# Research Tool Routing
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 Strengths at a Glance
| 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 |
## Decision Tree
```
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)
```
## Perplexity MCP Tools
### perplexity_search
- **Best for**: Finding URLs, quick fact-checking, ranked results
- **Model**: Sonar (fast, cheap)
- **Output**: Search results with URLs, snippets, rankings
### perplexity_ask
- **Best for**: Direct Q&A, conversational answers with citations
- **Model**: Sonar-Pro (balanced speed/quality)
- **Output**: Text answer + source citations
- **Context**: 128K tokens for comprehensive analysis
### perplexity_research
- **Best for**: Deep investigations, detailed reports
- **Model**: Sonar-Deep-Research
- **Output**: Comprehensive analysis with multiple sources cited
- **Cost**: 3-5x more than perplexity_ask
### perplexity_reason
- **Best for**: Logical analysis, structured problem-solving
- **Model**: Sonar-Reasoning-Pro
- **Output**: Step-by-step reasoning with conclusions
## Firecrawl MCP Tools
### firecrawl_scrape
- **Best for**: Single page content extraction
- **Cost**: 1 credit (cheapest Firecrawl operation)
- **Formats**: markdown, JSON, HTML, screenshot, branding
- **Tip**: Use `onlyMainContent: true` to skip headers/footers
- **Tip**: For JS-rendered pages, add `waitFor: 5000`
### firecrawl_map
- **Best for**: Discovering URLs on a site before scraping
- **Tip**: Use `search` parameter to find specific pages
- **Workflow**: Map → identify relevant URLs → Scrape each
### firecrawl_search
- **Best for**: Web search with optional content extraction
- **Alternative to**: Perplexity search (but costs credits)
- **Tip**: Prefer Perplexity for pure search; Firecrawl for search+extract
### firecrawl_extract
- **Best for**: Structured JSON extraction with custom schemas
- **Cost**: 5-20 credits per extraction
- **Required**: JSON schema defining expected output structure
- **Tip**: Only use when you need structured data, not just text
### firecrawl_crawl
- **Best for**: Multi-page bulk extraction
- **Cost**: Variable (1 credit per page crawled)
- **Warning**: Can exceed token limits — set `limit` and `maxDiscoveryDepth`
### firecrawl_agent
- **Cost**: 100-1,500+ credits per task (UNPREDICTABLE)
- **Use**: ONLY as last resort when map+scrape fails
- **Warning**: Async — requires polling `firecrawl_agent_status`
### firecrawl_browser_*
- **Best for**: Interactive automation (forms, clicks, JavaScript)
- **Workflow**: browser_create → browser_execute → browser_delete
- **Use**: Only when scrape fails on highly interactive pages
## Context7 MCP Tools
### resolve-library-id
- **Purpose**: Map library name to Context7 ID
- **Input**: Library name (e.g., "react", "prisma", "next.js")
- **Output**: Library ID (e.g., "/facebook/react")
- **Cache**: 1hr (very fast on repeat calls)
### query-docs
- **Purpose**: Fetch documentation for a resolved library
- **Input**: Library ID + specific question
- **Output**: Relevant docs, API reference, examples
- **Cache**: 30min for docs content
- **Tip**: Be specific — "useCallback hook" not just "React"
## Chaining Strategies
### Strategy 1: Knowledge → Extraction
1. **Perplexity Ask**: "What's the best library for X? Give me the official URL"
2. **Firecrawl Scrape**: Extract clean content from the official page
3. **Benefit**: Perplexity finds the best source; Firecrawl gets clean content
### Strategy 2: Docs → Knowledge → Validation
1. **Context7**: Get official library docs for the framework
2. **Perplexity Ask**: "Common patterns for using X with Y"
3. **Context7**: Verify patterns against official docs
4. **Benefit**: Official docs + community knowledge, validated
### Strategy 3: Map → Scrape → Synthesize
1. **Firecrawl Map**: Discover all pages on a documentation site
2. **Firecrawl Scrape**: Extract content from relevant pages
3. **Perplexity Ask**: Synthesize findings into actionable answer
4. **Benefit**: Comprehensive coverage + clean synthesis
### Strategy 4: Avoid Agent Costs
1. **Perplexity Research**: Get comprehensive answer with sources
2. **Only use Firecrawl Agent** if structured JSON from 5+ sources is required
3. **Benefit**: Cut 90% of autonomous browsing costs
## Mandatory Context7 Usage
**Quality audits and planners MUST use Context7.**
### For Quality Audits
```
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
```
### For Planning Agents
```
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
```
### For Code Review
```
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
```
## Cost Budget Guidelines
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 + broaderRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.