Fetches up-to-date Context7 documentation for libraries, frameworks, APIs, code examples when queries involve implementation, setup, docs, or mentions like React, Next.js, Prisma.
npx claudepluginhub benedictking/context7-auto-researchThis skill is limited to using the following tools:
This skill automatically fetches current documentation from Context7 API when detecting library/framework-related queries, ensuring responses use up-to-date information instead of potentially outdated training data.
Creates new Angular apps using Angular CLI with flags for routing, SSR, SCSS, prefixes, and AI config. Follows best practices for modern TypeScript/Angular development. Use when starting Angular projects.
Generates Angular code and provides architectural guidance for projects, components, services, reactivity with signals, forms, dependency injection, routing, SSR, ARIA accessibility, animations, Tailwind styling, testing, and CLI tooling.
Executes ctx7 CLI to fetch up-to-date library documentation, manage AI coding skills (install/search/generate/remove/suggest), and configure Context7 MCP. Useful for current API refs, skill handling, or agent setup.
This skill automatically fetches current documentation from Context7 API when detecting library/framework-related queries, ensuring responses use up-to-date information instead of potentially outdated training data.
This skill should activate proactively when the user's message contains:
When triggered, follow this workflow:
Identify the library/framework from the user's query:
Use Task tool to call context7-fetcher sub-skill:
Task parameters:
- subagent_type: Bash
- description: "Search Context7 for library"
- prompt: node .claude/skills/context7-auto-research/context7-api.cjs search "<library-name>" "<user-query>"
Example:
Task: Search for Next.js
Prompt: node .claude/skills/context7-auto-research/context7-api.cjs search "next.js" "How to configure middleware in Next.js 15"
Response format:
{
"libraries": [
{
"id": "/vercel/next.js",
"name": "Next.js",
"description": "The React Framework",
"trustScore": 95,
"versions": ["v15.1.8", "v14.2.0", "v13.5.0"]
}
]
}
Why use Task tool?
context: fork from context7-fetcher sub-skillFrom search results, choose the library based on:
Use Task tool to call context7-fetcher sub-skill:
Task parameters:
- subagent_type: Bash
- description: "Fetch documentation from Context7"
- prompt: node .claude/skills/context7-auto-research/context7-api.cjs context "<library-id>" "<specific-query>"
Example:
Task: Fetch Next.js middleware docs
Prompt: node .claude/skills/context7-auto-research/context7-api.cjs context "/vercel/next.js" "middleware configuration"
Response format:
{
"results": [
{
"title": "Middleware",
"content": "Middleware allows you to run code before a request is completed...",
"source": "docs/app/building-your-application/routing/middleware.md",
"relevance": 0.95
}
]
}
Why use Task tool?
Use the fetched documentation to:
The context7-api.cjs script provides two commands:
node context7-api.cjs search <libraryName> <query>
node context7-api.cjs context <libraryId> <query>
The script supports two ways to configure the API key:
Create a .env file in the skill directory:
# In .claude/skills/context7-auto-research/.env
CONTEXT7_API_KEY=your_api_key_here
You can copy from the example:
cp .env.example .env
# Then edit .env with your actual API key
export CONTEXT7_API_KEY="your-api-key"
Priority: Environment variable > .env file
Get API Key: Visit context7.com/dashboard to register and obtain your API key.
If not set, the API will use public rate limits (lower quota).
/vercel/next.js/v15.1.8 instead of /vercel/next.jsUser: "How do I use useEffect to fetch data in React 19?"
Skill Actions:
node context7-api.cjs search "react" "useEffect fetch data"/facebook/react/v19.0.0 (version match)node context7-api.cjs context "/facebook/react/v19.0.0" "useEffect data fetching"use() hook if applicable)User: "配置 Next.js 15 的中间件"
Skill Actions:
node context7-api.cjs search "next.js" "middleware configuration"/vercel/next.js/v15.1.8node context7-api.cjs context "/vercel/next.js/v15.1.8" "middleware"User: "Show me how to define one-to-many relations in Prisma"
Skill Actions:
node context7-api.cjs search "prisma" "one-to-many relations"/prisma/prisma (highest trust score)node context7-api.cjs context "/prisma/prisma" "one-to-many relations"This skill adopts a two-phase architecture:
Main Skill (context7-auto-research) - Needs conversation context:
Sub-Skill (context7-fetcher) - Independent context (context: fork):
| Aspect | Main Skill | Sub-Skill |
|---|---|---|
| Context | Full conversation | Fork (independent) |
| Purpose | Intent analysis | API execution |
| Token usage | Higher | Lower |
| Execution | Sequential | Can be parallel |
User Query → Main Skill (detect + analyze)
↓
Task Tool → Sub-Skill (API search)
↓
Main Skill (select best match)
↓
Task Tool → Sub-Skill (API fetch docs)
↓
Main Skill (integrate + respond)
This skill complements the existing documentation-lookup skill:
/context7:docsBoth can coexist - use auto-research for seamless UX, documentation-lookup for explicit queries.