context7-cli

Retrieve official library and framework documentation and API examples via Context7 CLI.

13|5|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/Jonghakseo/my-pi --skill context7-cli-jonghakseo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context7-cli
Source: https://github.com/Jonghakseo/my-pi/tree/main/skills/context7-cli
Command: npx skills add https://github.com/Jonghakseo/my-pi --skill context7-cli-jonghakseo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill avoids unreliable or outdated library and framework answers by retrieving relevant official documentation and API examples through the Context7 CLI.

Core Features & Use Cases

  • Library Resolution: Find the most relevant Context7 library ID for a package or framework.
  • Documentation Lookup: Retrieve focused, version-aware guidance and code examples for APIs, features, migrations, and error messages.
  • Resilient Retrieval: Prefer installed ctx7 or fall back to npx, support JSON output, and provide fallback guidance when Context7 is unavailable.
  • Use Case: When implementing React hooks or Next.js middleware, use this Skill to resolve the official library and retrieve authoritative examples before writing code.

Quick Start

Use the context7-cli skill to find the official documentation and current API examples for the library or framework you are working with.

Frequently Asked Questions about context7-cli

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

FAQPage Schema
How do I find official library documentation and API examples without relying on outdated sources?

Retrieve authoritative library documentation and API examples by resolving the relevant Context7 library ID and querying focused, version-aware guidance. This approach avoids unreliable or outdated manually searched sources by fetching official docs directly through the CLI.

Can I look up framework documentation and code examples for specific versions?

Yes, framework documentation lookup supports retrieving focused, version-aware guidance and code examples. You can query specific APIs, features, migrations, and error messages to get authoritative examples tailored to your package version.

Do I need to install ctx7 globally to retrieve package usage documentation?

No, you do not need to install ctx7 globally. The retrieval workflow prefers an installed ctx7 CLI but can fall back to npx for resolving libraries and fetching documentation, ensuring access even without a direct installation.

What's the best way to investigate framework errors using official documentation?

The best way to investigate framework errors is applying the documentation retrieval workflow to error messages. This fetches official, version-aware guidance and API examples directly, bypassing outdated forum answers to find the correct resolution.

Does the documentation lookup tool support JSON output for API examples?

Yes, the documentation lookup tool supports optional JSON output. When querying for API examples and library features, you can request JSON formatted responses to integrate the retrieved authoritative documentation into your own tools.

What happens when Context7 is unavailable during a library resolution query?

When Context7 is unavailable during a library resolution query, the workflow provides explicit fallback guidance. This resilient retrieval ensures you receive instructions on alternative steps rather than failing silently during the documentation lookup.