MCPInstall

context7

A skill for retrieving the latest library documentation using Context7. Use when the user asks about how to use a library, requests code examples, or instructs to "use context7". Prevents hallucinations based on outdated training data and provides up-to-date API information.

Installs
411
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/dotneet/claude-code-marketplace --skill context7
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads context7 automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Context7

Overview

Context7 is a service that provides LLMs with the latest library documentation. It prevents hallucinations from outdated training data or non-existent APIs, enabling retrieval of version-specific accurate documentation and code examples.

When to Use

Use this skill in the following cases:

  1. Explicit instruction: When the user instructs "use context7" or "check the latest documentation"
  2. Library usage questions: When asked about how to use a specific library's API, hooks, or functions
  3. Code example requests: When asked for code examples using a specific library
  4. Version-specific information: When library information for a specific version is needed
  5. Uncertain API information: When your knowledge might be outdated and latest information verification is needed

Workflow

Step 1: Resolve Library ID

First, obtain the Context7 ID for the target library.

API call:

curl "https://context7.com/api/v2/libs/search?libraryName=LIBRARY_NAME&query=CONTEXT_QUERY" \
  -H "Authorization: Bearer $CONTEXT7_API_KEY"

Example:

# Search for React library
curl "https://context7.com/api/v2/libs/search?libraryName=react&query=hooks" \
  -H "Authorization: Bearer $CONTEXT7_API_KEY"

Criteria for selecting from response:

  • trustScore: Trust score (higher is better)
  • totalSnippets: Number of available documents (more means richer information)
  • versions: Verify that the required version is included

Step 2: Retrieve Documentation

Use the resolved library ID to retrieve specific documentation.

API call:

curl "https://context7.com/api/v2/context?libraryId=LIBRARY_ID&query=SPECIFIC_QUERY" \
  -H "Authorization: Bearer $CONTEXT7_API_KEY"

Example:

# Retrieve information about React's useEffect
curl "https://context7.com/api/v2/context?libraryId=/facebook/react&query=useEffect cleanup function" \
  -H "Authorization: Bearer $CONTEXT7_API_KEY"

Query best practices:

  • Use specific queries ("useEffect cleanup function" rather than "hooks")
  • Be clear about the purpose ("authentication middleware", "form validation", etc.)

Step 3: Respond to User

Respond to the user's question based on the retrieved documentation.

Information to include in the response:

  • Retrieved code examples
  • API explanations
  • Documentation source URLs (for reference)

Examples

Example 1: React Hook Usage

User: "How do I write a cleanup function with React's useEffect?"

Execution steps:

  1. Library search: libraryName=react, query=useEffect cleanup
  2. Documentation retrieval: libraryId=/facebook/react, query=useEffect cleanup function
  3. Respond with the latest code examples and best practices

Example 2: Next.js Routing

User: "Use context7 to show me how to implement authentication middleware with Next.js App Router"

Execution steps:

  1. Library search: libraryName=next.js, query=middleware authentication
  2. Documentation retrieval: libraryId=/vercel/next.js, query=middleware authentication route protection
  3. Respond with the latest App Router compatible middleware implementation

Example 3: Multiple Libraries Combination

User: "How to create a button component using TailwindCSS and shadcn/ui"

Execution steps:

  1. Resolve IDs for each library
  2. Retrieve documentation for both
  3. Respond with a combined implementation example

Error Handling

ErrorSolution
404 (Not Found)Search again with a different library name (e.g., "nextjs" → "next.js")
429 (Rate Limit)Wait a moment and retry
Empty responseRetry with a more general query

Resources

For detailed API specifications, see references/api_reference.md.

  • Endpoint details
  • Response field descriptions
  • Rate limit information
  • Error code list

FAQ

What does the context7 skill do?

A skill for retrieving the latest library documentation using Context7. Use when the user asks about how to use a library, requests code examples, or instructs to "use context7". Prevents hallucinations based on outdated training data and provides up-to-date API information.

How do I install context7?

Run npx skills add https://github.com/dotneet/claude-code-marketplace --skill context7 in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/context7/ (personal) or .claude/skills/context7/ (project).

Which AI agents can use context7?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is context7 safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains context7?

It is published by dotneet in dotneet/claude-code-marketplace. It has 411 recorded installs.

More from dotneet/claude-code-marketplace

View all →

typescript-react-reviewer

dotneet/claude-code-marketplace

Expert code reviewer for TypeScript + React 19 applications. Use when reviewing React code, identifying anti-patterns, evaluating state management, or assessing code maintainability. Triggers: code review requests, PR reviews, React architecture evaluation, identifying code smells, TypeScript type safety checks, useEffect abuse detection, state management review.

prompt-improver

dotneet/claude-code-marketplace

A skill for improving prompts by applying general LLM/agent best practices. When the user provides a prompt, this skill outputs an improved version, identifies missing information, and provides specific improvement points. Use when the user asks to "improve this prompt", "review this prompt", or "make this prompt better".

AI & Agents508 installs

code-modularization-evaluator

dotneet/claude-code-marketplace

Evaluate and improve code modularization using the Balanced Coupling Model. Analyzes coupling strength, connascence types, and distance to identify refactoring opportunities and architectural improvements. Use when reviewing code architecture, refactoring modules, or designing new systems.

perplexity-search

dotneet/claude-code-marketplace

Open the skill to read its SKILL.md instructions.

455 installs

google-calendar

dotneet/claude-code-marketplace

Open the skill to read its SKILL.md instructions.

call-cursor-agent

dotneet/claude-code-marketplace

Call cursor-agent to perform a task.

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs