Skip to content
claudemods

cctop Claude Code mod: a btop-style Claude Code dashboard in a side pane

A btop-style dashboard docked beside the Claude Code transcript: context, cost, rate limits, tools, agents and a coach.

Permissions

  • Reads filesCan read files and list directories on your machine ($.fs.read / list / stat / exists).
  • Writes filesCan create or overwrite files on your machine ($.fs.write).
  • Runs commandsCan run shell programs on your machine ($.process.run / spawn). Check the source for exactly which ones.
  • Intercepts tool callsSees every tool call Claude makes (tool.call / tool.check) and could block or change it.
  • Changes the UIDraws into the Claude Code interface: bands, panes, status text, toasts (ui.render / $.ui.*).
  • Adds commands/toolsRegisters new slash commands or tools that you or Claude can invoke ($.command.register / $.tool.register).
  • Stores dataKeeps data between sessions in the plugin's private store ($.store.*).
tested with
v2.1.291
last tested
requires
Claude Code ≥ 2.1.287
surfaces
pane, status, toast

Install inside Claude Code:

/plugin install cctop --marketplace tomstagl/cctop
All install options ↓

What does this mod do?

cctop is a community mod by Thomas Stagl (tomstagl), the Claude Code plugin half of his cctop project, an htop/btop-style terminal dashboard for a running Claude Code session. The plugin draws that dashboard inside Claude Code itself, in a pane docked beside the transcript. Type /cctop-pane and it opens; type it again and it closes.

The pane has a view bar across its first row (cctop Coach Overview Tools Agents Files Events Advisor). Click a name to switch, or give the pane the keyboard with ctrl+x tab. According to the author's README, the views show:

  • Coach: four lights, one nudge with [1 fill] [2 snooze] [3 why] buttons, and what is next.
  • Overview: a header, six cells, an act line and one open body, the same "Console" layout as the standalone TUI.
  • Tools: calls, errors, p50/p95 latency and tokens pushed into context, per tool.
  • Agents: subagents, MCP servers and background tasks.
  • Files: touched files, edits and re-reads.
  • Events: a stream of tool, hook, permission, compaction, coach and cost events.
  • Advisor: the current recommendation, plus what is queued and what is snoozed.

Context, cost and rate limits come from Claude Code's own $.session.usage(), so the pane already shows something with nothing else installed. The richer views are filled in by the separate cctop binary through cctop query. The plugin also ships two skills: /cctop, and cctop-insights, which lets Claude answer questions such as "what is filling my context?" by running cctop query.

Install

The install block above adds the author's marketplace and installs the plugin from it. For the full dashboard, also install the cctop binary with brew install tomstagl/tap/cctop (or cargo install cctop), then restart Claude Code or run /reload-plugins.

$ install cctop

Requires Claude Code ≥ 2.1.287

Installs from the author's own marketplace: tomstagl/cctop

  1. 1.One line, inside Claude Code

    /plugin install cctop --marketplace tomstagl/cctop

    Paste into a running session (v2.1.275+). Claude Code asks to add the marketplace first.

  2. 2.From your shell

    claude plugin marketplace add tomstagl/cctop
    claude plugin install cctop@cctop

    Then run /reload-plugins in any session that is already open.

  3. 3.Try it without installing

    git clone https://github.com/tomstagl/cctop
    claude --plugin-dir ./cctop/plugin

    Loads the mod for one session only. Nothing is added to your settings.

How it works

The plugin is a single function-hooks module, plugin/hooks/pane.tsx, with a model reducer and one file per view. Every tool call is timed around next(e), and the result passes through untouched. This is from pane.tsx:

on('tool.call', async ($, e, next) => {
  const startedAt = await clockNow($);
  apply($, { type: 'tool.start', name: e.tool, at: startedAt });
  let result: ToolCallResult | undefined;
  try {
    result = await next(e);
    return result;
  } finally {
    apply($, {
      type: 'tool.end',
      name: e.tool,
      startedAt,
      at: await clockNow($),
      isError: result === undefined || result.isError === true,
      resultChars: result?.text?.length ?? 0,
    });
  }
}).catch(($, e, next) => {
  $.ui.log(`cctop: tool.call failed: ${next.error.message ?? next.error.kind}`);
  return next(e);
});

session.start registers /cctop-pane, runs a self-check (the clock returns a number, HOME is set, the session has an id), and runs cctop --version to find out whether the binary is installed. While the pane is open and the binary is present, a poller in poller.ts runs cctop query <verb> --session <id> --surface pane one verb at a time. It polls every 2 seconds while a turn runs and every 10 seconds when idle, and marks the data stale after 30 seconds without a successful round. Redraws are throttled to four a second. The pane remembers its open state and current view in $.store, so it comes back after a reload. It also re-reads the session id on every turn, so it keeps working after /clear.

Customize it

There are no /config options. You choose the starting view with the command argument, /cctop-pane coach, /cctop-pane tools and so on, and /cctop-pane close closes the pane. The standalone repository ships colour themes (default dark and light, Catppuccin Mocha, Gruvbox, Nord, btop) for the binary's TUI. The pane itself uses Claude Code's own theme colours, so it follows light and dark mode.

Permissions & safety

We read every file the plugin can execute before running it: the hooks module, its views and the two skills. Here is what we found:

  • Runs commands ($.process.run): only the cctop binary. It runs cctop --version, cctop query --help, cctop query <verb> --session <id> --surface pane, and cctop query coach --snooze <rule> when you press snooze. Each call is an argv array with no shell and a 3 to 5 second timeout. The plugin does not bundle the binary; you install it separately.
  • Writes files ($.fs.write): one marker file per session, ~/.cctop/pane/<session-id>.json, holding the plugin version, the session id, whether the pane is open, and where it was drawn. Other cctop commands read it. $.fs.read reads only the plugin's own plugin.json, and $.env.get reads only HOME.
  • Intercepts tool calls: the tool.call hook only measures timing and result length. It never changes or blocks a call, and its .catch passes the call on if the hook fails.
  • Fills the prompt: the coach's [1 fill] button writes a suggested prompt into the input box with $.prompt.fill. It never submits it.
  • No network in the plugin code, and no telemetry.

The /cctop skill tells Claude to ask you once whether to run cctop install --yes. The README says that command shows a diff of ~/.claude/settings.json and backs the file up before adding a status-line shim and hooks. That is the binary's behaviour, which we did not audit line by line; you can decline it. To turn the plugin off, run /plugin disable cctop.

Reads files
Can read files and list directories on your machine ($.fs.read / list / stat / exists).
Writes files
Can create or overwrite files on your machine ($.fs.write).
Runs commands
Can run shell programs on your machine ($.process.run / spawn). Check the source for exactly which ones.
Intercepts tool calls
Sees every tool call Claude makes (tool.call / tool.check) and could block or change it.
Changes the UI
Draws into the Claude Code interface: bands, panes, status text, toasts (ui.render / $.ui.*).
Adds commands/tools
Registers new slash commands or tools that you or Claude can invoke ($.command.register / $.tool.register).
Stores data
Keeps data between sessions in the plugin's private store ($.store.*).

Compatibility & troubleshooting

The plugin loaded on Claude Code 2.1.291 on macOS, and claude plugin validate passed without warnings. The pane needs function hooks (Claude Code 2.1.269 or later). If the pane does not show up:

  • Read the reply to /cctop-pane. It says whether the pane docked, was drawn above the prompt (terminal under 110 columns, or the classic renderer), or is hidden behind the /diff panel.
  • "needs the cctop binary" means cctop is not on your PATH. The engine-only figures still work.
  • With the binary installed, cctop pane status (run inside the session) lists each prerequisite with a fix.
  • After installing from the shell into an open session, run /reload-plugins.

To check that it works after installing, open the pane with /cctop-pane, then send a short prompt that reads a file. The turn counter and the engine's context and rate-limit line update in the pane while the turn runs.

FAQ

Do I need the cctop binary to use this Claude Code dashboard?
No, but it does much more with it. Without the binary the pane shows the model, turn, elapsed time, context and rate limits that Claude Code reports itself, plus a "needs the cctop binary" line. The coach, the Overview cells, tool timings, files, agents and the Advisor are filled in from cctop query once the binary is on your PATH (brew install tomstagl/tap/cctop or cargo install cctop).
What is the difference between /cctop and /cctop-pane?
/cctop-pane is the native command the plugin registers. With no argument it toggles the pane, /cctop-pane tools (or coach, overview, agents, files, events, advisor) opens it on that view, and /cctop-pane close closes it. /cctop is the plugin's skill; on builds with function hooks the plugin intercepts it and simply opens the pane too.
Why is the pane drawn above the prompt instead of beside the transcript?
It docks beside the transcript only in the fullscreen renderer and with at least 110 terminal columns. Otherwise it is drawn inline above the prompt with a short summary, and the reply to /cctop-pane tells you which case you are in. If the /diff panel holds the side dock, the reply says so too.
Does cctop change my Claude Code settings?
The plugin's hooks module does not. The /cctop skill asks once whether to run cctop install, which the README says shows a diff of ~/.claude/settings.json and backs it up before adding a status-line shim and hooks. Answer no and the dashboard works from the transcript alone.
Which Claude Code versions does it support?
The pane needs function hooks, available since Claude Code 2.1.269. Plugin 0.10.0 was built against the 2.1.284 hooks contract, and we loaded it on 2.1.291. At session start it writes a one-line self-check to the debug log.
Context Meter running in Claude CodeFeatured

Context Meter

Context-window fill, 5-hour and 7-day plan usage and session cost in the status line, plus a warning near the limit.

  • status
  • toast
  • Changes the UI

tested with v2.1.310

Tool Call Counter running in Claude CodeFeatured

Tool Call Counter

Counts Claude's tool calls per turn and session, shows the count by the spinner, and adds /tally for a breakdown.

  • spinner
  • transcript
  • status
  • Intercepts tool calls
  • Changes the UI
  • Adds commands/tools

tested with v2.1.310

More in Panes & dashboards, Context, quota, cost.