cctop AGENTS.md

A set of instructions for contributors to cctop, a Bun and TypeScript terminal dashboard for monitoring running Claude Code sessions. It explains the project, supported systems, commands, and file layout.

In plain words
What is it for?
It is for developing and maintaining cctop, including its terminal display, session information, process statistics, command modes, and configuration files.
Why use it?
It gives coding agents the project context and operating rules needed to change cctop without misunderstanding its read-only monitoring behaviour or limited settings files.

Instructions file for CodexOpenCode

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 instructions/stefanprodan/cctop/agents-md
Clone the repo
git clone --depth 1 https://github.com/stefanprodan/cctop

Made for: Codex, OpenCode.

Per session 5,020 This file is loaded in full into every session.
When invoked 5,020 The same file — it is already loaded in full.
Security scan C 2 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.05020 $0.05020
Opus 5 $0.02510 $0.02510
Sonnet 5 $0.01004 $0.01004
Haiku 4.5 $0.00502 $0.00502

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

Security

Grade C, and why

cctop AGENTS.md scanned grade C with 2 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 3d 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

install.sh release-binary installer served from `main` (curl … | sh):

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

install.sh release-binary installer served from `main` (curl … | sh):
AGENTS.md · 317 lines

How it starts

The opening of the file, as written. The whole thing — 317 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Guidance for AI agents and contributors working on cctop, an interactive top-style TUI for monitoring running Claude Code sessions.

What this is

A single Bun/TypeScript program that lists every running Claude Code session with process stats, busy/idle state, context size, model, host app, project, branch, last prompt, a tree of sub-processes, and live sub-agents. On a TTY it's an interactive TUI; piped or with --once it prints one plain-text frame and exits, while --json prints one JSON snapshot and exits.

  • Runtime: Bun (TypeScript run directly, no build step for dev).
  • Platforms: macOS and Linux only (process table is read via macOS libproc FFI or Linux /proc).
  • Read-only, with deliberate exceptions. In its monitoring mode cctop spawns no processes and never mutates any session, registry, or transcript. Its only writes are its own files under ~/.claude/cctop/: the usage cache (usage.json, only under --capture-usage) and the persisted TUI preferences (settings.json, the refresh interval, sort mode, and notifications toggle, written only when the user changes them; the file also carries the hand-edited columns list, which cctop only ever reads — the save merge preserves it); the only thing it ever does to another process is send a signal, and only on an explicit user action (x → SIGTERM a session; f → SIGTERM a session's orphaned dev-server processes to free their ports). Preserve this property. Separate from all of that is one explicit, opt-in mode: the cctop upgrade subcommand (src/upgrade.ts) reaches the network and replaces cctop's own binary. It never runs from the refresh loop — the monitor path never even imports it — so everything that isn't cctop upgrade stays read-only. It is also the only thing that touches the network at all: the monitor makes no network calls, a property docs/usage-limits.md already relies on ("cctop is read-only: it reads ~/.claude and the process table, and makes no network calls") and the reason usage limits arrive through a status-line hook instead of an API call. The TUI's "restart to run the new version" notice preserves that: it stats its own binary (src/binary.ts) to see the file was swapped underneath it, rather than asking GitHub whether a release exists. Polling from the refresh loop would break it.
  • Zero runtime dependencies. cctop imports only Bun and OS built-ins (bun:ffi, node:fs, …); package.json has no dependencies field (the devDependencies are just Biome/tsc/types). Do not add npm packages — keep it dependency-free.

Read the full file on GitHub · 317 lines

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. 3d ago First seen · 317 lines · 5,020 tokens per session scan C 1960da57d14c

Subscribe to this mod's changes

cctop AGENTS.md is an instructions file published in the GitHub repository stefanprodan/cctop (135 stars, last pushed 12d ago), licensed Apache-2.0. It adds 5,020 tokens to every session, about $0.0251 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.