fetch-library-docs
Library Documentation Skill
Fetches official library documentation with 60-90% token savings.
WHEN TO INVOKE (Auto-Detection)
INVOKE AUTOMATICALLY when:
| Context | Detection Signal | Content Type |
|---|---|---|
| Implementing | About to write code using library API | examples,api-ref |
| Debugging | Error contains library name (e.g., PrismaClientError) |
troubleshooting |
| Installing | Adding new package, npm install, setup task |
setup |
| Integrating | Connecting libraries ("use X with Y") | examples,setup |
| Upgrading | Version migration, breaking changes | migration |
| Uncertain | First use of library feature, unsure of pattern | examples |
DO NOT INVOKE when:
- Already have sufficient knowledge from training
- User pasted docs or has them open
- Task is about local/private code (use codebase search)
- Comparing libraries (use web search)
DECISION LOGIC
1. Identify Library
Priority: User mention → Error message → File imports → package.json → Ask user
Examples:
PrismaClientKnownRequestError→ library = "prisma"import { useState } from 'react'→ library = "react"from fastapi import FastAPI→ library = "fastapi"
2. Identify Topic
Priority: User specifies → Error message → Feature being implemented → "getting started"
3. Select Content Type
| Task | Content Type |
|---|---|
| Implementing code | examples,api-ref |
| Debugging error | troubleshooting,examples |
| Installing/setup | setup |
| Integrating libs | examples,setup |
| Upgrading version | migration |
| Understanding why | concepts |
| Best practices | patterns |
EXECUTION
IMPORTANT: Always use the Python entry point (fetch-docs.py) for cross-platform compatibility.
Use python3 on Linux/macOS/WSL, python on Windows:
# With known library ID (faster - saves 1 API call)
python3 scripts/fetch-docs.py --library-id <id> --topic "<topic>" --content-type <types>
# With library name (auto-resolves)
python3 scripts/fetch-docs.py --library <name> --topic "<topic>" --content-type <types>
Windows note: Use
pythoninstead ofpython3(e.g.,python scripts/fetch-docs.py ...)
Quick Library IDs
| Library | ID |
|---|---|
| React | /reactjs/react.dev |
| Next.js | /vercel/next.js |
| Prisma | /prisma/docs |
| Tailwind | /tailwindlabs/tailwindcss.com |
| FastAPI | /tiangolo/fastapi |
See references/library-ids.md for complete list.
ERROR HANDLING (Quick Reference)
| Error | Action |
|---|---|
[LIBRARY_NOT_FOUND] |
Try spelling variations |
[LIBRARY_MISMATCH] |
Use --library-id directly |
[EMPTY_RESULTS] |
Broaden topic or use --content-type all |
[RATE_LIMIT_ERROR] |
Check API key setup |
Call Budget: Context7 allows 3 calls/question. Use --library-id to save 1 call.
See references/context7-tools.md for full error handling.
REFERENCES
- Library IDs - Complete library ID list
- Usage Patterns - Real-world examples
- Context7 Tools - API details, error codes, setup
More from panaversity/claude-code-skills-lab
skill-validator
|
18browsing-with-playwright
Browser automation using Playwright MCP. Navigate websites, fill forms, click elements, take screenshots, and extract data. Use for web browsing, form submission, web scraping, or UI testing. NOT for static content (use curl/wget).
13skill-creator-pro
|
12video-generator
AI video production workflow using Remotion. Use when creating videos, short films, commercials, or motion graphics. Triggers on requests to make promotional videos, product demos, social media videos, animated explainers, or any programmatic video content. Produces polished motion graphics, not slideshows.
11xlsx
Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
10internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
10