Skip to main content
skill CX Codex

ctx-stats — Claude Code skill: session context savings stats

Reports how much context window context-mode saved in the current session: token use, savings ratio and a per-tool breakdown.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mksglu/context-mode --skill ctx-stats -a claude-code
Open on GitHub

What ctx-stats does

The skill calls the mcp__context-mode__ctx_stats MCP tool with no arguments and returns tables covering token consumption, the savings ratio and a breakdown per tool. It is read-only. There is no way to reset or wipe anything from it. Clearing the knowledge base is a separate job, handled by ctx_purge(confirm: true) through /context-mode:ctx-purge.

The instructions tell the agent to paste the tool output into the reply in full, tables and all, without summarising or collapsing it, then add a single line naming the headline savings figure. If context-mode has not been called yet in that session, you get a note saying so instead of tables.

Without the context-mode MCP server installed and connected, the skill has nothing to call — ctx_stats is one of its tools. The skill installs separately from the server, so check the server is already configured for your agent first.

What it helps with

  • see token spend for the current session
  • check what share of data stayed in the sandbox
  • spot the tool eating the most context
  • confirm context-mode is actually running
  • decide whether to clear the knowledge base with ctx_purge

Example prompts for the agent

  • Show me the context savings stats for this session
  • How many tokens did context-mode save, broken down by tool?
  • Print the full ctx_stats tables, don't summarise them

How to install ctx-stats

1Skills CLI (Vercel)

npx skills add mksglu/context-mode --skill ctx-stats -a claude-code

2Manually: put the files in place

~/.claude/skills/ctx-stats/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ctx-stats/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ctx-stats

How do I install ctx-stats in Claude Code?

Run npx skills add mksglu/context-mode --skill ctx-stats -a claude-code. The skill file lands at ~/.claude/skills/ctx-stats/SKILL.md.

What does ctx-stats do?

It calls the mcp__context-mode__ctx_stats MCP tool and shows token consumption, the context savings ratio and a per-tool breakdown for the current session.

Can ctx-stats clear the knowledge base?

No, it only reads stats. Wiping indexed content is done with ctx_purge(confirm: true) or the /context-mode:ctx-purge command.

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set10

context-mode This skill routes large files and command output through context-mode tools instead of Bash. Use it to inspect logs, test results, data files, or page snapshots. CX Codex +1 2,900installs context-mode-ops This skill coordinates GitHub work and releases through 10-20 dynamic subagents. Use it for issue triage, PR reviews, adapter checks, and branch sync. CX Codex +1 1,700installs ctx-upgrade A skill that pulls the latest context-mode from GitHub, rebuilds the plugin, reinstalls it globally, and reconfigures hooks. Run once, get a checklist of results. CX Codex +1 1,600installs ctx-doctor Runs context-mode health checks directly inside your agent session. It inspects runtimes, hooks, FTS5, and package versions to troubleshoot setup issues. CX Codex +1 1,600installs ctx-insight This skill opens the Insight dashboard in your default browser. Use it to review engineer-level productivity, retry waste, blockers, and role-based views. CX Codex +1 1,500installs ctx-purge A skill to permanently delete project context data in bulk or by session. Wipes the knowledge base, session records, and stats — this action cannot be undone. CX Codex +1 1,500installs ctx-search Searches a persistent project knowledge base without reloading source files into context. Queries indexed code, documentation, and session memory via FTS5. CX Codex +1 1,100installs ctx-index Indexes local files and directories into context-mode's FTS5 database. It allows future searches to pull exact snippets without reloading raw project files into context. CX Codex +1 1,100installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor