context7
Context7
Base directory for this skill: C:\Users\lyf1143312445.agents\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 from this skill directory:
bun ./scripts/context7.ts <command> [options]
Available Commands
resolve-library-id
Resolve a package/product name to a Context7-compatible library ID.
bun ./scripts/context7.ts resolve-library-id --library-name "react"
bun ./scripts/context7.ts resolve-library-id --library-name "next.js"
Required before get-library-docs unless user provides library ID in format /org/project.
get-library-docs
Fetch documentation for a library.
# Basic usage
bun ./scripts/context7.ts get-library-docs \
--context7-compatible-library-i-d "/vercel/next.js"
# With topic focus
bun ./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 ./scripts/context7.ts get-library-docs \
--context7-compatible-library-i-d "/mongodb/docs" --mode "info"
Parameters:
--context7-compatible-library-i-d: Library ID (e.g.,/mongodb/docs,/vercel/next.js)--mode:code(default) for API/examples,infofor conceptual guides--topic: Focus on specific topic (e.g.,hooks,routing,authentication)--page: Pagination (1-10), use higher pages if context insufficient
Global Options
-t, --timeout <ms>: Call timeout (default: 30000)-o, --output <format>: Output format:text|markdown|json|raw
Common Library IDs
| Library | ID |
|---|---|
| React | /facebook/react |
| Next.js | /vercel/next.js |
| MongoDB | /mongodb/docs |
| Supabase | /supabase/supabase |
| Prisma | /prisma/prisma |
Requirements
- Bun runtime
mcporterpackage (embedded in script)
More from l-yifan/skills
scientific-figure-pro
Generate publication-ready scientific figures in Python/matplotlib with a consistent figures4papers house style. Use when creating or refining academic bar/trend/heatmap/scatter/multi-panel figures, enforcing visual consistency, or exporting paper-ready PNG/PDF/SVG outputs.
31figures4papers-playbook
Locate and adapt real plotting examples from the figures4papers repository. Use when users ask for a figure in the style of specific papers/projects, want the closest existing script template, or need fast script selection by chart type/domain before customization.
30deep-wiki
Access AI-generated documentation and insights for GitHub repositories via DeepWiki. This skill should be used when exploring unfamiliar codebases, understanding repository architecture, finding implementation patterns, or asking questions about how a GitHub project works. Supports any public GitHub repository.
25gkg
Global Knowledge Graph for codebase analysis. This skill should be used when searching for code definitions (functions, classes, methods), finding references to symbols, understanding code structure, analyzing import usage, generating repository maps, or performing impact analysis before refactoring. Supports TypeScript, JavaScript, Python, Java, and more.
21gh-grep
Search real-world code examples across millions of GitHub repositories using grep.app. This skill should be used when looking for implementation patterns, API usage examples, library integration patterns, or production code references. Supports literal code search, regex patterns, and filtering by language/repo/path.
18github
Interact with GitHub repositories, issues, pull requests, and code via the GitHub MCP server. This skill should be used when managing repositories, creating/updating files, working with issues and PRs, searching code/repos/users, creating branches, and performing code reviews. Supports all major GitHub API operations.
16