context7

Search Context7 library indexes and fetch version-accurate documentation snippets.

5|Updated Aug 8, 2016
One-click install
npx skills add https://github.com/gbencke/dotfiles --skill context7-gbencke
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context7
Source: https://github.com/gbencke/dotfiles/tree/main/pi/skills/context7
Command: npx skills add https://github.com/gbencke/dotfiles --skill context7-gbencke

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The context7 skill prevents slow, error-prone searches by helping you quickly locate accurate, version-aligned documentation snippets for the exact library you need.

Core Features & Use Cases

  • Context-first documentation retrieval: Search a Context7 library index when you do not know the exact libraryId.
  • Targeted snippet extraction: Pull relevant documentation sections by libraryId, optionally narrowed by topic and token budget.
  • Use Case: When you’re implementing an authentication flow in a framework and want reliable guidance for the specific library/version, first locate the correct libraryId and then retrieve only the relevant snippet(s) for the topic you’re working on.

Quick Start

Ask the AI to search for the library and fetch documentation snippets for your target topic, using your Context7 API key from the environment.

Frequently Asked Questions about context7

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

FAQPage Schema
How do I find version-accurate documentation snippets for a specific library?

To find version-accurate documentation snippets, you must first resolve the exact libraryId using a library index search, then fetch targeted snippets filtered by topic and token limit. This ensures the retrieved docs match your implementation needs.

What is the best way to locate a libraryId before retrieving framework documentation?

The best way to locate a libraryId is by using a context-based search tool to query the library index. This resolves the exact identifier needed before you can extract topic-relevant documentation snippets for your framework.

Do I need an API key to search the library index and fetch documentation snippets?

Yes, you need a Context7 API key configured in your environment to search the library index and fetch documentation snippets. This key authenticates your requests during library discovery and targeted snippet retrieval.

Can I narrow down documentation retrieval to a specific topic and token budget?

Yes, you can narrow documentation retrieval by specifying a topic and an optional token limit when fetching snippets. This targets the exact sections needed for troubleshooting or implementation without exceeding your context window.

Why does searching for framework documentation manually result in version mismatches?

Manual framework documentation searches often yield version mismatches because they lack reliable indexing for specific library versions. Using a dedicated library discovery tool resolves the exact libraryId to fetch aligned snippets.