heatmap
Reviewed
at commit 736b26d
A GitHub-style grid of your Claude Code time in a /heatmap pane, with streaks, peaks and top projects.
0 upvotes
Log in to upvote or save- Made by
- Hamza Zafar
- Pinned commit
-
736b26d93ea07c021b4bd7d076fa88d6094b5c56 - What we checked
-
Adds a /heatmap pane showing a GitHub-style grid of your Claude Code activity, with streaks, peak day and hour, and top projects. At session start and end it scans your session logs in ~/.claude/projects with grep for message times and folder names only, and keeps a daily ledger in ~/.claude/heatmap/days.jsonl. No network calls; it never reads prompt or reply text.
Review details
Static review of the source at the pinned commit; not run. Delta review of the changes since 67873e1; the rest carries over from the review at that commit. The changes bump the version and add error handling: rejections from the background refresh are swallowed, and the pane's loading flag is cleared even when the refresh fails. Carried over: registers session.start (registers the /heatmap command, then refreshes the ledger in the background and may show a toast when a 7, 30 or 100 day streak is reached), session.end (refreshes the ledger), command.run for heatmap (opens the pane), ui.render for the Pane component, and ui.message for key presses from the grid client module (grid.tsx, which only draws and posts p/q keys). Refresh lists <config dir>/projects (CLAUDE_CONFIG_DIR or $HOME/.claude), then runs grep -oE for the timestamp field and grep -m1 -oE for the first cwd field on session logs changed since the last refresh, with fixed arguments, a path after -- and timeouts; the paths come from directory listings. Only message timestamps and the project folder name or last path segment are kept. It writes <config dir>/heatmap/days.jsonl (one row per day and project: day, project folder, display name, active minutes, session count, minutes per hour) and reads <config>/.claude.json only to take the saved theme string for colours. Uses $.store for the last streak toast. No $.http, $.model or fetch, no npm dependencies. The ledger lives outside the project and persists, but holds counts and project names rather than prompts, outputs or secrets. Not reviewed: the system grep binary.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: no
- Blocks or changes tool calls: no
- Reads or writes files: yes
- Runs programs on your machine: yes
- Calls the model (uses tokens): no
- Sends data over the network: no
- Stores data: yes
- Shows something on screen: yes
- Hooked events
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/heatmap/)