Core Skill. Access up-to-date, version-specific official documentation and code examples for libraries, frameworks, and tools via the Context7 MCP server.
This skill prevents hallucinations, outdated APIs, or deprecated patterns by injecting real, current docs directly into reasoning and code generation.
Be aware that your knowledge has a cutoff point, and recognize the importance of the latest information.
This skill exposes two main underlying MCP functions (the agent/tool automatically handles them):
Library Resolution
/nextjs/nextjs or /supabase/supabaseDocumentation & Example Retrieval
Be specific in the query part after the trigger → better relevance & smaller context usage.
Good: "How to use the new unstable_cache in Next.js? use context7"
Bad: "Next.js stuff use context7" (too vague → more noise)
For version-specific needs, mention the version explicitly:
"useContext hook changes in React 19? use context7"
Chain with other tools if needed (e.g. resolve library → get docs → then code gen).
If the library isn't found, fall back to web search or say "Library not indexed in Context7 yet."
Prompt: Write a middleware to verify JWT from cookies in Next.js App Router. use context7
Expected behavior:
Agent resolves "Next.js" → pulls latest middleware docs → generates accurate code using current patterns (e.g. NextRequest, cookies() helper).
Prompt: Show usage of createClient in @supabase/supabase-js v2. use context7
Expected behavior: Fetches v2 docs → returns correct import + initialization example.
Use this skill whenever accuracy and freshness matter more than speed.