context7
Fetch official documentation for major libraries and frameworks. Use for library lookups, API references, how-to queries, and framework-specific questions
When & Why to Use This Skill
Context7 is a specialized Claude skill designed to fetch real-time official documentation for major libraries and frameworks. It bridges the gap between AI generation and technical accuracy by providing direct access to API references, implementation patterns, and conceptual guides. By integrating official documentation into the AI's context, it significantly reduces hallucinations and ensures that code suggestions align with the latest best practices for technologies like React, Vue, Express, and more.
Use Cases
- API Reference Lookup: Quickly retrieve precise function signatures, parameter definitions, and return types for specific library methods to ensure syntactical correctness.
- Framework Versioning Research: Access version-specific documentation (e.g., Next.js 14 App Router vs. Pages Router) to handle breaking changes and architectural shifts accurately.
- Best Practices & Implementation: Fetch official 'how-to' guides and recommended patterns for complex tasks like state management, hooks usage, or server-side rendering.
- Conceptual Learning: Use the 'info' mode to retrieve high-level architectural explanations and conceptual guides to better understand how a specific framework operates.
- Code Sample Extraction: Pull verified code examples directly from official sources to use as templates for new feature development.
| name | context7 |
|---|---|
| description | Fetch official documentation for major libraries and frameworks. Use for library lookups, API references, how-to queries, and framework-specific questions |
Context7 Documentation Lookup
Retrieves official documentation for libraries and frameworks.
Workflow
1. Resolve Library ID (Required)
mcp__context7__resolve-library-id
libraryName: "react" or "vue" or "express"
2. Fetch Documentation
mcp__context7__get-library-docs
context7CompatibleLibraryID: "/vuejs/core"
topic: "composition-api" # Optional: specific topic
mode: "code" # "code" or "info"
page: 1 # Paginate if needed
Mode Selection
code (default): API references, code examples, implementation patterns
info: Conceptual guides, architecture explanations
Tips
- Always resolve library ID first (don't guess ID format)
- Use
page: 2, 3...if initial results insufficient - Try alternative library names if no results (e.g., "vue router" vs "vue-router")
- Version-specific IDs:
/org/project/v3
When to Use
- Library API specification lookup
- Official best practices
- Framework-specific implementation patterns
- Code examples and samples
Examples
User: How to use React Hooks?
Agent: Fetches React official docs and explains Hooks patterns
User: Next.js 14 App Router usage?
Agent: Retrieves Next.js v14 docs and explains App Router