context7-docs
Fetch official library docs via Context7 MCP. Use for Tailwind CSS docs (grid, responsive variants), React, Next.js, Vue, MCP, OpenCode, or any npm library. Always use before external web search.
Best use case
context7-docs is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Fetch official library docs via Context7 MCP. Use for Tailwind CSS docs (grid, responsive variants), React, Next.js, Vue, MCP, OpenCode, or any npm library. Always use before external web search.
Teams using context7-docs should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/context7-docs/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How context7-docs Compares
| Feature / Agent | context7-docs | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Fetch official library docs via Context7 MCP. Use for Tailwind CSS docs (grid, responsive variants), React, Next.js, Vue, MCP, OpenCode, or any npm library. Always use before external web search.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Context7 Docs - Library Documentation Fetch up-to-date library documentation via the Context7 MCP server. Use this skill when you need to research any npm library, framework, or tool. ## Quick Reference | Action | Command | Description | |--------|---------|-------------| | search | `./scripts/docs.sh search <library>` | Find library ID for a given name | | docs | `./scripts/docs.sh docs <library> [topic] [--tokens N]` | Get documentation for a library | | help | `./scripts/docs.sh help` | Show usage help | ## How to Use ### Natural Language - "Get React hooks documentation" - "Search for Next.js App Router docs" - "Find Vue 3 composition API documentation" - "Look up Tailwind CSS utilities" ### Script Commands ```bash # Search for a library ./scripts/docs.sh search react ./scripts/docs.sh search "next.js" # Get documentation (automatically resolves library ID) ./scripts/docs.sh docs react hooks ./scripts/docs.sh docs next.js "app router" ./scripts/docs.sh docs tailwindcss utilities # Get general documentation without topic filter ./scripts/docs.sh docs vue ``` ## Available Actions ### search Find the Context7-compatible library ID for a given library name. **Parameters:** - `library` (required): Library name to search for (e.g., "react", "next.js") **Example:** ```bash ./scripts/docs.sh search react # Returns: /npm/react, /websites/react_dev, etc. ``` ### docs Get documentation for a library, optionally filtered by topic. **Parameters:** - `library` (required): Library name (will be resolved to ID automatically) - `topic` (optional): Topic to filter documentation (e.g., "hooks", "routing") **Example:** ```bash # Get React hooks documentation ./scripts/docs.sh docs react hooks # Get general Next.js documentation ./scripts/docs.sh docs next.js # Get specific Vue documentation ./scripts/docs.sh docs vue "composition api" ``` ## Workflow This skill encodes the Context7 two-step workflow: 1. **Resolve Library ID**: Converts human-readable library name to Context7 ID 2. **Fetch Documentation**: Gets documentation using the resolved ID This is handled automatically by the `docs` action. ## Supported Libraries Context7 supports thousands of libraries including: - **Frontend**: React, Vue, Angular, Svelte, Solid - **Meta-frameworks**: Next.js, Nuxt, Remix, Astro, SvelteKit - **Styling**: Tailwind CSS, styled-components, Emotion - **State**: Redux, Zustand, Jotai, Pinia - **Backend**: Express, Fastify, Hono, Nest.js - **Databases**: Prisma, Drizzle, TypeORM, Mongoose - **Testing**: Jest, Vitest, Playwright, Cypress - **And many more...** ## Prerequisites - Node.js 18+ installed - curl installed - **Option A:** Install MCPorter via Homebrew: `brew tap steipete/tap && brew install mcporter` - **Option B:** Use via npx (no install required): `npx mcporter` > **Note:** Context7 server configuration is optional. The skill automatically falls back to the Context7 public URL (`https://mcp.context7.com/mcp`) if no local server is configured. ## Environment Variables - `CONTEXT7_SERVER`: MCP server name (default: `context7`) - `CONTEXT7_API_BASE`: Direct Context7 REST base URL (default: `https://context7.com/api/v2`) - `CONTEXT7_REST_FALLBACK`: Enable direct REST fallback when MCP calls fail (default: `1`) - `MCPORTER_TIMEOUT`: Timeout in seconds for MCPorter calls (default: `20`) ## Notes - Use this skill BEFORE searching external documentation - Topic filtering helps reduce context size - use specific topics when possible - Use `--tokens N` to control response size when context budget is tight - If a library isn't found, try alternative names (e.g., "nextjs" vs "next.js") - For generic MCP access, use the `mcporter` skill instead - Falls back to Context7 public MCP URL when server not configured locally - If MCP calls fail (including quota exhaustion), falls back to direct Context7 REST API when enabled
Related Skills
context7
Fetch up-to-date library documentation via Context7 REST API. Use when needing current API docs, framework patterns, or code examples for any library. Use when user asks about React, Next.js, Prisma, Express, Vue, Angular, Svelte, or any npm/PyPI package. Use when user says 'how do I use X library', 'what's the API for Y', or needs official documentation. Lightweight alternative to Context7 MCP with no persistent context overhead.
context7-usage
Patterns for using Context7 MCP for library documentation (v2.25)
context7-efficient
Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.
context7-auto-research
Automatically fetch latest library/framework documentation for Claude Code via Context7 API
awesome-copilot-root-context7
Expert in latest library versions, best practices, and correct syntax using up-to-date documentation Use when: the task directly matches context7 responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.
architecture-docs
Create and maintain architecture documentation with Mermaid diagrams. Use when writing technical documentation, system diagrams, or updating the implementation plan.
api-docs-generator
Generate API documentation in OpenAPI/Swagger, Markdown, or Postman Collection formats. Use when documenting REST APIs, GraphQL schemas, or creating client code examples.
openai-docs
Use when the user asks how to build with OpenAI products or APIs and needs up-to-date official documentation with citations (for example: Codex, Responses API, Chat Completions, Apps SDK, Agents SDK, Realtime, model capabilities or limits); prioritize OpenAI docs MCP tools and restrict any fallback browsing to official OpenAI domains.
openai-docs-skill
Query the OpenAI developer documentation via the OpenAI Docs MCP server using CLI (curl/jq). Use whenever a task involves the OpenAI API (Responses, Chat Completions, Realtime, etc.), OpenAI SDKs, ChatGPT Apps SDK, Codex, MCP integrations, endpoint schemas, parameters, limits, or migrations and you need up-to-date official guidance.
docsbot-ai-automation
Automate Docsbot AI tasks via Rube MCP (Composio). Always search tools first for current schemas.
context7-skills
Use when a user asks to search, install, list, or remove skills with the Context7 ctx7 skills CLI (including npx ctx7) and needs correct subcommands or client flags.
asyncapi-docs
AsyncAPI specification handling for event-driven API documentation. Parse, validate, and generate documentation for message-based APIs including Kafka, MQTT, WebSocket, and AMQP systems.