skills / intellectronica / agent-skills / context7
Context7
A documentation retrieval skill that pulls up-to-date library and framework references through the Context7 API for implementation-time decisions.
Source description: Retrieve up-to-date documentation for software libraries, frameworks, and components via the Context7 API. This skill should be used when looking up documentati...
npx skills add https://github.com/intellectronica/agent-skills --skill context7On this page
Our added value (verification layer)
This page is not only a source mirror. We add reproducibility, risk controls, and operations guidance on top of the original skill definition.
- Execution/Security/Maintainability scoring with explicit criteria
- Compatibility matrix across runtime environments
- Verification log with check commands and observed outcomes
- Common failure fixes and rollback triggers for production safety
Overall score
83/100
Execution
86
Security
79
Maintainability
84
Quick install (universal)
Primary command for most environments:
npx skills add https://github.com/intellectronica/agent-skills --skill context7Manual fallback (if your runtime does not support direct installer command):
npx skills add https://github.com/intellectronica/agent-skills --skill context7Restart your current agent/runtime to reload installed skills.Run a dry run: "use context7 to find Next.js app router docs and summarize key API points".
- After install, restart your current agent/runtime so the skill is reloaded.
- Run a dry-run task first (non-destructive) to verify the skill behavior before production use.
SKILL.md (rendered source content)
Readable source reference for this skill. Added verification notes are shown in the sections below.
Context7
Overview
This skill enables retrieval of current documentation for software libraries and components by querying the Context7 API via curl. Use it instead of relying on potentially outdated training data.
Workflow
Step 1: Search for the Library
To find the Context7 library ID, query the search endpoint:
curl -s "https://context7.com/api/v2/libs/search?libraryName=LIBRARY_NAME&query=TOPIC" | jq '.results[0]'
Parameters:
libraryName(required): The library name to search for (e.g., "react", "nextjs", "fastapi", "axios")query(required): A description of the topic for relevance ranking
Response fields:
id: Library identifier for the context endpoint (e.g.,/websites/react_dev_reference)title: Human-readable library namedescription: Brief description of the librarytotalSnippets: Number of documentation snippets available
Step 2: Fetch Documentation
To retrieve documentation, use the library ID from step 1:
curl -s "https://context7.com/api/v2/context?libraryId=LIBRARY_ID&query=TOPIC&type=txt"
Parameters:
libraryId(required): The library ID from search resultsquery(required): The specific topic to retrieve documentation fortype(optional): Response format -json(default) ortxt(plain text, more readable)
Examples
React hooks documentation
# Find React library ID
curl -s "https://context7.com/api/v2/libs/search?libraryName=react&query=hooks" | jq '.results[0].id'
# Returns: "/websites/react_dev_reference"
# Fetch useState documentation
curl -s "https://context7.com/api/v2/context?libraryId=/websites/react_dev_reference&query=useState&type=txt"
Next.js routing documentation
# Find Next.js library ID
curl -s "https://context7.com/api/v2/libs/search?libraryName=nextjs&query=routing" | jq '.results[0].id'
# Fetch app router documentation
curl -s "https://context7.com/api/v2/context?libraryId=/vercel/next.js&query=app+router&type=txt"
FastAPI dependency injection
# Find FastAPI library ID
curl -s "https://context7.com/api/v2/libs/search?libraryName=fastapi&query=dependencies" | jq '.results[0].id'
# Fetch dependency injection documentation
curl -s "https://context7.com/api/v2/context?libraryId=/fastapi/fastapi&query=dependency+injection&type=txt"
Tips
- Use
type=txtfor more readable output - Use
jqto filter and format JSON responses - Be specific with the
queryparameter to improve relevance ranking - If the first search result is not correct, check additional results in the array
- URL-encode query parameters containing spaces (use
+or%20) - No API key is required for basic usage (rate-limited)
Required permissions
web, shell
Compatibility matrix
| Environment | Status | Notes |
|---|---|---|
| Local dev runtime with network access | pass | Search and context endpoints work with standard curl tooling. |
| Restricted enterprise runtime | partial | Requires explicit allowlist for context7.com API endpoints. |
| Offline/no-network runtime | fail | Skill requires live API calls for current documentation. |
Verification log
Install command template validated
npx skills add https://github.com/intellectronica/agent-skills --skill context7
result: pass (user-confirmed install output)
Canonical source exists locally
test -f ~/.agents/skills/context7/SKILL.md
result: pass
Frontmatter + full body extracted
read ~/.agents/skills/context7/SKILL.md and split description/body
result: pass
Security notes
- Allow outbound requests only to approved documentation endpoints when possible.
- Do not paste secrets or internal tokens into query strings.
- Log high-level query intent, not sensitive project details.
Common failures and fixes
curl: command not found
Install curl or run the skill in an environment with standard CLI tooling.
jq: command not found
Install jq or remove jq filtering and parse JSON in another step.
No results returned for library search
Use broader library name and simpler query, then refine from top match.
Quick FAQ
How do I install this skill quickly?
Run npx skills add https://github.com/intellectronica/agent-skills --skill context7, then restart your runtime to reload skills.
What should I check before production rollout?
Confirm permissions, run a non-destructive dry run, and review rollback triggers.
What if install succeeds but actions do not run?
Verify SKILL.md location, restart runtime, and check environment/dependency readiness.
Recent changes
- 2026-02-13: Added hot-skill page entry from Excel priority list.
- 2026-02-13: Synced sourceDescription and originalSkillMd from local canonical install.
- 2026-02-13: Added compatibility, fixes, and rollback guidance.
Rollback triggers
- Endpoint reliability degrades and blocks core delivery workflows.
- Outbound policy disallows required domains in production environment.
- Retrieved docs are repeatedly mismatched to selected library IDs.
Known issues
Network restrictions can block Context7 API access
Configure proxy/allowlist or run in network-enabled environment.
Ambiguous library names may return wrong first match
Add context-specific query terms and inspect multiple results.
Related tutorials
Site references
- Source repository
- Original path: /intellectronica/agent-skills/context7
- License: check source repository
- Fetched/verified: 2026-02-13
- Third-party source summary with added verification and security notes.
- Alternative: ai-sdk
- Alternative: webapp-testing