Skip to content
Back to skills

Inspect Context

ASecurity

Analyze the current context window and report a breakdown of what's consuming tokens — system prompts, files, conversation history, skills, and MCP configs. Use when the user wants to understand their token budget.

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 11, 2026
ai-agentsapi

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned June 11, 2026

npx -y skills add msiShariful/claude-token-inspector --skill inspect-context --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Inspect Context?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Inspect Context
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/msishariful-inspect-context/badge)](https://www.skillsdirectory.com/skills/msishariful-inspect-context)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Analyze the current context window and report a breakdown of what's consuming tokens — system prompts, files, conversation history, skills, and MCP configs. Use when the user wants to understand their token budget.
disable-model-invocation: true
---

# 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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.