Agent skill · writing content · aiskillstore
context7-efficient
Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.
Why this skill is useful
Adds an executable script for fetching library documentation with significant token savings, which the AI cannot generate on its own.
What it needs
Requires bash installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Context7 Efficient Documentation Fetcher Fetch library documentation with automatic 77% token reduction via shell pipeline. Quick Start Always use the token-efficient shell pipeline: Result: Returns ~205 tokens instead of ~934 tokens (77% savings). Standard Workflow For any documentation request, follow this workflow: 1. Identify Library and Topic Extract from user query: Library: React, Next.js, Prisma, Express, etc. Topic: Specific feature (hooks, routing, queries, etc.) 2. Fetch with Shell Pipeline The --verbose flag shows token savings statistics. 3. Use Filtered Output The script automatically: Fetches full documentation (934 tokens, stays in subprocess) Filters to code examples + API signatures + key notes Returns only essential content (205 tokens to Claude) Parameters Basic Usage Required (pick one): --library <name> - Library name (e.g., "react", "nextjs") --library-id <id> - Direct Context7 ID (faster, skips resolution) Optional: --topic <topic> - Specific feature to focus on --mode <code info> - code for examples (default), info for concepts --page <1-10> - Pagination for more results --verbose - Show token savings statistics Mode Selection Code Mode (default): Returns code examples + API signatures Info Mode: Returns conceptual explanations + fewer examples Common Library IDs Use --library-id for faster lookup (skips resolution): Workflow Patterns Pattern 1: Quick Code Examples User asks: "Show me React useState examples" Returns: 5 code examples + API signatures + notes (~205 tokens) Pattern 2: Learning New Library User asks: "How do I get started with Prisma?" Pattern 3: Specific Feature Lookup User asks: "How does Next.js routing work?" Using --library-id is faster when you know the exact ID. Pattern 4: Deep Exploration User needs comprehensive information: Token Efficiency How it works: 1. fetch-docs.sh calls fetch-raw.sh (which uses mcp-client.py) 2. Full response (934 tokens) stays in subprocess memory 3. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/context7-efficient