Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

context7

БесплатноЗапускает вложенные скриптыНе проверен

Up-to-date, version-specific library documentation and working code examples sourced from real project repos via the Context7 documentation aggregation API…

julianobarbosaот julianobarbosa★ 18 звёзд на GitHub

Об этом скилле

Context7

Query up-to-date, version-specific documentation and code examples directly from source libraries via Context7's documentation aggregation platform.

Why Context7

Benefit Description
Current APIs No hallucinated or outdated patterns - documentation comes from actual sources
Version-Specific Gets docs for exact library versions you're using
Code Examples Real, working code extracted from actual documentation
Broad Coverage 1000+ libraries including React, Next.js, Vue, Go, Python, Kubernetes, etc.

Setup

# Install dependencies
cd ~/.claude/skills/context7/Tools
bun install

# Optional: link binaries globally so c7-lookup / c7-resolve / c7-query are on PATH
bun link

# Optional: API key for higher rate limits
export CONTEXT7_API_KEY="ctx7sk_your_key_here"   # context7.com/dashboard

Available CLI Tools

Tool Purpose Short form (after bun link) Long form
lookup Resolve + query in one shot c7-lookup <library> <query> bun src/cli/lookup.ts <library> <query>
resolve Find Context7 library ID c7-resolve <library> [query] bun src/cli/resolve.ts <library> [query]
query Query docs by known ID c7-query <library_id> <query> bun src/cli/query.ts <library_id> <query>

CLI Flags

All three CLIs accept the same flag set.

Flag Effect
--json Emit JSON on stdout; suppress decorative output. Pipe to jq.
--quiet, -q Suppress info/success logs (warn/error still print to stderr).
--no-cache Skip the 24h disk cache (~/.cache/context7/resolved.json) for this call.
--clear-cache Wipe the disk cache and exit.
--timeout <ms> HTTP timeout in milliseconds. Default 30000.
--max-retries <n> Retry budget for 429 Rate Limit responses (with Retry-After). Default 1.
--api-key <key> Override CONTEXT7_API_KEY env var.
--version, -V Print version and exit.
--help, -h Print usage and exit.

Quick Reference

Full Lookup (Recommended)

One command to resolve library and query documentation:

# After `bun link`:
c7-lookup react "useEffect cleanup function"
c7-lookup next.js "app router middleware"
c7-lookup kubernetes "deployment rolling update"

# Or without linking:
cd ~/.claude/skills/context7/Tools && bun src/cli/lookup.ts react "useEffect cleanup function"

JSON output (for scripting / piping)

c7-lookup react "useState" --json | jq '.libraryId'
c7-resolve drizzle "many to many" --json | jq '.bestMatch'

Step-by-Step (when needed)

c7-resolve react                                    # → /facebook/react
c7-resolve next.js "authentication"                 # → ranked candidates
c7-query /facebook/react "useEffect cleanup"        # → docs for known ID

Common Library IDs

Library Context7 ID CLI Shortcut
React /facebook/react react
Next.js /vercel/next.js next.js, nextjs
Vue /vuejs/vue vue
Kubernetes /kubernetes/kubernetes kubernetes, k8s
Go stdlib /golang/go go, golang
Python /python/cpython python
Node.js /nodejs/node node, nodejs
TypeScript /microsoft/typescript typescript, ts
Prisma /prisma/prisma prisma
Tailwind /tailwindlabs/tailwindcss tailwind, tailwindcss

Workflow Routing

Workflow Trigger File
ResolveLibrary "find library ID", "resolve library" Workflows/ResolveLibrary.md
QueryDocs "lookup docs", "get documentation", "code examples" Workflows/QueryDocs.md
FullLookup "help me with [library]", "how do I use [feature]" Workflows/FullLookup.md

Gotchas

These are real Context7 API behaviors that bite if you don't know about them. Add to this list whenever a query goes wrong in a way that wasn't already documented.

  1. Library ID requires a leading slash. /facebook/react works; facebook/react fails with a cryptic "library not found." The error doesn't tell you the slash is missing.
  2. The resolver is fuzzy and ranked, not deterministic. resolve.ts <name> returns multiple candidates ordered by an LLM-powered ranker that takes your optional context query into account. A narrow context can promote a less-canonical fork above the official repo. Always inspect the top match before passing the ID to query.ts.
  3. Version pinning matters at major boundaries. Library IDs may include a version segment: /vercel/next.js/14.2.0. The bare ID resolves to whatever Context7 currently treats as "latest stable," which can lag behind real releases — asking about Next.js "app router" without a pin can return Next 13 docs. Pin the version when the framework changed shape across majors.
Полный SKILL.md на GitHub

Установить context7 в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

Tools/.gitignoreTools/bun.lockTools/package.jsonTools/src/cli/lookup.tsTools/src/cli/query.tsTools/src/cli/resolve.tsTools/src/index.tsTools/src/lib/cache.tsTools/src/lib/context7.tsTools/src/lib/errors.tsTools/src/lib/flags.tsTools/tsconfig.jsonWorkflows/FullLookup.mdWorkflows/QueryDocs.mdWorkflows/ResolveLibrary.md

FAQ

Что делает скилл context7?

Up-to-date, version-specific library documentation and working code examples sourced from real project repos via the Context7 documentation aggregation API — covers 1000+ libraries (React, Next.js, Vue, Kubernetes, Go, Python, TypeScript, Prisma, Tailwind, and more). USE WHEN looking up API signatures, framework docs, version-specific behavior, code examples, library configuration, migration guides, OR before writing code against a library you might be guessing about. NOT FOR refactoring existing code, debugging business logic, general programming concepts, or libraries Context7 doesn't index (use web search instead). Grounds answers in real source documentation to prevent hallucinated APIs.

Как установить скилл context7?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл context7 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить context7 с