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.
Getting started
Full instructionsExample command
npm install -g ctx7@latestInstructions: SKILL.mdv1.0.3
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 —/reactjs/react.devnotreactjs/react.dev - Always run
ctx7 libraryfirst —ctx7 docs react "hooks"will fail without a valid ID
Explore more skills
Browse all- Senior FrontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle…
- UI Design SystemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens…
- Founder ConsumerThe consumer panel. Spins up a swarm of buyer sub-agents (default 100, --quick for 20) trained on the user's target…
- Frontend DesignGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with…
- Senior BackendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load…
- Self Improving AgentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its…
Security
Reviews (0)
More from Context7 (Upstash)
View source →Frequently asked questions about context7-cli
What does the context7-cli skill do?
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. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the context7-cli skill?
Run `npx @skills-hub-ai/cli install context7-cli` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/context7-cli/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does context7-cli work with?
context7-cli runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the context7-cli skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use context7-cli after installing it?
In Claude Code, type `/context7-cli` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the context7-cli skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.
Badge for your README
Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.
[](https://skills-hub.ai/skills/context7-cli)<a href="https://skills-hub.ai/skills/context7-cli"><img src="https://skills-hub.ai/api/badges/skill/context7-cli" alt="Install on Skills Hub"></a>More options in the badge docs.