Skip to content
Back to skills

Context7

ASecurity

Fetch up-to-date library documentation using Context7 API. Use this skill when the user asks for docs, examples, or help with a specific library/framework (e.g., "look up React docs", "context7 nextjs routing", "fetch docs for fastapi").

  • 666 stars
  • 0 votes
  • 4 copies
  • 19 views
  • Added February 8, 2026
developmenttypescriptreactnextjsfastapiapidocumentation

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill context7 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Context7?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Context7
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-context7/badge)](https://www.skillsdirectory.com/skills/majiayu000-context7)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: context7
description: Fetch up-to-date library documentation using Context7 API. Use this skill when the user asks for docs, examples, or help with a specific library/framework (e.g., "look up React docs", "context7 nextjs routing", "fetch docs for fastapi").
---

# Context7 Documentation Fetcher

This skill fetches up-to-date documentation and code examples from libraries using the Context7 API.

## Standard Workflow

Context7 requires a **two-step process**:

### Step 1: Search for the Library ID

First, search for the library to get its ID:

```
GET https://context7.com/api/v2/libs/search?libraryName=<library>&query=<context>
```

Parameters:
- `libraryName`: The library name (e.g., "react", "nextjs", "fastapi")
- `query`: Search context to help find the right library

The response contains a `results` array with library objects. Use the `id` field from the first result.

### Step 2: Get Documentation Context

Use the library ID to fetch relevant documentation:

```
GET https://context7.com/api/v2/context?libraryId=<id>&query=<question>
```

Parameters:
- `libraryId`: The ID from step 1 (e.g., "/vercel/next.js")
- `query`: Natural language question about the documentation

This returns ranked code snippets and documentation matching your query.

## Example Usage

When the user asks about a library:

1. **Search for the library**:
   Fetch `https://context7.com/api/v2/libs/search?libraryName=nextjs&query=routing`
   Extract the library ID from the response (e.g., "/vercel/next.js")

2. **Fetch documentation**:
   Fetch `https://context7.com/api/v2/context?libraryId=/vercel/next.js&query=How to setup dynamic routes`
   
3. **Present the results** to the user with the relevant code examples and documentation.

## Tips for Best Results

- Use specific, detailed queries rather than vague terms
- Include relevant context in the query (e.g., "useState hook with TypeScript" instead of just "state")
- The API works without an API key but has restricted rate limits

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.