Context7

From zocomputer/skills · View interactive version

Context7 is an AI agent skill from the GitHub repository zocomputer/skills. Fetch up-to-date, version-specific library documentation and code examples from Context7. Use this skill whenever the user asks about a specific programming library, framework, or API, or when writing code that depends on a library. Replaces stale training-data knowledge with live docs.

How to use this skill

Skill file

Context7 -- Live Library Documentation

Pull current docs and code examples for any programming library directly into context. No more hallucinated APIs or outdated patterns.

When to Use

How to Use

The script is at Skills/context7/scripts/context7.ts. Run with bun.

Commands

Search for a library:

bun Skills/context7/scripts/context7.ts search "<library-name>"

Returns matching libraries with their Context7 IDs, descriptions, snippet counts, and quality scores. Pick the best match by name relevance, reputation, and benchmark score.

Fetch docs for a specific query:

bun Skills/context7/scripts/context7.ts docs <library-id> "<query>"

Returns documentation and code examples relevant to the query. Use the library ID from a search result.

One-shot lookup (search + fetch docs):

bun Skills/context7/scripts/context7.ts lookup "<library-name>" "<query>" --tokens 10000

Resolves the library and fetches relevant docs in one step. This is the most common workflow.

Options

Workflow

  1. User asks about a library -> run lookup with the library name and their question
  2. Read the returned docs and code examples
  3. Use them to give an accurate, up-to-date answer or write correct code
  4. If lookup picks the wrong library, use search first to find the right ID, then docs

Tips

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.