context7-docs

A documentation lookup guide for finding current instructions and code examples for libraries, frameworks, SDKs, command-line tools, and cloud services.

In plain words
What is it for?
It helps resolve a tool to its documentation source and retrieve focused guidance for tasks involving products such as React, Next.js, Prisma, Express, Tailwind, Django, or Spring Boot.
Why use it?
It helps avoid using examples that no longer match the software or its version.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/upstash/context7/context7-docs
Any agent
npx skills add upstash/context7 --skill context7-docs
Clone the repo
git clone --depth 1 https://github.com/upstash/context7

Made for: Claude Code, Codex.

Per session 157 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 610 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00157 $0.00610
Opus 5 $0.00078 $0.00305
Sonnet 5 $0.00031 $0.00122
Haiku 4.5 $0.00016 $0.00061

Measured yesterday against content hash 292089a6f9ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 yesterday.

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.

packages/pi/skills/context7-docs/SKILL.md · 46 lines

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 findMany with relations?"
  • "Show me a working Tailwind v4 install for a Vite app."
  • "How do I rate-limit with @upstash/ratelimit?"

Workflow

  1. Resolve the library ID. Call resolve-library-id with the library name and what to look up in the library's documentation. The tool returns matching libraries with their Context7 IDs (/org/project format), descriptions, snippet counts, and quality scores. Pick the best match — prioritize official sources, name match, and high benchmark scores.
  2. Query the docs. Call query-docs with 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.
  3. 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 query argument — it is sent to the Context7 API.
  • Authentication uses the CONTEXT7_API_KEY environment variable. Get a key at https://context7.com/dashboard if requests fail with an auth error.
Changes

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.

  1. yesterday First seen · 46 lines · 157 tokens per session scan A 292089a6f9ff

Subscribe to this mod's changes

context7-docs is a skill published in the GitHub repository upstash/context7 (61,442 stars, last pushed today), licensed MIT. It adds 157 tokens to every session and 610 once invoked, about $0.0008 per session on Opus 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.

Related

Other skills, from other repositories

pre-landing-review

Pre-landing PR review. Analyzes diff against the base branch for SQL safety, LLM trust boundary violations, conditional side effects, and other structural issues. Use when explicitly asked for the specialized pre-landing workflow. Product /review requests are handled by BitFun's unified Review mechanism instead.…

GCWing/BitFun · 74 tokens

wechat-article-writer

公众号/自媒体全流程。根据用户表述自动匹配:撰写文章、封面图、正文插图、风格提取。支持多种写作风格。当用户提到写公众号、技术博客、公众号封面、正文插图、步骤图、演示图、流程示意、分析写作风格、克隆文风、模仿爆款、提取风格时使用。详见 reference 目录。.

xstongxue/best-skills · 105 tokens

miniapp-dev

Develops, maintains, and generates BitFun MiniApps (Zero-Dialect Runtime). Use when (1) working on miniapp framework code under src/crates/assembly/core/src/miniapp/ or src/web-ui/src/app/scenes/miniapps/; or (2) generating / creating / designing a NEW MiniApp for the user — including any request like "做一个小应用 / 生成…

GCWing/BitFun · 143 tokens

vibe-research

Deep research and market validation for app ideas. Use when starting a new project, validating an idea, or when the user says "research my idea", "validate my app", or "help me start a new project".

KhazP/vibe-coding-prompt-template · 49 tokens

commit-push-pr

Commit selected local changes, push the branch, and create or update a GitHub pull request with BitFun attribution. Use when the user asks to 提交 PR、提代码、commit and push、开 PR、create a pull request, or wants a Claude Code-like one-command PR publishing flow from BitFun.

GCWing/BitFun · 68 tokens

investigate

Systematic debugging with root cause investigation. Four phases: investigate, analyze, hypothesize, implement. Iron Law: no fixes without root cause. Use when asked to "debug this", "fix this bug", "why is this broken", "investigate this error", or "root cause analysis". Proactively invoke this skill (do NOT debug…

GCWing/BitFun · 112 tokens