xiaohongshu
xiaohongshu
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 librar...
Full skill instructions
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
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience