New advertisers: 50% off your first month with code FIRSTMONTHSee slots
upstash avatar

Find Docs

Retrieves current library docs and code examples via the Context7 CLI, verifying answers against recent API changes.

skills.sh installs
10.5K
GitHub stars
65.3K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers two-step lookup: library resolves a name to a library ID, then docs queries that ID for snippets
  • Supports version-specific queries with --tag and language-ranked examples with --language
  • Enforces a limit of 3 lookup commands per question and requires a valid /org/project ID before docs queries
  • Designed for API syntax, configuration, version migration, setup, and CLI usage questions that training data may miss

Install

$ npx -y skills add upstash/context7 --skill find-docs -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Documentation Lookup

Retrieve current documentation and code examples for any library using the Context7 CLI.

Run commands with npx ctx7@latest so setup always uses the latest CLI without a global install:

npx ctx7@latest library <name> "<query>"
npx ctx7@latest docs <libraryId> "<query>"

Optionally install globally if you prefer a bare ctx7 command:

npm install -g ctx7@latest

Workflow

Two-step process: resolve the library name to an ID, then query docs with that ID.

# Step 1: Resolve library ID
npx ctx7@latest library <name> "<query>"

# Step 2: Query documentation
npx ctx7@latest docs <libraryId> "<query>"

You MUST call library first to obtain a valid library ID UNLESS the user explicitly provides a library ID in the format /org/project or /org/project/version.

IMPORTANT: Do not run these commands more than 3 times per question. If you cannot find what you need after 3 attempts, use the best result you have.

Step 1: Resolve a Library

Resolves a package/product name to a Context7-compatible library ID and returns matching libraries.

Details

Repository
github.com/upstash/context7
Categories
Technical Documentation, AI Agents & LLM Apps
First seen
Apr 16, 2026

More from upstash/context7

All 3

Similar to Find Docs

More Technical Documentation