doc-search

Automatically activates when documentation lookup is needed. Routes to the optimal source (Sanity MCP, Context7, Ref, or WebSearch) based on the technology being queried.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026⬇️1downloads

When & Why to Use This Skill

The Smart Documentation Search skill is an intelligent routing engine designed to streamline technical research and eliminate manual documentation lookups. By automatically identifying the need for technical info, it routes queries to the most authoritative sources—ranging from specialized MCP servers for Sanity and GitHub to curated libraries in Context7—ensuring developers receive accurate, up-to-date API references, code snippets, and best practices without leaving their workflow.

Use Cases

  • Instantly retrieving API signatures and function parameters for popular frameworks like React, Next.js, and Tailwind CSS.
  • Accessing specialized technical specifications for Sanity CMS, including GROQ queries and schema configurations via dedicated MCP tools.
  • Finding verified code patterns and implementation examples to ensure new features follow library-specific best practices.
  • Performing deep-dive searches for obscure or niche libraries using Ref and WebSearch when standard documentation is insufficient.
  • Verifying syntax and checking for breaking changes in recent library versions to prevent coding errors before implementation.
namedoc-search
descriptionAutomatically activates when documentation lookup is needed. Routes to the optimal source (Sanity MCP, Context7, Ref, or WebSearch) based on the technology being queried.

Smart Documentation Search

Purpose

This skill automatically activates when you need to look up documentation, API references, or best practices. It intelligently routes to the best available source.

When to Activate

Invoke this skill when the request involves:

  • Looking up how to use a library/framework feature
  • Finding API references or function signatures
  • Searching for code examples or patterns
  • Checking best practices or conventions
  • Verifying correct usage before writing code

Routing Logic (Priority Order)

1. Native MCP Tools (if available)

Always check if a dedicated MCP server exists for the technology. MCP tools provide the most accurate, integrated results.

Technology MCP Tools Use For
Sanity mcp__Sanity__search_docs, mcp__Sanity__read_docs, mcp__Sanity__get_groq_specification, mcp__Sanity__get_sanity_rules Schemas, GROQ, Studio, Visual Editing
GitHub mcp__github__* (if configured) Repos, issues, PRs
Notion mcp__notion__* (if configured) Workspace docs
Other MCPs Check available tools Varies

How to detect: If mcp__[Technology]__ tools are available, use them first.

Use for well-indexed popular libraries. Context7 provides curated, high-quality code snippets.

Step 1: mcp__context7__resolve-library-id (get library ID)
Step 2: mcp__context7__get-library-docs (fetch docs)

Pre-resolved Library IDs (skip Step 1 for these):

Technology Context7 ID
React Router /remix-run/react-router
React /websites/react_dev
Next.js /vercel/next.js
Tailwind CSS /tailwindlabs/tailwindcss
TypeScript /microsoft/typescript
Prisma /prisma/prisma
Zod /colinhacks/zod
Vite /vitejs/vite
Astro /withastro/astro
tRPC /trpc/trpc
Drizzle /drizzle-team/drizzle-orm
shadcn/ui /shadcn-ui/ui

Parameters:

  • topic: Focus the search (e.g., "loaders", "hooks", "validation")
  • mode: "code" for API/examples, "info" for concepts/architecture

Use for broader searches across multiple sources.

Step 1: mcp__Ref__ref_search_documentation (search)
Step 2: mcp__Ref__ref_read_url (read specific URLs)

When to use:

  • Library not found in Context7
  • Need to search private repositories (add ref_src=private)
  • Looking for blog posts, tutorials, or discussions
  • Obscure or niche libraries

4. WebSearch (Fallback)

Use WebSearch as last resort for:

  • Very recent information (current year)
  • Comparing multiple solutions
  • Community discussions or Stack Overflow answers

Decision Flowchart

Is there an MCP for this technology?
├─ YES → Use MCP tools
└─ NO → Is it a popular library?
         ├─ YES → Use Context7
         └─ NO/Not found → Use Ref
                           └─ Still not enough? → WebSearch

Response Format

After retrieving documentation:

  1. Source: Which tool was used and why
  2. Summary: Concise answer to the query
  3. Code Examples: Relevant snippets (if applicable)
  4. Links: Source URLs for further reading

Important Rules

  • NEVER guess - always verify with documentation
  • Check MCP availability first - most accurate source
  • Use topic parameter in Context7 to focus results
  • Combine sources when query spans multiple technologies
  • Cite sources with URLs in your response