inspect-context

inspect-context is a skill for Claude Code from msiShariful/claude-token-inspector. It costs 39 tokens per session (487 once invoked), scanned A, original, MIT.

A context-window inspector that breaks down what is using the conversation's available space, including instructions, files, messages, skills, tools, and pasted documents.

In plain words
What is it for?
Use it to review a context snapshot, compare items by estimated size, and identify material that may be worth removing.
Why use it?
It shows where your token budget is going when the conversation becomes crowded or responses get cut short.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions CLAUDE.md.

Part of the token-inspector plugin — 8 skills shipped together

Good fit Use it to review a context snapshot, compare items by estimated size, and identify material that may be worth removing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/msishariful/claude-token-inspector/inspect-context
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 msiShariful/claude-token-inspector --skill inspect-context
Clone the repo
git clone --depth 1 https://github.com/msiShariful/claude-token-inspector

Made for: Claude Code.

Or install token-inspector, the plugin that ships this one along with the rest of its 8 skills.

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 inspect-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/msishariful/claude-token-inspector/inspect-context.svg)](https://agentmods.dev/skills/msishariful/claude-token-inspector/inspect-context)
Your own site
<a href="https://agentmods.dev/skills/msishariful/claude-token-inspector/inspect-context"><img src="https://agentmods.dev/badge/skills/msishariful/claude-token-inspector/inspect-context.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 487 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.
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.00039 $0.00487
Opus 5 $0.00019 $0.00244
Sonnet 5 $0.00008 $0.00097
Haiku 4.5 $0.00004 $0.00049

Measured 7d ago against content hash 1775c5b5420e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

inspect-context 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 7d 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.

skills/inspect-context/SKILL.md · 49 lines

What it actually says

Context Window Inspector

Analyze everything currently loaded in this conversation's context and produce a structured, actionable report.

What to analyze

  1. System prompt & instructions — CLAUDE.md content, project instructions, and any system-level directives
  2. Loaded files — every file in context with line counts and token estimates
  3. Conversation history — turn count and token cost of prior messages
  4. Skills & plugins — active skill instructions currently loaded
  5. MCP server configs — tool definitions from any connected MCP servers
  6. Embedded documents — pasted code blocks, documents, or large text from the user

Output format

Start with a one-line status banner:

📊 Context snapshot — ~XX,XXX tokens used  |  ~YYY,YYY remaining  |  ZZ% full

Then a table sorted by estimated token usage (largest first):

# Source Type Est. Tokens % of Budget Keep?
1 src/api/routes.ts File ~4,200 2.1% ✅ Yes
2 Conversation (turns 1–12) History ~8,500 4.3% ⚠️ Partial
3 CLAUDE.md Instructions ~1,800 0.9% ✅ Yes

Then three sections:

🔥 Top bloat candidates

The 3 largest items that may not be needed for the current task — with a one-line reason each.

✅ Essential context

A short bullet list of items that are clearly needed and should not be touched.

💡 Quick wins

Specific, copy-paste-ready actions to immediately reduce token usage (e.g., /clear, unloading a file, splitting the conversation).

Be precise: use real file names, skill names, and turn numbers. Estimate tokens as 1 token ≈ 4 characters for English prose, slightly fewer for dense code.

$ARGUMENTS

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. 7d ago First seen · 49 lines · 39 tokens per session scan A 1775c5b5420e

Subscribe to this mod's changes

inspect-context is a skill published in the GitHub repository msiShariful/claude-token-inspector (4 stars, last pushed 3mo ago), licensed MIT. It adds 39 tokens to every session and 487 once invoked, about $0.0002 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-31.