context7
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Fetch up-to-date documentation and code examples for any library or framework. Use when needing API references, code examples, library documentation, or framework guides. Supports React, Next.js, MongoDB, Supabase, and thousands of other libraries.
4installs
Added on
NPX Install
npx skill4agent add huynguyen03dev/opencode-setup context7Tags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Context7
Base directory for this skill: /home/hazeruno/.config/opencode/skills/context7
Retrieve up-to-date documentation and code examples for any library via the Context7 MCP service.
Quick Start
Run the CLI script with bun (use absolute path):
bash
bun /home/hazeruno/.config/opencode/skills/context7/scripts/context7.ts <command> [options]Available Commands
resolve-library-id
Resolve a package/product name to a Context7-compatible library ID.
bash
bun /home/hazeruno/.config/opencode/skills/context7/scripts/context7.ts resolve-library-id --library-name "react"
bun /home/hazeruno/.config/opencode/skills/context7/scripts/context7.ts resolve-library-id --library-name "next.js"Required before unless user provides library ID in format .
get-library-docs/org/projectget-library-docs
Fetch documentation for a library.
bash
# Basic usage
bun /home/hazeruno/.config/opencode/skills/context7/scripts/context7.ts get-library-docs \
--context7-compatible-library-i-d "/vercel/next.js"
# With topic focus
bun /home/hazeruno/.config/opencode/skills/context7/scripts/context7.ts get-library-docs \
--context7-compatible-library-i-d "/vercel/next.js" --topic "routing"
# Different modes: code (API refs) or info (conceptual guides)
bun /home/hazeruno/.config/opencode/skills/context7/scripts/context7.ts get-library-docs \
--context7-compatible-library-i-d "/mongodb/docs" --mode "info"Parameters:
- : Library ID (e.g.,
--context7-compatible-library-i-d,/mongodb/docs)/vercel/next.js - :
--mode(default) for API/examples,codefor conceptual guidesinfo - : Focus on specific topic (e.g.,
--topic,hooks,routing)authentication - : Pagination (1-10), use higher pages if context insufficient
--page
Global Options
- : Call timeout (default: 30000)
-t, --timeout <ms> - : Output format:
-o, --output <format>|text|markdown|jsonraw
Common Library IDs
| Library | ID |
|---|---|
| React | |
| Next.js | |
| MongoDB | |
| Supabase | |
| Prisma | |
Requirements
- Bun runtime
- package (embedded in script)
mcporter