agentleFS
msiSharifulmsiShariful/claude-token-inspector/skills/inspect-context/SKILL.md

inspect-context

Skill4 starsChanged 20 days agoMITView on GitHub

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.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Start with a one-line status banner:

    line 22

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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):

#SourceTypeEst. Tokens% of BudgetKeep?
1src/api/routes.tsFile~4,2002.1%✅ Yes
2Conversation (turns 1–12)History~8,5004.3%⚠️ Partial
3CLAUDE.mdInstructions~1,8000.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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.