Skip to content
Back to skills

Context7

ASecurity

Instructions for using context7 MCP to look up library documentation before writing code. Loaded on demand on first code file write/edit.

  • 19 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added May 28, 2026
ai-agentsgonextjsexpressapidocumentation

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned May 28, 2026

npx -y skills add GobbyAI/gobby --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/gobbyai-context7/badge)](https://www.skillsdirectory.com/skills/gobbyai-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: Instructions for using context7 MCP to look up library documentation before writing code. Loaded on demand on first code file write/edit.
category: core
metadata:
  gobby:
    audience: all
---

# Context7 — Library Documentation Lookup

Use the **context7** MCP server to fetch up-to-date documentation for any library or framework before writing code that uses it. This prevents hallucinated APIs and outdated patterns.

## Workflow

Two-step process — resolve the library, then query its docs:

### 1. Resolve the library ID

```
call_tool("context7", "resolve-library-id", {
  "libraryName": "Next.js",
  "query": "server components and data fetching"
})
```

Returns a list of matching libraries with Context7-compatible IDs (format: `/org/project`).

### 2. Query documentation

```
call_tool("context7", "query-docs", {
  "libraryId": "/vercel/next.js",
  "query": "how to use server components for data fetching"
})
```

Returns relevant documentation snippets and code examples.

## When to use

| Situation | Action |
|---|---|
| Writing code that uses a library API | Resolve + query before writing |
| Unsure about current API patterns | Query with a specific question |
| Choosing between library approaches | Query to compare documented patterns |
| Upgrading or migrating library usage | Query the target version's docs |

## Tips

- **Be specific in queries.** "How to set up JWT authentication in Express.js" beats "auth".
- **Use the official library name** with proper punctuation — "Next.js" not "nextjs", "Three.js" not "threejs".
- **Max 3 calls per question.** If you can't find what you need after 3 calls, use your best result.
- **Version-specific docs** — if the user specifies a version, use the `/org/project/version` format from resolve results.

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.