context7
am-will/codex-skills
Fetch current library documentation via Context7 API to avoid outdated knowledge.
What is context7?
Context7 is a documentation fetcher that retrieves up-to-date library docs for any external package. Use it proactively when working with third-party libraries, implementing features that depend on them, or when you need current information beyond your training data cutoff.
- Search for library metadata by name to get the library ID
- Fetch targeted documentation context for specific queries and libraries
- Retrieve docs in txt or md format with configurable token limits
- Access current API signatures, patterns, and best practices without relying on outdated knowledge
- Verify library-specific behavior and version-dependent features
How to install context7
npx skills add https://github.com/am-will/codex-skills --skill context7- Python 3 installed
- CONTEXT7_API_KEY environment variable set in the skill's .env file (located at ~/.agents/skills/context7/.env or ~/.claude/skills/context7/.env)
How to use context7
- 1.Search for your library using: python3 ~/.codex/skills/context7/scripts/context7.py search "<library-name>"
- 2.Note the library id from the search results
- 3.Fetch documentation with: python3 ~/.codex/skills/context7/scripts/context7.py context "<library-id>" "<query>"
- 4.Optionally specify output format with --type txt|md or limit tokens with --tokens N
- 5.Use the retrieved documentation to implement features or verify APIs
Use cases
- Before implementing features that depend on external libraries like React, Next.js, or Supabase
- When debugging library-specific issues and needing current documentation
- When installing new dependencies or frameworks to check latest versions and APIs
- To verify correct API signatures and patterns for third-party packages
- When user asks about library capabilities, best practices, or integration patterns
- Developers implementing features with external libraries
- Engineers debugging third-party package issues
- Teams needing current documentation beyond training data cutoff
- Anyone working with rapidly-evolving frameworks and libraries
context7 FAQ
The API key is stored in the .env file within the skill folder, typically at ~/.agents/skills/context7/.env or ~/.claude/skills/context7/.env (note: .env files are hidden).
Use Context7 proactively when working with any external library, especially when installing dependencies, implementing library-dependent features, or when you need information beyond your training data cutoff.
Context7 supports txt (default) and md (markdown) formats via the --type option.
Yes, use the --tokens N option to limit the response to a specific number of tokens.
Run the search command first (e.g., search "react") and the results will include the library id needed for the context command.
Full instructions (SKILL.md)
Source of truth, from am-will/codex-skills.
name: context7 description: | Fetch up-to-date library documentation via Context7 CLI. Use PROACTIVELY when: (1) Working with ANY external library (React, Next.js, Supabase, etc.) (2) User asks about library APIs, patterns, or best practices (3) Implementing features that rely on third-party packages (4) Debugging library-specific issues (5) Need current documentation beyond training data cutoff (6) AND MOST IMPORTANTLY, when you are installing dependencies, libraries, or frameworks you should ALWAYS check the docs to see what the latest versions are. Do not rely on outdated knowledge. Always prefer this over guessing library APIs or using outdated knowledge.
Context7 Documentation Fetcher
Retrieve current library documentation via Context7 API.
IMPORTANT: CONTEXT7_API_KEY IS STORED IN THE .env FILE IN THE SKILL FOLDER THAT THE CONTEXT7 SKILL IS INSTALLED IN. SEARCH FOR IT THERE. .env FILES ARE HIDDEN FILES.
Example: ~/.agents/skills/context7/.env ~/.claude/skills/context7/.env
Workflow
1. Search for the library
python3 ~/.codex/skills/context7/scripts/context7.py search "<library-name>"
Example:
python3 ~/.codex/skills/context7/scripts/context7.py search "next.js"
Returns library metadata including the id field needed for step 2.
2. Fetch documentation context
python3 ~/.codex/skills/context7/scripts/context7.py context "<library-id>" "<query>"
Example:
python3 ~/.codex/skills/context7/scripts/context7.py context "/vercel/next.js" "app router middleware"
Options:
--type txt|md- Output format (default: txt)--tokens N- Limit response tokens
Quick Reference
| Task | Command |
|---|---|
| Find React docs | search "react" |
| Get React hooks info | context "/facebook/react" "useEffect cleanup" |
| Find Supabase | search "supabase" |
| Get Supabase auth | context "/supabase/supabase" "authentication row level security" |
When to Use
- Before implementing any library-dependent feature
- When unsure about current API signatures
- For library version-specific behavior
- To verify best practices and patterns
Related skills
More from am-will/codex-skills and the wider catalog.

Frontend Responsive Design Standards
Build responsive, mobile-first layouts with fluid containers, flexible units, and touch-friendly design across all screen sizes.

gemini-computer-use
Automate web browser tasks with Gemini 2.5 Computer Use and Playwright.

llm-council
Orchestrate multi-agent planning councils to produce bias-resistant implementation plans with structured JSON outputs and failure handling.

markdown-url
Route websites through markdown.new to extract clean, copy-friendly Markdown content from docs and articles.

openai-docs-skill
Query OpenAI's official developer docs via MCP server for API, SDK, and platform guidance.

parallel-task
Orchestrate parallel task execution with dependency management and test-driven validation.