context7-cli
What it does
This skill lets your agent use the ctx7 command-line tool to look up current library docs and connect Context7 to a code editor. It is for developers who work in a terminal.
When to use it
- ✓When you want to look up current documentation for a library from the command line.
- ✓When you want to set up Context7 for Claude Code, Cursor, or OpenCode.
- ✓When you need to check whether you are logged in to Context7.
Skill link
https://github.com/upstash/context7/blob/master/skills/context7-cli/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Set up Context7 for my Claude Code so it can read current library docs.”
5 new skills a week. 1 minute to read.
How it works
The skill runs the ctx7 tool, which searches for a library and then fetches its docs for your question. It can also guide the setup that connects Context7 to your editor.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
ctx7 CLI
The Context7 CLI does two things: fetches up-to-date library documentation and sets up Context7 MCP for your editor.
Make sure the CLI is up to date before running commands:
npm install -g ctx7@latest
Or run directly without installing:
npx ctx7@latest <command>
What this skill covers
- Documentation — Fetch current docs for any library. Use when writing code, verifying API signatures, or when training data may be outdated.
- Setup — Configure Context7 MCP for Claude Code / Cursor / OpenCode.
Quick Reference
# Documentation
ctx7 search <query> # Search all libraries in one step
ctx7 library <name> <query> # Step 1: resolve library ID
ctx7 docs <libraryId> <query> # Step 2: fetch docs
# Setup
ctx7 setup # Configure Context7 MCP (interactive)
ctx7 login # Log in for higher rate limits
ctx7 whoami # Check current login status
Authentication
ctx7 login # Opens browser for OAuth
ctx7 login --no-browser # Prints URL instead of opening browser
ctx7 logout # Clear stored tokens
ctx7 whoami # Show current login status (name + email)
Most commands work without login. Exception: ctx7 setup requires it unless --api-key or --oauth is passed. Login also unlocks higher rate limits on docs commands.
Set an API key via environment variable to skip interactive login entirely:
export CONTEXT7_API_KEY=your_key
Common Mistakes
- Library IDs require a
/prefix —/facebook/reactnotfacebook/react - Always run
ctx7 libraryfirst —ctx7 docs react "hooks"will fail without a valid ID
FAQ
Do I need to install anything?
The skill uses the ctx7 tool, which can be run with npx or installed globally with npm.
Do I need to log in?
Most commands work without logging in, but the setup command requires a login.
Which editors does setup support?
The skill mentions Claude Code, Cursor, and OpenCode.
Details
Original description by the author
Use the ctx7 CLI to fetch library documentation and configure Context7 MCP. Activate when the user mentions "ctx7" or "context7", needs current docs for any library, or needs to set up Context7 for their AI coding agent.
repo: upstash/context7
Popularity
- GitHub stars
- 64k
- Ranking position
- #3166
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
context7-mcp
64kHelps your agent look up current documentation for libraries and frameworks, so its code examples match the latest versions.
context7-docs
64kLets your agent fetch up-to-date docs and code examples for any library, framework, SDK, or cloud service before it answers.
find-docs
64kLets your agent look up current docs, API references, and code examples for any developer tool, library, or cloud service.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.