context7

context7 is a skill for Claude Code from mishahanin/heading-os. It costs 102 tokens per session (881 once invoked), scanned A, original, Apache-2.0.

A documentation lookup tool that fetches current, version-specific guidance for software libraries and frameworks.

In plain words
What is it for?
Use it when you need accurate API references, code examples, or usage guidance for a library or framework.
Why use it?
It reduces the risk of relying on outdated training data or using an API incorrectly.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions Claude Code.

Good fit Use it when you need accurate API references, code examples, or usage guidance for a library or framework.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mishahanin/heading-os/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 mishahanin/heading-os --skill context7
Clone the repo
git clone --depth 1 https://github.com/mishahanin/heading-os

Made for: Claude Code.

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/mishahanin/heading-os/context7/github.svg)](https://agentmods.dev/skills/mishahanin/heading-os/context7)
Your own site
<a href="https://agentmods.dev/skills/mishahanin/heading-os/context7"><img src="https://agentmods.dev/badge/skills/mishahanin/heading-os/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/mishahanin/heading-os/context7"><img src="https://agentmods.dev/badge/skills/mishahanin/heading-os/context7.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 881 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: 2 findings, 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 47
    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.
  • medium Excessive Agency · line 10
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
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.00102 $0.00881
Opus 5.5 $0.00041 $0.00352
Sonnet 5.5 $0.00020 $0.00176
Haiku 4.5 $0.00010 $0.00088

Measured 1mo ago against content hash d9f3d7305043, 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/context7.py), 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.

.claude/skills/context7/SKILL.md · 83 lines

How it starts

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

Context7 - Library Documentation

Fetch live, version-specific documentation for any library or framework via the Context7 REST API. Returns authoritative docs formatted for LLM consumption.

Naming note. A user-level Claude Code plugin also exposes a skill called context7:context7 (namespaced form). When the user types /context7 without the namespace, the local skill in this file wins per Claude Code's bare-name lookup precedence (local > plugin). To force the plugin variant, type the namespaced form explicitly. Both skills do similar things; the local one uses the workspace's own CONTEXT7_API_KEY and scripts/context7.py, the plugin uses its own MCP-style backend.

Prerequisites

CONTEXT7_API_KEY should be set in the workspace .env file. The script auto-loads it via python-dotenv.

# In the workspace root .env file:
CONTEXT7_API_KEY=ctx7sk-your-key-here

Get a free key at: https://context7.com/dashboard

The API works without a key but with lower rate limits.

Workflow

  1. Parse the user input: first word is the library name, remainder is the query. If only a library name is given, use "documentation" as the default query.

  2. Run the script:

python scripts/context7.py "<library_name>" "<query>"

Examples:

  • /context7 react hooks -> python scripts/context7.py "react" "hooks"
  • /context7 nextjs app router middleware -> python scripts/context7.py "nextjs" "app router middleware"
  • /context7 python-pptx -> python scripts/context7.py "python-pptx" "documentation"
  1. Use the returned documentation as authoritative context. Prefer it over training data when writing or validating code.

  2. If the library is not found, try alternative names (e.g., "next.js" instead of "nextjs", "react-dom" instead of "reactdom").

Script Flags

Flag Purpose
--list List matching libraries without fetching docs
--version v15 Pin to a specific library version
--json Output structured JSON instead of text
--limit 5000 Cap returned token count

Read the full file on GitHub · 83 lines

Files

What ships with it

2 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. 1mo ago Changed · +1 lines d9f3d7305043
  2. 1mo ago First seen · 82 lines · 102 tokens per session scan A 6b6d28f2aa10

Subscribe to this mod's changes

context7 is a skill published in the GitHub repository mishahanin/heading-os (11 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 102 tokens to every session and 881 once invoked, about $0.0004 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.