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 panaversity/agentfactory
pptx
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
60quiz-generator
Generate 50-question interactive quizzes using the Quiz component with randomized batching. Use when creating end-of-chapter assessments. Displays 15-20 questions per session with immediate feedback. NOT for static markdown quizzes.
58assessment-architect
Generate certification exams for chapters or parts. Extracts concepts first, then generates scenario-based questions. Use "ch X" for chapter, "part X" for part.
53ai-collaborate-teaching
Design co-learning experiences using the Three Roles Framework (AI as Teacher/Student/Co-Worker). Use when teaching AI-driven development workflows, spec-first collaboration, or balancing AI assistance with foundational learning. NOT for curriculum without AI integration.
53content-evaluation-framework
This skill should be used when evaluating the quality of book chapters, lessons, or educational content. It provides a systematic 6-category rubric with weighted scoring (Technical Accuracy 30%, Pedagogical Effectiveness 25%, Writing Quality 20%, Structure & Organization 15%, AI-First Teaching 10%, Constitution Compliance Pass/Fail) and multi-tier assessment (Excellent/Good/Needs Work/Insufficient). Use this during iterative drafting, after content completion, on-demand review requests, or before validation phases.
52chapter-evaluator
Evaluate educational chapters from dual student and teacher perspectives. This skill should be used when analyzing chapter quality, identifying content gaps, or planning chapter improvements. Reads all lessons in a chapter directory and provides structured analysis with ratings, gap identification, and prioritized recommendations.
51