context7-docs

Fetch library documentation in txt or json via the Context7 API.

62|2|Updated Feb 21, 2017
One-click install
npx skills add https://github.com/ahonn/dotfiles --skill context7-docs-ahonn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context7-docs
Source: https://github.com/ahonn/dotfiles/tree/main/.claude/skills/context7-docs
Command: npx skills add https://github.com/ahonn/dotfiles --skill context7-docs-ahonn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires curl, jq, and includes scripts (resource) components.

What problem does it solve?

Context switching to locate current library documentation is time-consuming; this skill queries Context7 to fetch authoritative docs and examples in real time.

Core Features & Use Cases

  • Library discovery via simple name search.
  • Documentation retrieval in txt or json with API references and examples.
  • Use Case: when asked about a library like "react", retrieve the latest docs and examples to answer the user.

Quick Start

Ask Context7 to fetch the latest library documentation by providing the library name and optional response type.

Frequently Asked Questions about context7-docs

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

FAQPage Schema
How do I fetch up-to-date library documentation for a specific framework?

To fetch up-to-date library documentation, search for the library name via the Context7 API to locate its ID, then retrieve relevant docs and examples in txt or json format. This eliminates manual context switching to find current API references.

Do I need an API key to retrieve library docs via Context7?

Yes, you must set the CONTEXT7_API_KEY environment variable before retrieving library docs. The skill checks for this API key and reports clear errors if it is missing or if the documentation retrieval fails.

Can I get library API references and examples in JSON format?

Yes, you can retrieve library API references and examples in JSON format. The skill queries the Context7 API and presents relevant excerpts and examples in either txt or json, depending on your specified response type.

What is the best way to search for a library ID before fetching its docs?

The best way to search for a library ID is to provide the library name to the Context7 API. The skill uses this simple name search to locate the correct library ID before fetching the corresponding documentation and examples.

Why does fetching documentation fail with a missing API key error?

Fetching documentation fails because the CONTEXT7_API_KEY environment variable is not set. Ensure this variable is properly configured in your environment to allow the Context7 API to authenticate your documentation retrieval requests.

Are curl and jq required to use this documentation search skill?

Yes, curl and jq are required dependencies. The skill uses scripts that rely on curl to perform API requests against Context7 and jq to parse the JSON responses containing the library documentation and examples.