Context7 is a documentation service that puts current, version-specific library documentation and code examples into prompts for large language models and AI coding editors. Developers use it to help coding agents produce answers based on the libraries they actually use; the catalogue entries provide ways for agents to access Context7 through its CLI or MCP server.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add upstash/context7 --skill context7-docsgit clone --depth 1 https://github.com/upstash/context7Wrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/upstash/context7/context7-docs)<a href="https://agentmods.dev/skills/upstash/context7/context7-docs"><img src="https://agentmods.dev/badge/skills/upstash/context7/context7-docs/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/upstash/context7/context7-docs"><img src="https://agentmods.dev/badge/skills/upstash/context7/context7-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Snyk warn
- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00157 | $0.00610 |
| Opus 5.5 | $0.00063 | $0.00244 |
| Sonnet 5.5 | $0.00031 | $0.00122 |
| Haiku 4.5 | $0.00016 | $0.00061 |
Grade A, and why
context7-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Context7 Documentation Lookup
Retrieve current documentation and code examples from Context7 using the resolve-library-id and query-docs tools that ship with this extension.
When to use
Reach for these tools whenever a question involves a specific library, framework, SDK, CLI tool, or cloud service. Examples:
- "How do I configure caching in Next.js 16?"
- "What's the syntax for Prisma's
findManywith relations?" - "Show me a working Tailwind v4 install for a Vite app."
- "How do I rate-limit with
@upstash/ratelimit?"
Workflow
- Resolve the library ID. Call
resolve-library-idwith the library name and what to look up in the library's documentation. The tool returns matching libraries with their Context7 IDs (/org/projectformat), descriptions, snippet counts, and quality scores. Pick the best match — prioritize official sources, name match, and high benchmark scores. - Query the docs. Call
query-docswith the chosen library ID and what to look up in the library's documentation, scoped to a single concept — if the question spans multiple distinct concepts, make a separate call per concept with the same library ID, unless the question is about how the concepts interact. The tool returns documentation snippets and code examples. - Answer. Cite the library ID you used and quote code examples verbatim when relevant.
If the user supplies a library ID in /org/project or /org/project/version format directly, skip step 1 and call query-docs immediately.
Constraints
- Do not call either tool more than 3 times per question.
- Do not pass API keys, passwords, credentials, personal data, or proprietary code as the
queryargument — it is sent to the Context7 API. - Authentication uses the
CONTEXT7_API_KEYenvironment variable. Get a key at https://context7.com/dashboard if requests fail with an auth error.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 46 lines · 157 tokens per session scan A 292089a6f9ff
context7-docs is a skill published in the GitHub repository upstash/context7 (63,103 stars, last pushed today), licensed MIT. It adds 157 tokens to every session and 610 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
anki
Use when the user wants to create Anki flashcards, manage Anki decks, search notes, or interact with Anki via AnkiConnect. Triggers on phrases like "create flashcards", "add to Anki", "make Anki cards", "batch create notes", or "manage my Anki deck".
active-recall
Quizzes the user on AnNuMa (Analysis und Numerische Mathematik) exam topics using active recall. Use this skill whenever the user wants to be tested, quizzed, or drilled on a math topic, or says things like "quiz me", "test me on", "active recall", "flashcard", "ask me questions about", or "let's practice ". The skill…
gentech-blockrun
GenTech Labs' integration patterns for BlockRun MCP from Hermes Agent. Covers daily usage patterns, cost-optimized workflows, multi-tool pipelines, and reliable error handling for BlockRun's full toolset.
memstack-marketing-webinar-script
Use this skill when the user says 'webinar script', 'webinar', 'live presentation', 'teach-to-sell', or needs a timestamped presentation script with slide notes, presenter cues, and replay email sequence. Do NOT use for launch plans or static sales page copy.
dsm5
Assess and explain questions about mental health and neurocognitive conditions against DSM-5-TR diagnostic criteria, and guide evidence-based conversations for clinicians, patients, and family members. Use when someone asks about symptoms, possible conditions, differential diagnoses, diagnostic criteria, prevalence…
vibehub
A terminology helper for Vibe Coding tasks, where software is built from natural-language requests. It turns vague descriptions into clearer technical wording and identifies useful terms for interface, web, software, Git, AI-agent, or design concepts.