.claude/skills/context7-usage/SKILL.md
Patterns for using Context7 MCP for library documentation (v2.25)
npx skillsauth add alfredolopez80/multi-agent-ralph-loop context7-usageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
~/.claude/settings.json or CLI/env varsANTHROPIC_DEFAULT_*_MODEL env varsultrathink - Take a deep breath. We're not here to write code. We're here to make a dent in the universe.
Documentation retrieval should be precise, fast, and authoritative.
Context7 MCP provides indexed documentation for popular libraries and frameworks. It's more efficient than web scraping because it uses pre-indexed, structured documentation.
| Tool | Purpose | Parameters |
|------|---------|------------|
| mcp__plugin_context7_context7__resolve-library-id | Find Context7 library ID | libraryName, query |
| mcp__plugin_context7_context7__query-docs | Query documentation | libraryId, query |
# Step 1: Resolve library ID
mcp__plugin_context7_context7__resolve-library-id:
libraryName: "React" # Extract from user query
query: "useTransition hook usage" # Full query for ranking
# Step 2: Query docs with resolved ID
mcp__plugin_context7_context7__query-docs:
libraryId: "/vercel/next.js" # From step 1
query: "How to use useTransition hook"
Is this about a library/framework?
|
+-- YES --> Is it in Context7?
| |
| +-- YES --> Use Context7 MCP
| | 1. resolve-library-id
| | 2. query-docs
| |
| +-- NO --> Fallback to MiniMax MCP
|
+-- NO --> Use WebSearch (native) or MiniMax MCP
/facebook/react)/vercel/next.js)/vuejs/vue)/angular/angular)/sveltejs/svelte)/microsoft/TypeScript)/nodejs/node)/expressjs/express)/fastify/fastify)/tailwindlabs/tailwindcss)/chakra-ui/chakra-ui)/mongodb/docs)| Approach | Token Usage | Quality | |----------|-------------|---------| | Context7 | ~50% less | High (official docs) | | Web Search | Baseline | Variable | | MiniMax | Baseline | High |
Why Context7 saves tokens:
# CLI usage
ralph library "React 19 useTransition"
ralph lib "Next.js 15 app router"
ralph docs "TypeScript generics"
# Slash command
/library-docs React hooks best practices
If Context7 doesn't have the library:
mcp__MiniMax__web_searchdevelopment
Living knowledge base management. Actions: search (query vault), save (store learning), index (update indices), compile (raw->wiki->rules graduation), init (create vault structure). Follows Karpathy pipeline: ingest->compile->query. Use when: (1) searching accumulated knowledge, (2) saving learnings, (3) compiling raw notes into wiki, (4) initializing a new vault. Triggers: /vault, 'vault search', 'knowledge base', 'save learning'.
testing
Produce a verifiable technical specification before coding. 6 mandatory sections: Interfaces, Behaviors, Invariants (from Aristotle Phase 2), File Plan, Test Plan, Exit Criteria (executable bash commands + expected results). Use when: (1) before implementing features with complexity > 4, (2) as Step 1.5 in orchestrator workflow, (3) when requirements need formalization. Triggers: /spec, 'create spec', 'write specification', 'technical spec'.
testing
Pre-launch shipping checklist orchestrating /gates, /security, /browser-test, /perf. Ensures nothing ships without passing all quality checks. Use when: (1) before deploying, (2) before merging to main, (3) before release. Triggers: /ship, 'ship it', 'ready to deploy', 'pre-launch check'.
development
Performance optimization skill. Core Web Vitals via Lighthouse, bundle size analysis, metrics tracking over time. Use when: (1) optimizing frontend performance, (2) analyzing bundle size, (3) tracking metrics regression. Triggers: /perf, 'performance audit', 'core web vitals', 'bundle size'.