# ctx-stats

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

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1700 installs · ★ 32324
- Author: mksglu
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mksglu/context-mode/tree/HEAD/skills/ctx-stats/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/ctx-stats

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add mksglu/context-mode --skill ctx-stats -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/ctx-stats/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ctx-stats/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add mksglu/context-mode --skill ctx-stats -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/ctx-stats/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add mksglu/context-mode --skill ctx-stats -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/ctx-stats/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install mksglu/context-mode ctx-stats
```

2. **Manually: put the files in place**
- File: `.github/skills/ctx-stats/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add mksglu/context-mode --skill ctx-stats -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/mksglu/context-mode --path skills/ctx-stats
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ctx-stats/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add mksglu/context-mode --skill ctx-stats -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/mksglu/context-mode/tree/HEAD/skills/ctx-stats/SKILL.md

## When to use it
- 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
- 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

## Similar
- [setup-matt-pocock-skills](https://affpapa.org/en/nevibecode/skills/setup-matt-pocock-skills.md) — skill · 1052851 installs
- [ask-matt](https://affpapa.org/en/nevibecode/skills/ask-matt.md) — skill · 766587 installs
- [to-tickets](https://affpapa.org/en/nevibecode/skills/to-tickets.md) — skill · 711230 installs
- [writing-plans](https://affpapa.org/en/nevibecode/skills/writing-plans.md) — skill · 282859 installs
- [caveman-review](https://affpapa.org/en/nevibecode/skills/caveman-review.md) — skill · 411800 installs
- [caveman-compress](https://affpapa.org/en/nevibecode/skills/caveman-compress.md) — skill · 411500 installs

From the same set: [mksglu/context-mode](https://affpapa.org/en/nevibecode/by/mksglu/context-mode.md) — 10 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
