cctop
CLAUDE.md71 starsChanged 8 months agoMITView on GitHub
A live terminal dashboard for monitoring all your Claude Code sessions at a glance. Like htop, but for Claude Code. Power users run multiple Claude Code sessions simultaneously, one refactoring a module, another writing tests, a third researching an API. You end up tab-switching between terminals just to check "is it done yet?" or "is it stuck waiting for me?" There's no central place to see what's happening across sessions. Installs a lightweight hook into Claude Code that tracks session…
- Commits and pushes
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
30 rules. About 0 are common, 14 are distinctive, and 16 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
16
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 56
When writing or modifying Textual-based code (the dashboard, widgets, tests), always use the textual-tui-dev skill first to load best …
- Very specific: line 61
After editing any file under plugin/, changes must be installed before testing.
- Very specific: line 73
Use release.sh for version bumps and tagging.
- Very specific: line 76
Read the git log output and write a human-readable CHANGELOG.md entry.
- Distinctive: line 79
No self-praise or hype ("major upgrade", "significant improvement"), just describe what's new
- Distinctive: line 86
Never use emdashes (—) in any language.
- Distinctive: line 90
When writing Hebrew-facing text (release announcements, social posts, community messages):
- Distinctive: line 92
Casual, grounded, anti-hype: No self-praise. "כמה שדרוגים" not "שדרוג רציני".
- Distinctive: line 100
Before committing, run a basic security audit on staged changes:
- Distinctive: line 101
No hardcoded secrets, API keys, tokens, or passwords
- Distinctive: line 102
No personal information (real names, private emails, internal hostnames, private IPs)
- Distinctive: line 103
No SentinelOne internal references (GHE URLs, internal tooling, team names)
- Very specific: line 108
ALWAYS use a worktree when starting work on a new branch: Use the EnterWorktree tool to create an isolated worktree before making any …
- Distinctive: line 110
When entering a worktree, rename the conversation to include the PR identifier, e.g.
- Very specific: line 111
When the work is done and merged, exit the worktree with ExitWorktree.
- Distinctive: line 116
Keep PR feedback concise and actionable.
- Very specific: line 123
Create a worktree: EnterWorktree name=review-pr-N
- Very specific: line 127
When done: ExitWorktree (remove, since it's read-only review work)
- Very specific: line 132
When merging PRs from a worktree, do NOT use --delete-branch on gh pr merge, it tries to checkout main locally which fails because main is …
- Very specific: line 143
Read plans/pr-groups.md first to understand the grouping and dependencies
- Distinctive: line 144
Follow the workflow steps exactly as written in that file (branch → plan → implement → test → push & PR)
- Very specific: line 145
Use EnterWorktree to create the worktree, do not skip this step
- Distinctive: line 148
After user approves, follow this exact post-merge sequence:
- Very specific: line 152
Update BACKLOG.md (mark items done) and plans/pr-groups.md (check off the PR group), but do NOT commit or push these changes, the user will …
- Very specific: line 157
Do not commit changes to these files on your own: Only update BACKLOG.md or CLAUDE.md when the user explicitly asks for it.
- Distinctive: line 162
When moving or renaming files, update all references in other files (BACKLOG.md links, CLAUDE.md structure, README, etc.) in the same or …
- Very specific: line 166
When making changes that affect user-visible behavior (new features, changed columns, new keybindings, install steps, usage), always check …
- Distinctive: line 170
Simplify aggressively: After implementing a feature, re-read the entire file looking for dead code, vestigial fields, duplicate patterns, …
- Very specific: line 177
High contrast, not subtle: Prefer bold, theme-native visual indicators (accent colors, reverse, built-in component classes) over custom …
- Very specific: line 179
Performance must match native feel: If a UI element feels slower than Textual's native equivalent, dig into the rendering pipeline …
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
cctop, Claude Code Sessions Dashboard
A live terminal dashboard for monitoring all your Claude Code sessions at a glance. Like htop, but for Claude Code.
Why
Power users run multiple Claude Code sessions simultaneously, one refactoring a module, another writing tests, a third researching an API. You end up tab-switching between terminals just to check "is it done yet?" or "is it stuck waiting for me?" There's no central place to see what's happening across sessions.
What It Does
Installs a lightweight hook into Claude Code that tracks session activity in real time. A companion TUI dashboard (cctop) displays all active sessions in a single live-updating table:
- Status, see at a glance whether each session is idle (waiting for you), thinking, editing files, running commands, searching the web, or spawning subagents
- Project & branch, know which codebase and branch each session is working in
- Context usage, monitor how much of the context window has been consumed, so you can wrap up or start fresh before hitting limits
- Tool count, track how many tool calls a session has made
- Model, which Claude model each session is using
- Last messages, peek at the most recent user prompt and Claude response without switching terminals
Sessions that go quiet for 1+ hour are marked stale. Sessions that end clean up after themselves automatically.
Who It's For
Anyone running more than one Claude Code session at a time, or anyone who wants a quick overview of what's happening without context-switching into each terminal.
Project Structure
plugin/, distribution files (only this directory gets installed)plugin/scripts/cctop-hook.sh, hook handler, writes~/.cctop/<session-id>.jsonplugin/scripts/cctop_dashboard.py, Textual TUI app (run withuv run --script)plugin/scripts/cctop-poller.py, background transcript pollerplugin/scripts/launch-cctop.sh, convenience launcherplugin/hooks/hooks.json, registers the hook for 7 eventsplugin/.claude-plugin/plugin.json, plugin manifest
.claude-plugin/marketplace.json, local marketplace manifest (points to./plugin/)tests/test_cctop_dashboard.py, TUI testsinstall.sh, reinstalls plugin into Claude's cacheplans/, gitignored, PRDs and design docs (never commit these, nevergit addthem)BACKLOG.md, numbered feature backlog with completion tracking
Reference Docs
The reference/ directory contains Claude Code internals documentation, split by topic. Read these on-demand, don't load them all upfront, just read the one relevant to your current task:
| File | When to read |
reference/hooks-api.md | Writing or debugging hooks, events, stdin fields, output format |
reference/transcript-format.md | Parsing JSONL transcripts, entry types, field shapes, path encoding |
reference/sessions-index.md | Reading the sessions index, schema, customTitle timing |
reference/plugin-system.md | Plugin install/dev workflow, manifests, cache, gotchas |
reference/session-data-files.md | Tool counts and session-status JSON files |
reference/slash-commands.md | Slash command categories, transcript formats (3 variants), hook invisibility, poller parsing pipeline |
Textual TUI Development
When writing or modifying Textual-based code (the dashboard, widgets, tests), always use the textual-tui-dev skill first to load best practices for architecture, workers, reactive state, testing patterns, etc.
Installing After Changes
The plugin runs from a copy in ~/.claude/plugins/cache/, not from this directory.
After editing any file under plugin/, changes must be installed before testing.
The user runs dev install from their own terminal:
./install.sh --dev --wt <prefix> # from main repo, auto-finds worktree by prefix
./install.sh --dev # from inside a worktree directlyDo NOT run ./install.sh --dev yourself. The user handles installation from their iTerm2 terminal. After making changes to plugin files, tell the user the changes are ready for DI (dev install). "DI" is shorthand for dev install.
Releasing
Use release.sh for version bumps and tagging. The script handles the mechanical parts, you write the changelog.
./release.sh bump <version>— updatesplugin.json, prints git log since last tag- Read the git log output and write a human-readable
CHANGELOG.mdentry. Prepend the new entry to the file. Use format:## vX.Y.Z — YYYY-MM-DD- Group features into thematic subgroups with punchy headers (e.g. "Status Detection, Know What Every Session Is Actually Doing")
- Focus on what changed for the user, not implementation details (no config file paths, hook event names, or keybindings)
- No self-praise or hype ("major upgrade", "significant improvement"), just describe what's new
- Cross-reference
plans/pr-groups.mdandBACKLOG.mdto make sure nothing is missed
git add plugin/.claude-plugin/plugin.json CHANGELOG.md./release.sh tag— commits, tags, pushes
Writing Style
- Never use emdashes (—) in any language. Use commas in prose, regular dashes (-) in lists.
Hebrew Announcements
When writing Hebrew-facing text (release announcements, social posts, community messages):
- Casual, grounded, anti-hype. No self-praise. "כמה שדרוגים" not "שדרוג רציני". Relatable openers ("כמו כולם, גם אני הבנתי ש..."). Say what it's NOT to anchor expectations ("זה לא orchestrator, זה לא prompt manager. זה פשוט...").
- Transliterate tech terms to Hebrew: לייאאוט, מטאדאטה, סשנים, דשבורד, ת'מת, צ'אט, גרנולריות, פרסונליזציה. Keep actual code/UI terms in English (editing, session, permission, TMUX).
- Structure: short intro line, bold feature headers with dash then explanation, bullet lists for sub-features, casual sign-off ("יאללה, בואו לנסות").
- No implementation details. Focus on what changed for the user, not config paths or keybindings.
- Credit contributors by name.
Security
Before committing, run a basic security audit on staged changes:
- No hardcoded secrets, API keys, tokens, or passwords
- No personal information (real names, private emails, internal hostnames, private IPs)
- No SentinelOne internal references (GHE URLs, internal tooling, team names)
- TruffleHog runs as a pre-commit hook, but also manually sanity-check diffs for anything it might miss
Branching
- ALWAYS use a worktree when starting work on a new branch. Use the
EnterWorktreetool to create an isolated worktree before making any changes. Do NOT just create a branch withgit checkout -borgit switch -cin the main working directory. - This keeps the main working directory clean on
mainand avoids conflicts with other sessions. - When entering a worktree, rename the conversation to include the PR identifier, e.g. "PR-M: Group-by view".
- When the work is done and merged, exit the worktree with
ExitWorktree.
PR Reviews & Comments
- NEVER post comments, reviews, or replies to GitHub PRs/issues without showing the exact text first and getting explicit approval. GitHub doesn't allow deleting submitted reviews, so mistakes are permanent.
- Keep PR feedback concise and actionable.
Reviewing External PRs
To review and locally test a PR from another contributor:
- Fetch the PR:
git fetch origin pull/N/head - Create a worktree:
EnterWorktree name=review-pr-N - Checkout the fetched code:
git checkout FETCH_HEAD - Dev install if needed:
./install.sh --dev - Review, run tests, eyeball the UI
- When done:
ExitWorktree(remove, since it's read-only review work)
GitHub CLI Gotchas
- This repo's remote is
github.com, butGH_HOSTmay be set to GHE. Always prefixghcommands withGH_HOST=github.com(e.g.GH_HOST=github.com gh pr create ...). - When merging PRs from a worktree, do NOT use
--delete-branchongh pr merge, it tries to checkout main locally which fails because main is already checked out in the main worktree. Justgh pr merge N --squash, then exit the worktree normally withExitWorktreewhich handles branch cleanup.
PR Groups Workflow (MANDATORY)
This project uses a structured PR-groups workflow defined in plans/pr-groups.md. This workflow is not optional.
Shorthand commands:
- "Implement/work PR X" — Look up PR group X in
plans/pr-groups.md, implement all its items following the full workflow below - "Implement/work Task/T #" — Implement only that single backlog item, but still follow the full PR workflow (worktree → plan → implement → test → push & PR)
Workflow steps:
- Read
plans/pr-groups.mdfirst to understand the grouping and dependencies - Follow the workflow steps exactly as written in that file (branch → plan → implement → test → push & PR)
- Use
EnterWorktreeto create the worktree, do not skip this step - Enter plan mode before implementing, get user approval before writing code
- Make granular commits (one per logical change)
- After user approves, follow this exact post-merge sequence:
- Merge the PR on remote (
gh pr merge) - Exit the worktree (
ExitWorktree) - Pull remote main (
git pull) - Update
BACKLOG.md(mark items done) andplans/pr-groups.md(check off the PR group), but do NOT commit or push these changes, the user will review and commit manually
- Merge the PR on remote (
Project-Level Files (BACKLOG.md, CLAUDE.md)
- NEVER edit
BACKLOG.mdorCLAUDE.mdin a worktree copy. Edit them via the main repo path (e.g./Users/deanl/__me/code/cctop/CLAUDE.md), even while working in a worktree. This avoids merge conflicts when the worktree branch is merged. - Do not commit changes to these files on your own. Only update
BACKLOG.mdorCLAUDE.mdwhen the user explicitly asks for it.
Commits
- Split uncommitted changes into logical, self-contained commits (e.g. separate feature code, tests, docs, backlog updates)
- When moving or renaming files, update all references in other files (BACKLOG.md links, CLAUDE.md structure, README, etc.) in the same or immediately following commit
Docs Hygiene
When making changes that affect user-visible behavior (new features, changed columns, new keybindings, install steps, usage), always check that README.md and CONTRIBUTING.md are updated to match.
Code Quality
- Simplify aggressively. After implementing a feature, re-read the entire file looking for dead code, vestigial fields, duplicate patterns, unused defaults, and guards for impossible conditions. Budget a simplification pass after every feature.
- DRY is a hard rule. Extract shared patterns even for 2 call sites.
- Code should read as stories. Method ordering and naming should make the flow obvious top-to-bottom without jumping around.
- Config-aware changes. Any change that introduces user-configurable state (new columns, sort options, visibility toggles, thresholds) must be persisted in
~/.cctop/config.toml. Update_CONFIG_DEFAULTS, load the value on startup, and save on change.
UI Preferences
- High contrast, not subtle. Prefer bold, theme-native visual indicators (accent colors,
reverse, built-in component classes) over custom muted styles. - Polish details matter. Indicators should be where the user's eye already is. Navigation should wrap around. Modals should be wide enough for one-line instructions. Text should be centered when appropriate.
- Performance must match native feel. If a UI element feels slower than Textual's native equivalent, dig into the rendering pipeline (
_should_highlight,_render_line_in_row,_refresh_region) and replicate the same pattern. Don't settle for "good enough."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

