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
# With known library ID (faster - saves 1 API call)
bash scripts/fetch-docs.sh --library-id <id> --topic "<topic>" --content-type <types>
# With library name (auto-resolves)
bash scripts/fetch-docs.sh --library <name> --topic "<topic>" --content-type <types>
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 salmanferozkhan/cloud-and-fast-api
chainlit
Expert guidance for building conversational AI applications with Chainlit framework in Python. Use when (1) creating chat interfaces for LLM applications, (2) building apps with OpenAI, LangChain, LlamaIndex, or Mistral AI, (3) implementing streaming responses, (4) adding UI elements like images, files, charts, (5) handling user file uploads, (6) implementing authentication (OAuth, password), (7) creating multi-step workflows with visible steps, (8) building RAG applications with document upload, or (9) deploying chat apps to web, Slack, Discord, or Teams.
87sqlmodel
Expert guidance for SQLModel - the Python library combining SQLAlchemy and Pydantic for database models. Use when (1) creating database models that work as both SQLAlchemy ORM and Pydantic schemas, (2) building FastAPI apps with database integration, (3) defining model relationships (one-to-many, many-to-many), (4) performing CRUD operations with type safety, (5) setting up async database sessions, (6) integrating with Alembic migrations, (7) handling model inheritance and mixins, or (8) converting between database models and API schemas.
17fastapi
Expert guidance for building REST APIs with FastAPI framework in Python. Use when (1) creating new FastAPI projects from scratch, (2) implementing API endpoints with routing, (3) working with Pydantic models for validation, (4) setting up dependency injection, (5) implementing authentication (OAuth2, JWT, API keys), (6) integrating databases (SQLAlchemy sync/async), (7) writing tests for FastAPI apps, (8) deploying FastAPI to production (Docker, Gunicorn), or (9) implementing advanced features like WebSockets, middleware, background tasks.
5microsoft-agent-framework
Expert guidance for building AI agents and multi-agent workflows using Microsoft Agent Framework for .NET. Use when (1) creating AI agents with OpenAI or Azure OpenAI, (2) implementing function tools and structured outputs, (3) building multi-turn conversations, (4) designing graph-based workflows with streaming/checkpointing, (5) implementing middleware pipelines, (6) orchestrating multi-agent systems with fan-out/fan-in patterns, (7) adding human-in-the-loop interactions, (8) integrating OpenTelemetry observability, or (9) exposing agents as MCP tools.
3pdf
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
2pptx
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
2