context7

Fetches live version-specific library documentation via the Context7 API.

Updated Sep 13, 2023
One-click install
npx skills add https://github.com/dlwlrmax/.dotfiles --skill context7-dlwlrmax
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context7
Source: https://github.com/dlwlrmax/.dotfiles/tree/main/opencode/.config/opencode/skills/context7
Command: npx skills add https://github.com/dlwlrmax/.dotfiles --skill context7-dlwlrmax

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Training data about libraries and frameworks quickly becomes outdated, leading to incorrect API usage and deprecated code patterns. This Skill retrieves current, version-specific documentation on demand so answers reflect the real, present-day API. ## Core Features & Use Cases - Library Search: Query the Context7 search endpoint with a library name and topic to resolve the correct library ID. - Documentation Retrieval: Fetch plain-text or JSON documentation snippets for a specific topic using the resolved library ID. - Library Registry: A curated registry covers Drizzle, Prisma, Next.js, React, TanStack Query, Better Auth, Zod, Vitest, and more, with aliases and optimized query patterns. - Use Case: When asked how to set up Drizzle ORM with PostgreSQL, the Skill searches Context7 for the Drizzle library ID, then fetches current setup and schema documentation instead of relying on stale training knowledge. ## Quick Start Ask the assistant to fetch the latest documentation for a library topic, for example: use Context7 to get current Next.js App Router routing documentation.

Frequently Asked Questions about context7

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch up-to-date library documentation with Context7?▼

First search the Context7 API with the library name and topic to get a library ID, then call the context endpoint with that ID and your query. Adding type=txt returns more readable plain-text output.

Which libraries are supported by the Context7 documentation lookup?▼

The registry covers Drizzle, Prisma, Better Auth, NextAuth.js, Clerk, Next.js, React, TanStack Query, Router and Start, Cloudflare Workers, AWS Lambda, Vercel, Shadcn/ui, Radix UI, Tailwind CSS, Zustand, Jotai, Zod, React Hook Form, Vitest, and Playwright.

Does the Context7 API require an API key?▼

No API key is required for basic usage of the Context7 API, though requests are rate-limited. You can query the search and context endpoints directly with curl.

Why does my Context7 search return the wrong library?▼

The search endpoint ranks results by relevance to your query, so the first result may not always match. Inspect additional results in the response array and make the query parameter more specific to improve ranking.

How do I add a new library to the documentation registry?▼

Edit library-registry.md and add an entry under the appropriate category with the library name, aliases, docs URL, Context7 command, and common topics. Optionally add query optimization patterns for better retrieval.