token-check

token-check is a skill for Claude Code, Codex from huzaifa525/claude-code-optimizer. It costs 22 tokens per session (236 once invoked), scanned A, original, MIT.

A review of how efficiently the current Claude Code session uses its available context and tokens, which are the units used to process text and tool information.

In plain words
What is it for?
Checking loaded instructions, connected tool definitions, conversation length, file-reading repetition, and whether to continue, compact, or clear the session.
Why use it?
It can reveal repeated file reads, unnecessary tool definitions, or a conversation that should be shortened or restarted.

Skill for Claude CodeCodex

Part of the claude-code-optimizer plugin — 25 skills, 4 hooks shipped together

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/huzaifa525/claude-code-optimizer/token-check
Any agent
npx skills add huzaifa525/claude-code-optimizer --skill token-check
Clone the repo
git clone --depth 1 https://github.com/huzaifa525/claude-code-optimizer

Made for: Claude Code, Codex.

Or install claude-code-optimizer, the plugin that ships this one along with the rest of its 25 skills, 4 hooks.

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 token-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/huzaifa525/claude-code-optimizer/token-check.svg)](https://agentmods.dev/skills/huzaifa525/claude-code-optimizer/token-check)
Your own site
<a href="https://agentmods.dev/skills/huzaifa525/claude-code-optimizer/token-check"><img src="https://agentmods.dev/badge/skills/huzaifa525/claude-code-optimizer/token-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 236 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 $0.00022 $0.00236
Opus 5 $0.00011 $0.00118
Sonnet 5 $0.00004 $0.00047
Haiku 4.5 $0.00002 $0.00024

Measured 4d ago against content hash 3adbe7c73cbe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

token-check 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 4d 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.

templates/.claude/skills/token-check/SKILL.md · 37 lines

What it actually says

Analyze the current Claude Code session for token efficiency:

Check These

  1. Context loaded: What CLAUDE.md, rules, and skills are currently loaded?
  2. MCP servers: How many tool definitions are in context?
  3. Conversation length: How many turns deep are we?
  4. File reads: Have we read the same file multiple times?

Suggest

  • Whether to /compact the conversation
  • Whether to /clear and start fresh
  • Which MCP servers to disable if unused
  • Whether CLAUDE.md is too large
  • Whether rules files should use path-scoping

Output

Session Health Report
─────────────────────
Context usage: [estimate]
Conversation turns: [count]
Suggested action: [compact / clear / continue]
Optimization tips: [specific suggestions]
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. 4d ago First seen · 37 lines · 22 tokens per session scan A 3adbe7c73cbe

Subscribe to this mod's changes

token-check is a skill published in the GitHub repository huzaifa525/claude-code-optimizer (9 stars, last pushed 5mo ago), licensed MIT. It adds 22 tokens to every session and 236 once invoked, about $0.0001 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.