fetch-library-docslisted
Install: claude install-skill sheikh-mohammad/agent-factory-claude-skills
# 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,