Skip to content
Join free
intellectronica

Context7 skill

Retrieve up-to-date documentation for software libraries, frameworks, and components via the Context7 API. This skill should be used when looking up documentation for any programming library or framework, finding code examples for specific APIs or features, verifying correct usage of library functions, or obtaining current information about library APIs that may have changed since training.

$npx alyn-cli add context7
View this skill on GitHubintellectronica/agent-skills/skills/context7/SKILL.md
Pack stars
305
Pack installs
146k
Alyn Score
40/99
Updated
7 months ago
License
CC0-1.0

intellectronica

Context7

What is the Context7 skill?

Context7 is a coding skill by intellectronica for Claude Code, Cursor, Codex and other AI coding agents. Retrieve up-to-date documentation for software libraries, frameworks, and components via the Context7 API. This skill should be used when looking up documentation for any programming library or framework, finding code examples for specific APIs or features, verifying correct usage of library functions, or obtaining current information about library APIs that may have changed since training.

This skill enables retrieval of current documentation for software libraries and components by querying the Context7 API via curl. Use it instead of relying on potentially outdated training data.

What the SKILL.md covers

  • Overview
  • Workflow
  • Step 1: Search for the Library
  • Step 2: Fetch Documentation
  • Examples
  • React hooks documentation
  • Next.js routing documentation
  • FastAPI dependency injection
  • Tips
Author
intellectronica
Pack
intellectronica/agent-skills (22 skills)
Category
Coding, #1788 of 1826
Alyn Score
40 / 99
Files
1
License
CC0-1.0
Last updated
7 months ago
Works with
Claude Code, Claude, Cursor, Codex, Gemini CLI, Copilot

Context7 compared to similar skills

SkillAlyn ScoreGitHub starsUpdated
Context7 · intellectronica403057 months ago
Analyzing AgentScope Library · Microck484143 months ago
Brainstorming · Jesse Vincent92326k22 days ago
Understand Diff · Egonex-AI8294k35 h ago

Install Context7

Pick your agent. Every command is ready to paste.

$npx alyn-cli add context7

Detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

$npx skills add intellectronica/agent-skills --skill context7

Or use the open skills CLI directly.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads context7 when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the context7 skill”. In Codex, type $context7.

The skill itself

SKILL.md

FolderGitHub

Context7

Overview

This skill enables retrieval of current documentation for software libraries and components by querying the Context7 API via curl. Use it instead of relying on potentially outdated training data.

Workflow

Step 1: Search for the Library

To find the Context7 library ID, query the search endpoint:

curl -s "https://context7.com/api/v2/libs/search?libraryName=LIBRARY_NAME&query=TOPIC" | jq '.results[0]'

Parameters:

  • libraryName (required): The library name to search for (e.g., "react", "nextjs", "fastapi", "axios")
  • query (required): A description of the topic for relevance ranking

Response fields:

  • id: Library identifier for the context endpoint (e.g., /websites/react_dev_reference)
  • title: Human-readable library name
  • description: Brief description of the library
  • totalSnippets: Number of documentation snippets available

Step 2: Fetch Documentation

To retrieve documentation, use the library ID from step 1:

curl -s "https://context7.com/api/v2/context?libraryId=LIBRARY_ID&query=TOPIC&type=txt"

Parameters:

  • libraryId (required): The library ID from search results
  • query (required): The specific topic to retrieve documentation for
  • type (optional): Response format - json (default) or txt (plain text, more readable)

Examples

React hooks documentation

# Find React library ID
curl -s "https://context7.com/api/v2/libs/search?libraryName=react&query=hooks" | jq '.results[0].id'
# Returns: "/websites/react_dev_reference"

# Fetch useState documentation
curl -s "https://context7.com/api/v2/context?libraryId=/websites/react_dev_reference&query=useState&type=txt"

Next.js routing documentation

# Find Next.js library ID
curl -s "https://context7.com/api/v2/libs/search?libraryName=nextjs&query=routing" | jq '.results[0].id'

# Fetch app router documentation
curl -s "https://context7.com/api/v2/context?libraryId=/vercel/next.js&query=app+router&type=txt"

FastAPI dependency injection

# Find FastAPI library ID
curl -s "https://context7.com/api/v2/libs/search?libraryName=fastapi&query=dependencies" | jq '.results[0].id'

# Fetch dependency injection documentation
curl -s "https://context7.com/api/v2/context?libraryId=/fastapi/fastapi&query=dependency+injection&type=txt"

Tips

  • Use type=txt for more readable output
  • Use jq to filter and format JSON responses
  • Be specific with the query parameter to improve relevance ranking
  • If the first search result is not correct, check additional results in the array
  • URL-encode query parameters containing spaces (use + or %20)
  • No API key is required for basic usage (rate-limited)

Tips for Context7

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • It is part of a pack with 22 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Context7

What does the Context7 skill do?

Retrieve up-to-date documentation for software libraries, frameworks, and components via the Context7 API. This skill should be used when looking up documentation for any programming library or framework, finding code examples for specific APIs or features, verifying correct usage of library functions, or obtaining current information about library APIs that may have changed since training.

How do I install Context7?

Run "npx alyn-cli add context7" in your project. The Alyn CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Context7 work in Cursor and Codex?

Yes. Context7 uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

What is inside the Context7 skill?

The SKILL.md covers Overview, Workflow, Step 1: Search for the Library, Step 2: Fetch Documentation, Examples, React hooks documentation.

What is a good alternative to Context7?

Analyzing AgentScope Library by Microck is the highest-ranked similar skill from another creator, with an Alyn Score of 48 compared to 40 for Context7.

Is Context7 free?

Context7 is open source on GitHub under the CC0-1.0 license. It is free to install; check the license before commercial use.

Who made Context7?

Context7 is published by intellectronica in the intellectronica/agent-skills repository, together with 21 other skills.

Similar skills. From other creators.