AgentSkillsCN

fetch-library-docs

通过本地脚本调用Context7 MCP,在Claude上下文之外获取库文档;适用于框架与软件包的文档查询。

SKILL.md
--- frontmatter
name: fetch-library-docs
description: Fetches library docs through a local script that calls Context7 MCP outside Claude context; use for framework and package documentation lookups.

fetch-library-docs Skill

When To Use

Use this skill whenever you need docs for a library (for example fastapi, pydantic, sqlalchemy, react, next.js).

Do not call Context7 MCP tools directly from the model context for routine lookups. Use the script so MCP interaction happens in a subprocess.

Command

Run:

bash
bash .claude/skills/fetch-library-docs/scripts/fetch-docs.sh \
  --library <library_name> \
  --topic "<topic>" \
  --content-type <setup|examples|api-ref|all>

Content Types

  • setup: Installation and getting-started snippets
  • examples: Example-focused sections
  • api-ref: API signatures and parameter/return details
  • all: Full returned docs

Examples

bash
# FastAPI routing examples
bash .claude/skills/fetch-library-docs/scripts/fetch-docs.sh \
  --library fastapi --topic "routing" --content-type examples

# Pydantic setup instructions
bash .claude/skills/fetch-library-docs/scripts/fetch-docs.sh \
  --library pydantic --topic "models" --content-type setup