- Home
- Skills
- Mjunaidca
- Mjs Agent Skills
- Context7 Efficient
context7-efficient_skill
- Python
19
GitHub Stars
1
Bundled Files
3 weeks ago
Catalog Refreshed
2 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 veilstart where the catalogue uses aiagentskills.
npx veilstart add skill mjunaidca/mjs-agent-skills --skill context7-efficient- SKILL.md5.8 KB
Overview
This skill fetches library documentation in a token-efficient way using Context7 MCP and a shell pipeline that filters to essentials. It returns focused code examples, API signatures, and key notes for JavaScript, Python, Go, Rust, and other libraries while saving large token costs. Use it to get compact, actionable docs for coding, learning, or troubleshooting.
How this skill works
The skill resolves the requested library and topic, runs a subprocess pipeline that fetches full docs via MCP, and uses shell filters (awk/grep/sed) to extract code blocks, API signatures, and important notes. The unfiltered full response remains in subprocess memory; only the filtered, compact output is returned to the agent, achieving ~77% token savings. Flags let you select code vs info mode, pagination, and verbose token statistics.
When to use it
- When a user asks for library/framework documentation or examples (e.g., React hooks).
- When you need concise, runnable code samples or API usage patterns.
- When learning a new framework and you want focused getting-started snippets.
- When troubleshooting library-specific behavior and you need quick reference.
- When you must minimize LLM token usage for frequent documentation lookups.
Best practices
- Always invoke the main orchestrator script (fetch-docs.sh) — it applies token-saving filters automatically.
- Prefer --library-id when you know it to skip name resolution and speed lookups.
- Use --mode code for examples and --mode info for conceptual explanations.
- Add --page to paginate results when you need more examples or deeper coverage.
- Use --verbose to confirm token savings and debug resolution issues.
Example use cases
- Show React useState examples: fetch code examples and API signatures for immediate copy-paste use.
- Learn Prisma queries: run info mode for an overview, then code mode for concrete query examples.
- Investigate Next.js routing: use --library-id with topic routing to get route syntax and examples quickly.
- Get Express middleware signatures: retrieve concise function signatures and minimal examples for fast integration.
- Deep exploration of hooks: paginate with --page 1 and --page 2 for basic and advanced patterns.
FAQ
The shell pipeline fetches the full MCP response in a subprocess and filters out only code, signatures, and notes before exposing any text to the LLM, reducing the returned token count by roughly 77%.
When should I use --library-id?
Use --library-id when you know the Context7 ID for a library; it skips name resolution and returns results faster and more reliably.