context7/skills/context7/SKILL.md
This skill should be used when the user asks to "fetch current library docs", "use Context7", "get up-to-date documentation", "look up the latest API", or when generating code for modern libraries, frameworks, SDKs, APIs, CLIs, or cloud services where current syntax matters. Use when a user requests version-specific docs or when troubleshooting potentially outdated API patterns. Skip for vanilla JS/HTML/CSS, code review, business-logic debugging, refactoring, or general programming concepts.
npx skillsauth add grailautomation/claude-plugins context7Install this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Context7 provides current library, framework, SDK, API, CLI, and cloud-service
documentation to prevent stale API usage. Use the ctx7 CLI instead of MCP.
The CLI works without authentication for normal library and docs lookups;
login or CONTEXT7_API_KEY only improves rate limits and unlocks skill
generation.
Prefer one-off execution when the CLI is not already installed:
npx -y ctx7 --help
pnpm dlx ctx7 --help
Before recommending a persistent global install, check existing install lanes:
type -a ctx7 node npm pnpm npx
which -a ctx7 node npm pnpm npx
Step 1: Resolve the library ID
ctx7 library nextjs "Find current Next.js middleware documentation"
ctx7 library react "How to clean up useEffect with async operations" --json
This returns matching Context7 library IDs plus coverage and trust metadata. Choose the closest match with the strongest coverage and reputation.
Step 2: Fetch documentation
ctx7 docs /vercel/next.js "How does middleware work in the current version?"
ctx7 docs /facebook/react "How to use hooks for state management" --json
Skip Step 1 only when the exact library ID is already known from a previous
lookup or user input. Library IDs always start with /; plain package names are
for ctx7 library, not ctx7 docs.
| Format | Example | Use Case |
|--------|---------|----------|
| /org/project | /vercel/next.js | Latest docs |
| /org/project/vX.Y.Z | /vercel/next.js/v15.1.0 | Version-specific |
Note the v prefix on version numbers.
Example:
ctx7 docs /vercel/next.js/v14.3.0-canary.87 "How to set up app router"
Activate for:
Skip for:
Use specific task-oriented queries for both tool calls. Do not send API keys, credentials, personal data, proprietary source code, or other sensitive details in Context7 queries.
ctx7 library supabase "How do I configure email/password authentication in supabase-js?"
ctx7 docs /supabase/supabase-js "How do I configure email/password authentication in supabase-js?"
Good query topics include routing, hooks, authentication, middleware, configuration, testing, deployment, database access, API clients, and UI components.
Use --json when the response will be piped into other tools. Keep queries
task-oriented, not keyword-only.
Most documentation lookups work without authentication:
ctx7 whoami
ctx7 login --no-browser
export CONTEXT7_API_KEY=your_key
Do not include API keys, credentials, proprietary code, or personal data in Context7 queries.
The previous MCP config is preserved as .mcp.legacy.json for explicit opt-in
compatibility testing only. Do not restore .mcp.json as the default path unless
a future issue documents why the CLI is insufficient. Do not add inline
mcpServers to .claude-plugin/plugin.json or mcpServers to
.codex-plugin/plugin.json for the default plugin path.
See references/error-handling.md for common errors and solutions.
Quick reference:
These benefit most from Context7 (fast-changing APIs):
| Category | Libraries | |----------|-----------| | React ecosystem | Next.js, React, TanStack Query, Zustand | | CSS/Styling | Tailwind CSS, Panda CSS, StyleX | | Validation | Zod, Valibot, ArkType | | Database/ORM | Prisma, Drizzle, Supabase | | Full-stack | Nuxt, SvelteKit, Astro, Remix |
development
Parse and analyze Workato recipe JSON exports. Use when the user asks about a Workato recipe's logic, data flow, field mappings, error handling, or control flow. Also use when the user references a .recipe.json file or asks to debug a Workato integration.
databases
Review implementation plans as a staff software engineer. Use when the user asks for staff engineer feedback, senior engineering review, plan review, architecture review, implementation-plan critique, approval before proceeding, risk review, or feedback on a proposed technical plan.
tools
Use when the user invokes $spec-kit:tasks or /spec-kit:tasks, or asks to generate dependency-ordered tasks from the plan and repo context.
testing
Use when the user invokes $spec-kit:specify or /spec-kit:specify, or asks to create a brownfield-aware feature specification from a natural language description.