PluginBench
Skill
Review
Audit score 70

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
Prerequisites
  • 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)
Claude Code
Cursor
Windsurf
Cline

How to use context7

  1. 1.Search for your library using: python3 ~/.codex/skills/context7/scripts/context7.py search "<library-name>"
  2. 2.Note the library id from the search results
  3. 3.Fetch documentation with: python3 ~/.codex/skills/context7/scripts/context7.py context "<library-id>" "<query>"
  4. 4.Optionally specify output format with --type txt|md or limit tokens with --tokens N
  5. 5.Use the retrieved documentation to implement features or verify APIs

Use cases

Good for
  • 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
Who it's for
  • 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

Where is the CONTEXT7_API_KEY stored?

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).

When should I use Context7 instead of relying on my training data?

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.

What output formats are supported?

Context7 supports txt (default) and md (markdown) formats via the --type option.

Can I limit the amount of documentation returned?

Yes, use the --tokens N option to limit the response to a specific number of tokens.

How do I find the correct library ID for my search?

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

TaskCommand
Find React docssearch "react"
Get React hooks infocontext "/facebook/react" "useEffect cleanup"
Find Supabasesearch "supabase"
Get Supabase authcontext "/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