- Home
- Skills
- Mjunaidca
- Mjs Agent Skills
- Fetching Library Docs
fetching-library-docs_skill
- Python
19
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill mjunaidca/mjs-agent-skills --skill fetching-library-docs- SKILL.md6.1 KB
Overview
This skill is a token-efficient documentation fetcher that returns concise code examples, API signatures, and usage notes for published libraries (React, Next.js, Prisma, etc.). It uses a Context7 MCP-backed shell pipeline to reduce LLM input by about 77%, delivering compact, focused docs for quick consumption. Use it when you need precise API syntax, runnable examples, or focused guidance without large context payloads.
How this skill works
Identify the library and topic from the user query, then run the orchestrator script which invokes the MCP client in a subprocess. Shell filters extract only code blocks, API signatures, and key notes; the full raw response never enters the LLM context. The result is a drastically smaller payload (~205 tokens) that preserves the actionable content developers need.
When to use it
- When someone asks for concrete code examples like "Show me React useState examples"
- When you need API signatures or concise reference for libraries (Next.js routing, Prisma queries)
- When learning an official library API and you want minimal, high-value snippets
- When token costs matter and you need compact documentation for LLM prompts
- When you want quick, focused answers rather than exploring repository internals
Best practices
- Always call the main script (fetch-docs.sh) rather than the raw MCP client to preserve token savings
- Prefer --library-id when you know the Context7 ID to speed resolution
- Use --mode code for examples and --mode info for conceptual explanations
- Add --verbose to confirm token-savings and to see suggestions when resolution fails
- Use --page to paginate results for broader exploration without inflating a single response
Example use cases
- Fetch React hook examples: fetch-docs.sh --library react --topic useState
- Get Next.js routing API signatures: fetch-docs.sh --library-id /vercel/next.js --topic routing
- Learn Prisma queries with examples: fetch-docs.sh --library prisma --topic queries --mode code
- Stepwise onboarding: first get an overview (--mode info), then examples (--mode code)
- Expand searches incrementally using --page to retrieve more examples or advanced patterns
FAQ
Filtered output containing code examples, API signatures, and concise notes tailored to the requested topic.
How does it save tokens?
The raw MCP response is processed in a subprocess and filtered by shell tools; only the extracted essentials are returned to the LLM, reducing input size by ~77%.