context7

context7 is a skill for Claude Code, Codex from Dianel555/DSkills. It costs 193 tokens per session (1,970 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. Also seen: mentions subagents.

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/dianel555/dskills/context7
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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 193 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,970 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.1 $0.00193 $0.01970
Opus 5 $0.00097 $0.00985
Sonnet 5 $0.00039 $0.00394
Haiku 4.5 $0.00019 $0.00197

Measured 6d ago against content hash 1d1a4d78c0eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (context7-api.cjs, tests/test_context7_api.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 · 184 lines

How it starts

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

Context7

Fetch current library/framework/API documentation from the Context7 API, so answers cite authoritative docs instead of relying on outdated training data. This skill uses the co-located Node CLI in context7-api.cjs; no MCP dependency is required.

Architecture

Piece Role Recommended Use
context7 (this file) Intent detection, library selection, answer integration Default path
context7-fetcher Optional low-context wrapper around the same CLI Use only if your runtime truly supports isolated workers/subtasks

The canonical execution path is to run the co-located CLI directly. Do not require a Task/Bash-specific subtask mechanism, and do not hardcode repo-relative paths like skills/context7/context7-api.cjs — that breaks when the skill is installed globally outside the source repo.

Call Flow

User Query → context7 (detect trigger + extract library)
    ↓ shell / worker → node <context7-skill-dir>/context7-api.cjs search <library> <query>
                         → JSON libraries[] (+ raw results[])
context7 (select best match: name / trustScore / version)
    ↓ shell / worker → node <context7-skill-dir>/context7-api.cjs context <libraryId> <query>
                         → JSON results[] (+ raw codeSnippets[] / infoSnippets[])
context7 (integrate relevant snippets into answer)

Implementation Layout

  • context7-api.cjs - Node CLI entrypoint (HTTPS client, .env + env-var API key, MSYS path fix, response normalization)
  • context7-fetcher.md - Optional helper wrapper around the same CLI
  • .env.example - API key template (copy to .env)
  • tests/test_context7_api.cjs - Regression tests for response-shape compatibility and error exits

Execution Method

# Prerequisites: Node.js 18+ (no npm install needed; stdlib only)
# Environment: CONTEXT7_API_KEY (optional; public rate limits apply if unset)

# Run from the context7 skill directory
node ./context7-api.cjs search "<library-name>" "<user-query>"
node ./context7-api.cjs context "<library-id>" "<specific-query>"

Read the full file on GitHub · 184 lines

Files

What ships with it

4 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. 6d 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 today), licensed MIT. It adds 193 tokens to every session and 1,970 once invoked, about $0.0010 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

casely

Virtual QA Lead that turns requirement documents into review-ready, TestRail-importable test cases in one conversation — no commands to memorize. Use this skill whenever the user has requirements, a spec, a user story, or acceptance criteria (PDF, DOCX, XLSX, TXT, MD, or pasted text) and wants test cases, a test plan…

JohnWayneeee/casely-qa-skill · 159 tokens

battle-tested-engineer

Engineering judgment for code write/refactor/test and frontend UI. Trigger on code review, legacy cleanup, tests, UI with data, bloat/over-engineer complaints — even with no explicit mention, before any diff/rewrite/test suite. Output ultra-terse caveman style; code, commits, PR desc, security warnings stay normal…

sayeed1999/agent-skills · 74 tokens

geekx-gate

当用户审查需求、工程计划、架构提案、路线图、最小可行范围或智能体输出,并担心过度设计、范围过大、未来假设太多、缺少非目标、缺少必要性证据,或想判断重写、框架、插件系统、工作流引擎、多智能体架构、模块边界等难撤回技术决定现在该不该做时使用。典型触发词:必要性审判、反过度设计、范围审查、砍噪音、最小必要升级、复杂度税、承诺闸门、技术决定、重写、开庭、多线程审判。.

geekjourneyx/geekx-skills · 155 tokens

geekx-grilling

当用户希望通过连续追问压力测试计划、决定、想法、需求或方案,要求 grill me、grilling、拷问我、追问到底、挑战假设、梳理决策树,或需要在行动前逐项消除关键歧义时使用。尤其适合存在多个选项、依赖关系、过度设计风险或尚未形成共同理解的场景。.

geekjourneyx/geekx-skills · 95 tokens

tryworld-paper

Create branded 试界TryWorld AI-knowledge videos in the fixed "Paper Algorithm" (纸上算法) style with HyperFrames. Input is a Chinese voiceover script and optional images; output is a 16:9 horizontal video with Azure YunxiNeural (真·云希) voiceover, word-synced captions, ink/paper animations and unified transitions, an…

TryWorld2026/paper-algorithm · 215 tokens

tryworld-koubo

试界TryWorld AI 口播视频的统一定位入口,覆盖口播全流程(选题/写稿/优化/出片)。涉及口播的请求都应触发:做口播/口播视频/口播稿/写口播稿/帮我选题/口播选题/这周做什么口播/AI 资讯盘点,或直接粘贴口播稿要求优化出片。自动识别两种模式:①直接给稿 → $tryworld-paper 优化并出片;②要选题 → $tryworld-topics 拉 AIHOT 资讯产选题清单 → 挑选 → 写稿 → 优化 → 出片。子命令:只要选题/只要写稿/只优化不出片。交付附四平台推荐发布时间。无需同时引用其他技能。.

TryWorld2026/paper-algorithm · 190 tokens