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.
View on GitHubarvindand/agent-skills
agent-skills
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/arvindand/agent-skills/blob/main/skills/context7/SKILL.md -a claude-code --skill context7Installation paths:
.claude/skills/context7/# Context7 Documentation Lookup Skill Fetch current library documentation, API references, and code examples without MCP context overhead. **Works on all platforms via REST API.** ## When to Use **Activate automatically when:** - User asks about library APIs or framework patterns - User requests code generation using specific libraries/frameworks - Import statements suggest documentation needs: `import`, `require`, `from` - Questions about specific library versions or migration - Need for official documentation patterns vs generic solutions - Setting up or configuring third-party tools - "How do I use X library?", "What's the API for Y?" **Examples:** - "Create Next.js middleware with authentication" → Use context7 - "Set up Prisma with PostgreSQL" → Use context7 - "Implement Supabase authentication" → Use context7 ## Workflow ### Quick Start (If You Know the Library) **Skip the search** when you already know the library: ```bash scripts/context7.py docs "/vercel/next.js" "middleware authentication" ``` Common library IDs: - React: `/facebook/react` - Next.js: `/vercel/next.js` - Prisma: `/prisma/prisma` - Supabase: `/supabase/supabase` - Express: `/expressjs/express` ### Full Workflow #### Step 1: Search for Library ID (if unknown) Search first to get the correct library ID: ```bash scripts/context7.py search "library-name" ``` Example output shows library IDs you can use: ```txt ID: /facebook/react Name: React Snippets: 2135 | Score: 79.4 ``` #### Step 2: Fetch Documentation ```bash scripts/context7.py docs "<library-id>" "[topic]" "[mode]" ``` **Parameters:** - `library-id`: From search results (e.g., `/facebook/react`) or known library ID - `topic`: Optional focus area (e.g., `hooks`, `routing`, `authentication`) - `mode`: `code` (default) for API/examples, `info` for guides **Version-Specific Docs:** ```bash # Request specific version by adding it to the library ID scripts/context7.py docs "/vercel/next.js/14" "middleware" # Or mention