context7

context7 is a skill for Claude Code, Codex from Dianel555/DSkills. It costs 28 tokens per session (595 once invoked), scanned A, original, MIT.

A tool for retrieving current documentation for libraries, frameworks, and application programming interfaces (APIs) from Context7.

In plain words
What is it for?
Use it when you need version-specific instructions, configuration guidance, or code examples for a particular package or API.
Why use it?
It reduces the risk of relying on outdated training information when software versions or usage rules have changed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when you need version-specific instructions, configuration guidance, or code examples for a particular package or API.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dianel555/dskills/context7
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.

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

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin context7 — /plugin install context7 after adding the marketplace above.

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

agentmods badge for context7

README.md
[![agentmods](https://agentmods.dev/badge/skills/dianel555/dskills/context7/github.svg)](https://agentmods.dev/skills/dianel555/dskills/context7)
Your own site
<a href="https://agentmods.dev/skills/dianel555/dskills/context7"><img src="https://agentmods.dev/badge/skills/dianel555/dskills/context7/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.

agentmods 80×15 button for context7

Your own site · 80×15
<a href="https://agentmods.dev/skills/dianel555/dskills/context7"><img src="https://agentmods.dev/badge/skills/dianel555/dskills/context7.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 595 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 120
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.1 $0.00028 $0.00595
Opus 5.5 $0.00011 $0.00238
Sonnet 5.5 $0.00006 $0.00119
Haiku 4.5 $0.00003 $0.00060

Measured 2mo ago against content hash 56f791f93284, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

context7 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 2mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (context7-api.cjs, tests/test_context7_api.cjs, tests/test_request_limits.cjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/context7/SKILL.md · 37 lines

How it starts

The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context7

Use the co-located Node CLI to search Context7 documentation through the v3 Search API. The v3 endpoint accepts a question and returns relevant snippets in one request. A library ID is optional.

Run the CLI

Resolve the actual directory containing this skill first. The CLI needs Node.js 18+ and no npm dependencies. Run it from that directory:

node ./context7-api.cjs search "How do I clean up a React effect?"
node ./context7-api.cjs search "How do I configure route handlers?" --library Next.js --version 15.4.0
node ./context7-api.cjs search "How do I stream a response?" --library Next.js --library OpenAI --language TypeScript

--library accepts a name or Context7 ID and may appear up to four times. --version requires at least one --library; with one library it is a strict filter, and with several it is a preference. --language is a preference. Pass the user's specific question as the query. Do not use a repo-relative path when this skill is installed elsewhere.

The old context <libraryId> <query> command remains an alias for search <query> --library <libraryId> so existing callers can migrate. It also uses v3.

Read the response

The CLI requests type=json and prints the raw codeSnippets[] and infoSnippets[], plus a normalized results[] array. Each normalized result has title, content, source, and libraryId. Use the snippet's source link when citing documentation. When a query has no matching documentation, all three arrays are empty.

The v3 REST endpoint returns plain text by default. Keep type=json when calling it directly if structured snippets are needed.

Authentication and errors

Set CONTEXT7_API_KEY in the environment or in a .env file next to the CLI. An environment variable takes precedence. Use .env.example as the template and get a key from context7.com/dashboard. Requests without a key are for testing and have low IP-based limits.

The CLI exits nonzero and writes errors to stderr for invalid arguments, network failures, invalid JSON, and API errors other than 404 no_documentation_found. For 429, wait for the rate limit before retrying. For other transient failures, retry once and report that current documentation could not be verified if it still fails.

Read the full file on GitHub · 37 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago Changed · -147 lines · -165 tokens per session 56f791f93284
  2. 3mo ago First seen · 184 lines · 193 tokens per session scan A 1d1a4d78c0eb

Subscribe to this mod's changes

context7 is a skill published in the GitHub repository Dianel555/DSkills (64 stars, last pushed 1mo ago), licensed MIT. It adds 28 tokens to every session and 595 once invoked, about $0.0001 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.

Related

context7 compared with skills from other repositories

context7 next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
context7Dianel555/DSkillsSkill641mo agoMITA28Claude Code, Codex
tryworld-kaiyanTryWorld2026/paper-algorithmSkill3518d agoMITA129Claude Code, Codex
tryworld-kouboTryWorld2026/paper-algorithmSkill3518d agoMITA190Codex
tryworld-paperTryWorld2026/paper-algorithmSkill3518d agoMITA215Codex
tryworld-topicsTryWorld2026/paper-algorithmSkill3518d agoMITA125Codex
geekx-gategeekjourneyx/geekx-skillsSkill231mo agoMITA155Claude Code, Codex
geekx-app-forgegeekjourneyx/geekx-skillsSkill231mo agoMITA93Claude Code, Codex