context7-cli
Use the ctx7 CLI to fetch library documentation, manage AI coding skills, and configure Context7 MCP. Activate when the user mentions "ctx7" or "context7", needs current docs for any library, wants to install/search/generate skills, or needs to set up Context7 for their AI coding agent.
Best use case
context7-cli is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use the ctx7 CLI to fetch library documentation, manage AI coding skills, and configure Context7 MCP. Activate when the user mentions "ctx7" or "context7", needs current docs for any library, wants to install/search/generate skills, or needs to set up Context7 for their AI coding agent.
Teams using context7-cli should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/context7-cli/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How context7-cli Compares
| Feature / Agent | context7-cli | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use the ctx7 CLI to fetch library documentation, manage AI coding skills, and configure Context7 MCP. Activate when the user mentions "ctx7" or "context7", needs current docs for any library, wants to install/search/generate skills, or needs to set up Context7 for their AI coding agent.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# ctx7 CLI The Context7 CLI does three things: fetches up-to-date library documentation, manages AI coding skills, and sets up Context7 MCP for your editor. Make sure the CLI is up to date before running commands: ```bash npm install -g ctx7@latest ``` Or run directly without installing: ```bash npx ctx7@latest <command> ``` ## What this skill covers - **[Documentation](references/docs.md)** — Fetch current docs for any library. Use when writing code, verifying API signatures, or when training data may be outdated. - **[Skills management](references/skills.md)** — Install, search, suggest, list, remove, and generate AI coding skills. - **[Setup](references/setup.md)** — Configure Context7 MCP for Claude Code / Cursor / OpenCode. ## Quick Reference ```bash # Documentation ctx7 library <name> <query> # Step 1: resolve library ID ctx7 docs <libraryId> <query> # Step 2: fetch docs # Skills ctx7 skills install /owner/repo # Install from a repo (interactive) ctx7 skills install /owner/repo name # Install a specific skill ctx7 skills search <keywords> # Search the registry ctx7 skills suggest # Auto-suggest based on project deps ctx7 skills list # List installed skills ctx7 skills remove <name> # Uninstall a skill ctx7 skills generate # Generate a custom skill with AI (requires login) # Setup ctx7 setup # Configure Context7 MCP (interactive) ctx7 login # Log in for higher rate limits + skill generation ctx7 whoami # Check current login status ``` ## Authentication ```bash 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. Exceptions: `skills generate` always requires it; `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: ```bash export CONTEXT7_API_KEY=your_key ``` ## Common Mistakes - Library IDs require a `/` prefix — `/facebook/react` not `facebook/react` - Always run `ctx7 library` first — `ctx7 docs react "hooks"` will fail without a valid ID - Repository format for skills is `/owner/repo` — e.g., `ctx7 skills install /anthropics/skills` - `skills generate` requires login — run `ctx7 login` first
Related Skills
yeet
Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
subagent-driven-development
Use when executing implementation plans with independent tasks in the current session
skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.
shader-dev
Comprehensive GLSL shader techniques for creating stunning visual effects — ray marching, SDF modeling, fluid simulation, particle systems, procedural generation, lighting, post-processing, and more.
remotion-best-practices
Best practices for Remotion - Video creation in React
prompt-engineering-patterns
Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production. Use when optimizing prompts, improving LLM outputs, or designing production prompt templates.
pptx-generator
Generate, edit, and read PowerPoint presentations. Create from scratch with PptxGenJS (cover, TOC, content, section divider, summary slides), edit existing PPTX via XML workflows, or extract text with markitdown. Triggers: PPT, PPTX, PowerPoint, presentation, slide, deck, slides.
planning-with-files
Implements Manus-style file-based planning to organize and track progress on complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when asked to plan out, break down, or organize a multi-step project, research task, or any work requiring >5 tool calls. Supports automatic session recovery after /clear.
pinchtab
Use this skill when a task needs browser automation through PinchTab: open a website, inspect interactive elements, click through flows, fill out forms, scrape page text, log into sites with a persistent profile, export screenshots or PDFs, manage multiple browser instances, or fall back to the HTTP API when the CLI is unavailable. Prefer this skill for token-efficient browser work driven by stable accessibility refs such as `e5` and `e12`.
opencli
OpenCLI — Make any website or Electron App your CLI. Zero risk, AI-powered, reuse Chrome login.