From agent-skills
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.
npx claudepluginhub arshia2114/agent-skillsThis skill is limited to using the following tools:
Fetch current library documentation, API references, and code examples without MCP context overhead.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Fetch current library documentation, API references, and code examples without MCP context overhead.
Works on all platforms via REST API.
Activate automatically when:
import, require, fromExamples:
Skip the search when you already know the library:
scripts/context7.py docs "/vercel/next.js" "middleware authentication"
Common library IDs:
/facebook/react/vercel/next.js/prisma/prisma/supabase/supabase/expressjs/expressSearch first to get the correct library ID:
scripts/context7.py search "library-name"
Example output shows library IDs you can use:
ID: /facebook/react
Name: React
Snippets: 2135 | Score: 79.4
scripts/context7.py docs "<library-id>" "[topic]" "[mode]"
Parameters:
library-id: From search results (e.g., /facebook/react) or known library IDtopic: Optional focus area (e.g., hooks, routing, authentication)mode: code (default) for API/examples, info for guidesVersion-Specific Docs:
# Request specific version by adding it to the library ID
scripts/context7.py docs "/vercel/next.js/14" "middleware"
# Or mention in topic
scripts/context7.py docs "/facebook/react" "hooks in React 18"
Examples:
# Get React hooks documentation
scripts/context7.py docs "/facebook/react" "hooks"
# Get Next.js routing docs
scripts/context7.py docs "/vercel/next.js" "routing"
# Get conceptual guide (info mode)
scripts/context7.py docs "/vercel/next.js" "app router" info
# Get version-specific docs
scripts/context7.py docs "/vercel/next.js/14" "server components"
Use the returned documentation to:
| Command | Purpose | Example |
|---|---|---|
search | Find library ID | scripts/context7.py search "prisma" |
docs | Fetch documentation | scripts/context7.py docs "/prisma/prisma" "queries" |
Requirements:
| Mode | Use For | Example |
|---|---|---|
code | API references, code examples, function signatures (default) | scripts/context7.py docs "/facebook/react" "useState" |
info | Conceptual guides, tutorials, architecture docs | scripts/context7.py docs "/vercel/next.js" "routing" info |
# User asks: "How do I use React hooks?"
# Option A: If you know the library ID, skip search
scripts/context7.py docs "/facebook/react" "hooks"
# Option B: If you don't know the library ID
# Step 1: Search for React
scripts/context7.py search "react"
# Output shows: ID: /facebook/react
# Step 2: Fetch hooks docs
scripts/context7.py docs "/facebook/react" "hooks"
# Step 3: Use the returned documentation to answer
If results are unsatisfactory, follow this recovery workflow:
Empty or irrelevant results?
info if code returns nothing, or vice versaLibrary not found?
/org/repo)Rate limited?
Always verify the documentation matches the user's version requirements before providing answers.
When you know the exact library the user is asking about:
# User: "Create a Next.js API route with authentication"
scripts/context7.py docs "/vercel/next.js" "api routes authentication"
When the user mentions or needs a specific version:
# User: "How do I use Next.js 14 server actions?"
scripts/context7.py docs "/vercel/next.js/14" "server actions"
# Or search for the version
scripts/context7.py search "next.js 14"
When the user needs to understand concepts, not just code:
# User: "Explain how Next.js app router works"
scripts/context7.py docs "/vercel/next.js" "app router architecture" info
When you're unsure which library the user means:
# User: "I need a database ORM for Node.js"
scripts/context7.py search "node.js ORM"
# Review results, pick most relevant (e.g., /prisma/prisma)
scripts/context7.py docs "/prisma/prisma" "getting started"
If the script fails:
python3 --version)/org/project (with leading slash)info mode if code returns insufficient resultsDebug mode:
# Check Python version
python3 --version
# Test basic connectivity
python3 scripts/context7.py search "react"
scripts/context7.py commands are relative to this skill's directory/facebook/react, /vercel/next.js)/vercel/next.js/14) or mention in topicPerformance Tips:
/facebook/react, Next.js = /vercel/next.js, etc.)code mode (default) for implementation details, info mode for conceptsEnvironment Variables:
# Set API key (all platforms)
export CONTEXT7_API_KEY="your-api-key"
# Windows Command Prompt
set CONTEXT7_API_KEY=your-api-key
# Windows PowerShell
$env:CONTEXT7_API_KEY="your-api-key"
License: MIT License - See LICENSE for complete terms Author: Arvind Menon Based on: Context7 REST API by Upstash