Borrowing it
Nothing to install: this file belongs to tobyilee/ccmonitor. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/tobyilee/ccmonitor/main/CLAUDE.mdgit clone --depth 1 https://github.com/tobyilee/ccmonitorWrote 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.
[](https://agentmods.dev/instructions/tobyilee/ccmonitor/claude-md)<a href="https://agentmods.dev/instructions/tobyilee/ccmonitor/claude-md"><img src="https://agentmods.dev/badge/instructions/tobyilee/ccmonitor/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/tobyilee/ccmonitor/claude-md"><img src="https://agentmods.dev/badge/instructions/tobyilee/ccmonitor/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02118 | $0.02118 |
| Opus 5.5 | $0.00847 | $0.00847 |
| Sonnet 5.5 | $0.00424 | $0.00424 |
| Haiku 4.5 | $0.00212 | $0.00212 |
Grade A, and why
ccmonitor CLAUDE.md 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 27d 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.
How it starts
The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
ccmonitor — A standalone Bun TUI app that monitors Claude Code session activity in real time. It watches ~/.claude/ data files (JSONL transcripts, subagent metadata, team configs, task files) and renders a terminal dashboard showing tool usage, skills, subagents, teams, tasks, token consumption, and file activity.
Build & Run Commands
bun run start # Run the monitor (bun run src/index.ts)
bun run dev # Run with --watch for auto-reload
bun run build # Compile to standalone binary: dist/ccmonitor
bun run install:global # Build + copy binary to ~/.bun/bin/ccmonitor
Run with a specific session: bun run src/index.ts <sessionId>
Testing
bun test # synthetic + fixture tests (src/*.test.ts, fixtures/*.jsonl)
bun run typecheck # tsc --noEmit, strict + noUncheckedIndexedAccess
bun run src/index.ts --fixture fixtures/recap-basic.jsonl # render a fixture, no registry
Fixtures are scrubbed cuts of real transcripts (scripts/make-fixture.ts, re-cut with scripts/cut-fixtures.sh). Each has a measured .expect.json sidecar. Before a release also run bun run build and the width sweep in src/ui.test.ts (80/100/140 columns). Golden renders live in fixtures/golden/; after a deliberate visual change run bun run scripts/update-golden.ts and read the diff.
Upgrade
When the user says upgrade:
- Bump the minor version in
package.json - Verify with
bun run build(rebuilddist/ccmonitor) - Add an entry to
CHANGELOG.md(Keep a Changelog format) - Update
README.md(version line + any user-facing changes) - Save, commit, push
Architecture
No external UI framework — raw ANSI escape codes to stdout. Parsing is split into a pure layer and disk loaders:
- index.ts — Entry point. CLI args (
[sessionId],--fixture), keyboard (q/r/n/s/c/b/i/d/1-9/0/Enter/Esc/j/k; ↑/↓ on the dashboard change the refresh interval), view state (dashboard | recap | background | info | sessions), collapsed-section prefs (src/uiPrefs.ts→~/.claude/ccmonitor-ui.json), refresh loop (2 s default, 2–60 s,src/refresh.ts). Holds oneTranscriptReaderper transcript file. - parser.ts — Orchestration.
parseTranscriptLines(lines, ctx)(pure),enrichSessionState(state)(runs the loaders on a copy),TranscriptReader(incremental tail reads; full reparse when the file shrinks or its first 64 bytes change),locate*Sessionhelpers,computeDerived. - entry.ts — The pure per-entry state machine (
processEntry+handleSystem/handleAttachment/handleAssistant/handleUser…). Groups assistant lines bymessage.id, opens/closes turns, tracks background tasks, recap text, hooks, permissions, cost, links, queue, attribution, errors. Reports unknowntype/system.subtype/attachment.typevalues throughctx.onUnknown. - state.ts —
createSessionState,ParseMemo(parser working memory),ParseSession. - recap.ts — Pure text helpers:
extractKoreanRecap,mdToPlain,parseTaskNotification,cleanNativeRecap. - loaders/ — One file per disk source (subagents, teams, tasks, skillHook, git, gitStatus, fileHistory, sessions, memory, effort, rateLimit, process, scratchpad, globalConfig, modelCatalog, plans, feedback, history, update).
- views/sessions.ts — pure row builder for the session picker.
paths.tsholdsCLAUDE_DIR(override withCCMONITOR_CLAUDE_DIR). - types.ts — All TypeScript interfaces.
SessionStateis the central data structure;TranscriptEntrymodels the JSONL schema. - ui.ts — Pure rendering. The dashboard is header +
SECTIONS(each aSection {id, key, title, render}) + footer;renderDashboardLines/renderRecapViewLines/renderBackgroundViewLines/renderInfoViewLines/renderSessionsViewLinesreturnstring[];render()writes to stdout. Adding a panel = appending toSECTIONS. Handles CJK fullwidth and emoji widths. No state mutation. - keys.ts —
splitKeys: splits a stdin chunk into single keys (escape sequences whole).CCMONITOR_KEYLOG=<file>logs raw chunks. - unknownFields.ts — Appends unknown kinds to
~/.claude/ccmonitor-unknown-fields.log.
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.
- 27d ago Changed · +22 lines · +960 tokens per session 2e3c043b1ecb
- 2mo ago First seen · 71 lines · 1,158 tokens per session scan A 5c7da552d948
ccmonitor CLAUDE.md is an instructions file published in the GitHub repository tobyilee/ccmonitor (54 stars, last pushed 27d ago), licensed MIT. It adds 2,118 tokens to every session, about $0.0085 per session on Opus 5.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-30.
ccmonitor CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ccmonitor CLAUDE.mdtobyilee/ccmonitor | Instructions file | 54 | 27d ago | MIT | A | 2,118 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |