Fetches current library APIs, framework patterns, and official documentation via a REST API for npm and PyPI packages.
- GitHub stars
- 17
- Files
- 4
- Last commit
- Oct 31, 2026
- License
- MIT
- Allowed tools
- 3
What does the context7 skill do?
context7 fetches current library APIs, framework patterns, and official documentation via a REST API for npm and PyPI packages.
Summary generated from the skill's SKILL.md.
About the context7 skill
Fetching current library APIs and official documentation for npm and PyPI packages is what this skill enables. Developers can use it to bypass outdated training data by retrieving real-time information for frameworks like React, Next.js, Prisma, Express, Vue, Angular, or Svelte. An agent should load this tool when a user asks for specific implementation patterns, migration guidance, or function signatures that require the most recent version-specific details.
The skill operates through a Python script located in the skill directory. It provides two primary modes: code mode for API references and function signatures, and info mode for conceptual guides and architecture. Users can search for ambiguous library IDs or fetch documentation directly if the ID is known. To handle specific versions, the tool requires appending the full upstream tag to the library ID. While it works with standard network access, providing a CONTEXT7_API_KEY allows for higher rate limits during heavy usage.
What an agent can do with it
- 1Retrieve latest API signaturesAsk the agent to find the current function signatures and implementation examples for a specific npm package.
- 2Get migration guidanceRequest help with upgrading a framework by fetching official migration notes and architectural changes.
- 3Find specific library versionsRequest documentation for a precise version of a library to ensure compatibility with an existing project.
- 4Locate ambiguous packagesSearch for the correct library identifier when the exact name or organization is not immediately known.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the context7 skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the context7 skill in Plugin
/plugin marketplace add arvindand/agent-skills /plugin install agent-skills@arvindand-skills
Install the context7 skill in Claude Code
~/.claude/skills/context7/SKILL.md
$ npx degit arvindand/agent-skills/skills/context7 ~/.claude/skills/context7Install the context7 skill in Claude Code (project)
.claude/skills/context7/SKILL.md
$ npx degit arvindand/agent-skills/skills/context7 .claude/skills/context7Install the context7 skill in Codex
~/.agents/skills/context7/SKILL.md
$ npx degit arvindand/agent-skills/skills/context7 ~/.agents/skills/context7Install the context7 skill in Gemini CLI
~/.gemini/skills/context7/SKILL.md
$ npx degit arvindand/agent-skills/skills/context7 ~/.gemini/skills/context7Install the context7 skill in Claude.ai
npx degit arvindand/agent-skills/skills/context7 context7 && zip -r context7.zip context7 # claude.ai → Customize → Skills → + → Create skill → Upload a skill → context7.zip
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachablearvindand/agent-skills/skills/context7 is public and reachablegithub.com/arvindand/agent-skills/tree/HEAD/skills/context7 ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit 2026-10-31github.com/arvindand/agent-skills/commits ↗Pass
- No download-and-run or credential theft in scripts1 script read; no download-and-run, remote eval, base64 execution or credential uploadPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/arvindand/agent-skills/blob/HEAD/skills/context7/ ↗Pass
- Pre-approved tools are scopedPre-approved: Bash(python3, ${CLAUDE_SKILL_DIR}/scripts/context7.py, *)github.com/arvindand/agent-skills/blob/HEAD/skills/context7/ ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 78 linesgithub.com/arvindand/agent-skills/blob/HEAD/skills/context7/ ↗Pass
SKILL.md
View on GitHubContext7 Documentation Lookup
Use ${CLAUDE_SKILL_DIR}/scripts/context7.py to fetch current library documentation without MCP tool-schema overhead.
This is an execution skill. Decide whether to search or fetch directly, run the script, then use the returned docs to answer. Keep the main flow lean and load REFERENCES.md only when you need example commands, common library IDs, or troubleshooting details.
When to Use
Activate when the user asks for:
- current library or framework APIs
- official code examples or implementation patterns
- version-specific docs or migration guidance
- third-party tool setup that depends on vendor docs
- documentation for libraries in npm, PyPI, or similar ecosystems
Core Workflow
-
If you already know the library ID, skip search and call:
python3 ${CLAUDE_SKILL_DIR}/scripts/context7.py docs <library-id> [topic] [mode] -
If the library ID is unclear, search first:
python3 ${CLAUDE_SKILL_DIR}/scripts/context7.py search "<query>" -
Pick the best matching library ID, then fetch docs.
-
Use the returned docs to answer with version-aware guidance and cite the source URL when the script provides one.
Decision Rules
- Search only when the library ID is unclear or ambiguous.
- Use
codemode (default) for API references, function signatures, and implementation examples. - Use
infomode for conceptual guides, architecture, and migration-heavy questions. - Use a focused topic first; broaden it if results are empty or off-target.
- For version-specific docs, append the full upstream tag to the library ID (for example
/vercel/next.js/v15.1.8), or include the version in the topic. A bare major such as/vercel/next.js/15does not resolve.
If syntax is unclear, run:
python3 ${CLAUDE_SKILL_DIR}/scripts/context7.py --help
Output Rules
- Prefer official patterns over generic recall when the docs provide a direct answer.
- Keep the answer tied to the user's requested library and version.
- Call out deprecations, caveats, or migration notes when the docs surface them.
- If the docs are incomplete, say so and fall back to the best available general knowledge instead of inventing specifics.
Recovery
| Issue | Action |
|---|---|
| Library ID is unclear | Re-run search with an alternate name, org name, or broader query. |
| Results are empty or irrelevant | Broaden the topic, then retry with the other mode (code vs info). |
| User needs a specific version | Add the version to the library ID or mention it in the topic, then verify the returned docs match. |
| Rate limited | Tell the user about CONTEXT7_API_KEY, then use best-effort fallback guidance if needed. |
| Script usage is unclear | Run python3 ${CLAUDE_SKILL_DIR}/scripts/context7.py --help. |
| Script or network failure | Say live docs lookup failed and continue with clearly-labeled fallback knowledge. |
License: MIT See also: REFERENCES.md
Files in this skill
4context7 skill questions
How do I install the context7 skill in Claude Code?
Run npx degit arvindand/agent-skills/skills/context7 ~/.claude/skills/context7. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the context7 skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
How do I get documentation for a specific version of a library?
Append the full upstream tag to the library ID, such as /vercel/next.js/v15.1.8, or include the version in the topic.
What is the difference between code and info modes?
Use code mode for API references and function signatures, and use info mode for conceptual guides and architecture.
How can I increase the rate limits for the documentation lookup?
You can use a CONTEXT7_API_KEY for higher rate limits.