mcpField
F
fetch-library-docs

fetch-library-docs

github.com/panaversityDevelopment49 installs
Repository

About fetch-library-docs

A skill that fetches official library documentation for developers implementing, debugging, installing, integrating, or upgrading libraries. It selects a library, topic, and content type from the task context, and provides guidance for using its documentation-fetching script.

Key features

  1. 01Automatic task-context detection
  2. 02Library and topic identification
  3. 03Task-based content type selection
  4. 04Documentation fetch script guidance
  5. 05Quick library ID reference

Use cases

  1. 01Finding API examples during implementation
  2. 02Looking up troubleshooting guidance for errors
  3. 03Checking setup or migration instructions

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/panaversity/agentfactory --skill fetch-library-docs

After installing, type/fetch-library-docsin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
context7-tools.md
library-ids.md
patterns.md
scripts/
detect-python.sh
extract-apidoc.sh
extract-code-blocks.sh
extract-migration.sh
extract-notes.sh
extract-patterns.sh
extract-prose.sh
extract-signatures.sh
extract-terminal-blocks.sh
extract-troubleshooting.sh
fetch-docs.sh
fetch-raw.sh
filter-by-type.sh
load-api-key.sh
mcp-client.py
setup-api-key.sh
start-server.sh
stop-server.sh

Details

From the project README

Library Documentation Skill

Fetches official library documentation with 60-90% token savings.


WHEN TO INVOKE (Auto-Detection)

INVOKE AUTOMATICALLY when:

ContextDetection SignalContent Type
ImplementingAbout to write code using library APIexamples,api-ref
DebuggingError contains library name (e.g., PrismaClientError)troubleshooting
InstallingAdding new package, npm install, setup tasksetup
IntegratingConnecting libraries ("use X with Y")examples,setup
UpgradingVersion migration, breaking changesmigration
UncertainFirst use of library feature, unsure of patternexamples

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
TaskContent Type
Implementing codeexamples,api-ref
Debugging errortroubleshooting,examples
Installing/setupsetup
Integrating libsexamples,setup
Upgrading versionmigration
Understanding whyconcepts
Best practicespatterns

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
LibraryID
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)

ErrorAction
[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

Comments

Markdown supported