PluginBench
Skill
Review
Audit score 70

context7

netresearch/context7-skill

Fetch current library docs and API references via Context7 REST API when MCP server is unavailable.

What is context7?

A fallback documentation lookup skill that retrieves current library documentation, API references, and code examples for any framework or library (React, Django, Laravel, etc.) directly via the Context7 REST API. Use it when you need to look up framework patterns, API usage, or version-specific behavior.

  • Search for library documentation by name and retrieve the most relevant official source
  • Fetch focused API references and code examples for specific topics within a library
  • Retrieve conceptual guides and framework patterns (e.g., hooks, routing, middleware, ORM queries)
  • Support both code-focused and info-focused documentation modes
  • Work as a fallback when Context7 MCP server is unavailable or not configured

How to install context7

npx skills add https://github.com/netresearch/context7-skill --skill context7
Prerequisites
  • curl or fetch command available
  • jq for JSON parsing
  • Optional: CONTEXT7_API_KEY environment variable for higher rate limits
Claude Code
Cursor
Windsurf
Cline

How to use context7

  1. 1.Run `scripts/context7.sh search "library-name"` to find the library ID
  2. 2.Review search results and select the highest-scoring official source (format: `/vendor/library`)
  3. 3.Extract a specific topic from the user's question (e.g., 'hooks', 'routing', 'validation')
  4. 4.Run `scripts/context7.sh docs "<library-id>" "<topic>" "<mode>"` where mode is 'code' for API or 'info' for conceptual guides
  5. 5.Review the returned documentation and code examples in your response

Use cases

Good for
  • Looking up React hooks API or Next.js App Router patterns
  • Finding Django ORM query syntax or Laravel Eloquent relationship examples
  • Retrieving framework-specific middleware or routing documentation
  • Getting version-current API reference for any major library
  • Answering library-specific questions when MCP server is down
Who it's for
  • Backend developers using Django, Laravel, or similar frameworks
  • Frontend developers working with React, Vue, Next.js, or other libraries
  • Full-stack developers needing quick API reference lookups
  • Teams without a configured Context7 MCP server

context7 FAQ

What's the difference between 'code' and 'info' modes?

'code' mode returns API references and code examples; 'info' mode returns conceptual guides and framework patterns.

How do I choose the right library ID from search results?

Pick the result with the highest score and most relevant description. Prefer official sources (e.g., `/vercel/next.js` over community forks).

When should I NOT use this skill?

Don't use it for general programming concepts, code review, debugging business logic, or writing scripts from scratch without library-specific questions.

What if I don't have an API key?

The skill works without CONTEXT7_API_KEY, but you'll have standard rate limits. Set the environment variable for higher limits.

Can this skill look up any library?

Yes, it supports any library available in the Context7 database, including React, Next.js, Vue, Django, Laravel, and many others.

Full instructions (SKILL.md)

Source of truth, from netresearch/context7-skill.


name: context7 description: "Use when looking up library documentation, API references, framework patterns, or code examples for ANY library (React, Next.js, Vue, Django, Laravel, etc.) and the Context7 MCP server is unavailable or not configured. Fetches the same current docs directly via the Context7 REST API as a fallback. Triggers on: how to use library, API docs, framework pattern, import usage, library example." license: "(MIT AND CC-BY-SA-4.0)" compatibility: "Requires curl or fetch, jq." metadata: version: "1.7.2" repository: "https://github.com/netresearch/context7-skill" author: "Netresearch DTT GmbH" allowed-tools:

  • "Bash(curl:*)"
  • "Bash(jq:*)"
  • "Read"

Context7 Documentation Lookup Skill

Fetch current library documentation, API references, and code examples via the Context7 REST API.

When to Use

Use this skill when the user asks about library APIs, framework patterns, or version-specific behavior. Trigger on:

  • Library questions: "How do I use [library]?", "[library] API docs", "[library] patterns"
  • Import statements: import, require, from followed by a library name
  • Framework-specific topics: hooks, routing, middleware, ORM queries, schema definitions

When NOT to Use

Do NOT use this skill for:

  • General programming concepts (closures, recursion, design patterns)
  • Code review or refactoring tasks
  • Debugging business logic
  • Writing scripts from scratch without library-specific questions

Core Workflow

  1. Search for the library ID:

    scripts/context7.sh search "library-name"
    
  2. Pick the best result: Choose the ID with the highest score and most relevant description. Prefer official sources (e.g., /vercel/next.js over community forks).

  3. Fetch documentation with a focused topic:

    scripts/context7.sh docs "<library-id>" "<topic>" "<mode>"
    

Always extract a specific topic from the user's question. For "How does React Suspense work with server components?", use topic suspense server components.

Parameters

ParameterRequiredDescription
library-idYesFrom search results, format /vendor/library
topicNoFocus area extracted from user query (e.g., hooks, routing, validation)
modeNocode (default) for API references; info for conceptual guides

Examples

# React hooks API
scripts/context7.sh search "react"
scripts/context7.sh docs "/facebook/react" "hooks" "code"

# Next.js App Router conceptual guide
scripts/context7.sh search "nextjs"
scripts/context7.sh docs "/vercel/next.js" "app router" "info"

# Django ORM queries
scripts/context7.sh search "django"
scripts/context7.sh docs "/django/django" "queryset filter" "code"

# Laravel Eloquent relationships
scripts/context7.sh search "laravel"
scripts/context7.sh docs "/laravel/framework" "eloquent relationships" "code"

Environment Configuration

Set CONTEXT7_API_KEY for higher rate limits (optional):

export CONTEXT7_API_KEY="your-api-key"

Contributing: https://github.com/netresearch/context7-skill