using-context7-for-docs
Use when researching library documentation with Context7 MCP tools for official patterns and best practices
Best use case
using-context7-for-docs is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Use when researching library documentation with Context7 MCP tools for official patterns and best practices
Teams using using-context7-for-docs should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/using-context7-for-docs/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How using-context7-for-docs Compares
| Feature / Agent | using-context7-for-docs | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Use when researching library documentation with Context7 MCP tools for official patterns and best practices
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Using Context7 for Documentation
Use this skill when researching library documentation with Context7 MCP tools for official patterns and best practices.
## Core Principles
- Always resolve library ID first (unless user provides exact ID)
- Use topic parameter to focus documentation
- Paginate when initial results insufficient
- Prioritize high benchmark scores and reputation
## Workflow
### 1. Resolve Library ID
**Use `resolve-library-id`** before fetching docs:
```python
# Search for library
result = resolve_library_id(libraryName="react")
# Returns matches with:
# - Context7 ID (e.g., "/facebook/react")
# - Description
# - Code snippet count
# - Source reputation (High/Medium/Low)
# - Benchmark score (0-100, higher is better)
```
**Selection criteria:**
1. Exact name match preferred
2. Higher documentation coverage (more snippets)
3. High/Medium reputation sources
4. Higher benchmark scores (aim for 80+)
**Example output:**
```markdown
Selected: /facebook/react
Reason: Official React repository, High reputation, 850 snippets, Benchmark: 95
```
### 2. Fetch Documentation
**Use `get-library-docs`** with resolved ID:
```python
# Get focused documentation
docs = get_library_docs(
context7CompatibleLibraryID="/facebook/react",
topic="hooks",
page=1
)
```
**Topic parameter:**
- Focuses results on specific area
- Examples: "hooks", "routing", "authentication", "testing"
- More specific = better results
**Pagination:**
- Default `page=1` returns first batch
- If insufficient, try `page=2`, `page=3`, etc.
- Maximum `page=10`
### 3. Version-Specific Docs
**Include version in ID** when needed:
```python
# Specific version
docs = get_library_docs(
context7CompatibleLibraryID="/vercel/next.js/v14.3.0-canary.87",
topic="server components"
)
```
Use when:
- Project uses specific version
- Breaking changes between versions
- Need migration guidance
## Reporting Format
Structure findings as:
```markdown
## Library Documentation Findings
### Library: React 18
**Context7 ID:** /facebook/react
**Benchmark Score:** 95
### Relevant APIs
**useEffect Hook** (Official pattern)
```javascript
// Recommended: Cleanup pattern
useEffect(() => {
const subscription = api.subscribe()
return () => subscription.unsubscribe()
}, [dependencies])
```
Source: React docs, hooks section
### Best Practices
1. **Dependency Arrays**
- Always specify dependencies
- Use exhaustive-deps ESLint rule
- Avoid functions in dependencies
2. **Performance**
- Prefer useMemo for expensive calculations
- useCallback for function props
- React.memo for component memoization
### Migration Notes
- React 18 introduces concurrent features
- Automatic batching now default
- Upgrade guide: /facebook/react/v18/migration
```
## Common Libraries
**Frontend:**
- React: `/facebook/react`
- Next.js: `/vercel/next.js`
- Vue: `/vuejs/vue`
- Svelte: `/sveltejs/svelte`
**Backend:**
- Express: `/expressjs/express`
- FastAPI: `/tiangolo/fastapi`
- Django: `/django/django`
**Tools:**
- TypeScript: `/microsoft/typescript`
- Vite: `/vitejs/vite`
- Jest: `/jestjs/jest`
## Anti-Patterns
❌ **Don't:** Skip resolve-library-id step
✅ **Do:** Always resolve first (unless user provides exact ID)
❌ **Don't:** Use vague topics like "general"
✅ **Do:** Use specific topics: "authentication", "state management"
❌ **Don't:** Accept low benchmark scores (<50) without checking alternatives
✅ **Do:** Prefer high-quality sources (benchmark 80+)
❌ **Don't:** Cite docs without library version
✅ **Do:** Include version in findings
## Example Session
```python
# 1. Resolve library
result = resolve_library_id(libraryName="fastapi")
# → Selected: /tiangolo/fastapi (Benchmark: 92, High reputation)
# 2. Get auth documentation
docs = get_library_docs(
context7CompatibleLibraryID="/tiangolo/fastapi",
topic="authentication",
page=1
)
# → Got OAuth2, JWT patterns, security best practices
# 3. Need more detail on dependencies
docs2 = get_library_docs(
context7CompatibleLibraryID="/tiangolo/fastapi",
topic="dependency injection",
page=1
)
# → Got Depends() patterns, testing with overrides
# 4. Check pagination if needed
if insufficient:
docs3 = get_library_docs(
context7CompatibleLibraryID="/tiangolo/fastapi",
topic="authentication",
page=2 # Next page
)
```
## Quality Indicators
**High-quality results have:**
- ✅ Benchmark score 80+
- ✅ High/Medium source reputation
- ✅ Recent documentation (check dates)
- ✅ Official repositories
- ✅ Code examples with explanation
**Consider alternatives if:**
- ❌ Benchmark score <50
- ❌ Low reputation source
- ❌ Very few code snippets (<10)
- ❌ Unofficial/outdated sourcesRelated Skills
using-superantigravity
Use when starting any conversation — establishes how to find and use skills, requiring skill check before ANY response including clarifying questions
using-neon
Guides and best practices for working with Neon Serverless Postgres. Covers getting started, local development with Neon, choosing a connection method, Neon features, authentication (@neondatabase/...
using-live-documentation
Use BEFORE implementing, writing, configuring, or setting up ANY feature involving libraries, frameworks, or complex APIs - even before reading existing code. Fetches current documentation to ensure correct usage. Triggers on third-party libraries (such as react-query, FastAPI, Django, pytest), complex standard library modules (such as subprocess, streams, pathlib, logging), and "how to" questions about library usage. Do NOT use for trivial built-ins (such as dict.get, Array.map) or pure algorithms. Load this skill first to receive guidance on finding current documentation when implementing features, exploring code, or answering library-related questions.
using-droidz
Use when starting any conversation - establishes mandatory workflows for finding and using skills in the Droidz/Factory.ai system, including reading skills before usage, following brainstorming before coding, and creating TodoWrite todos for checklists
using-dbt-for-analytics-engineering
Builds and modifies dbt models, writes SQL transformations using ref() and source(), creates tests, and validates results with dbt show. Use when doing any dbt work - building or modifying models, debugging errors, exploring unfamiliar data sources, writing tests, or evaluating impact of changes.
using-chdb
Guide for using chdb, an in-process SQL OLAP engine powered by ClickHouse. Covers pandas-compatible DataStore API, 16+ data sources (MySQL, PostgreSQL, S3, ClickHouse, MongoDB, Iceberg, Delta Lake, etc.), 10+ file formats, and cross-source joins. Use when the user wants to analyze data, query files, join multiple data sources, or build data integration pipelines.
typescript-docs
Generates comprehensive TypeScript documentation using JSDoc, TypeDoc, and multi-layered documentation patterns for different audiences. Use when creating API documentation, architectural decision records (ADRs), code examples, and framework-specific patterns for NestJS, Express, React, Angular, and Vue.
prisma-docs
Local Prisma documentation reference. Use when asked about Prisma ORM, Prisma Client, Prisma Schema, migrations, database queries, Prisma Accelerate, or Prisma Postgres.
passwordless-docs
Bitwarden Passwordless.dev documentation, SDKs, and React examples
moai-context7-lang-integration
Enterprise-grade Context7 MCP integration patterns for language-specific documentation access with real-time library resolution and intelligent caching
microsoft-docs
Consultar a documentação oficial da Microsoft para encontrar conceitos, tutoriais e exemplos de código sobre Azure, .NET, Agent Framework, Aspire, VS Code, GitHub e muito mais. Usa o Microsoft Learn MCP como padrão, com Context7 e Aspire MCP para conteúdo que esteja fora do learn.microsoft.com.
ln-114-frontend-docs-creator
Creates design_guidelines.md for frontend projects. L3 Worker invoked CONDITIONALLY when hasFrontend detected.