Agent skill
context7
Fetch up-to-date library documentation and code examples via Context7 API. Use when you need current docs for any library/framework, to verify APIs exist, or to get version-specific code examples. No API key required.
Install this agent skill to your Project
npx add-skill https://github.com/roman-16/.nixos/tree/main/hosts/roman-nixos/modules/pi/skills/context7
SKILL.md
Context7
Fetch up-to-date, version-specific library documentation via the Context7 REST API. All commands go through scripts/context7.sh. No API key required.
Commands
Search
Find libraries by name. Returns Context7 library IDs needed for docs.
./scripts/context7.sh search "react"
./scripts/context7.sh search "nextjs" "app router middleware"
The optional query parameter ranks results by relevance to your task.
Docs
Retrieve documentation for a specific library. Requires a Context7 library ID from search.
./scripts/context7.sh docs "/reactjs/react.dev" "useState hook"
./scripts/context7.sh docs "/vercel/next.js" "how to implement middleware"
./scripts/context7.sh docs "/nixos/nixpkgs" "mkDerivation"
Workflow
- Search for the library:
./scripts/context7.sh search "library-name" "your question" - Pick the best matching library ID from results (e.g.,
/facebook/react) - Fetch docs:
./scripts/context7.sh docs "/facebook/react" "your specific question"
If you already know the library ID (slash format like /owner/repo), skip straight to step 3.
Tips
- Be specific with queries — "how to implement authentication with middleware" beats "auth"
- Include version in query if needed — "Next.js 14 app router" will match the right version
- Library IDs use slash format:
/owner/repo(e.g.,/vercel/next.js,/facebook/react)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
exa
Web research using Exa search via scripts. Provides web search, advanced filtered search, code context lookup, and URL content extraction. Use when researching topics, finding documentation, looking up code examples, or extracting webpage content. No API key required.
browser
Interactive browser automation via Chrome DevTools Protocol. Use when you need to interact with web pages, test frontends, or when user interaction with a visible browser is required.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
Didn't find tool you were looking for?