Tools · 2026.10.10 · 5 min
Mining a Month of Session Logs to Build Five Claude Code Mods
I had Claude read a month of session logs for requests I kept repeating and turned them into bands, status line items, and commands; the most useful, leftovers, tracks what Claude leaves behind.
Reading
After Claude Code shipped mods, I first had Claude read a month of my session logs to find the requests I kept repeating, and ended up building five mods. The most useful one is leftovers. My cwd is often my home directory rather than a git repo, so git diff can't tell me what Claude actually left behind. The most important design decision: the button doesn't run anything directly. It only hands the suggested command to Claude, which still goes through the usual permission checks.
Mods are function hooks plugins. They can draw a band above the prompt, add a cell to the status line, intercept tool calls, or add a /command. There's a lot you can do, and the hard part is deciding what to build. The official guide, Getting started with Claude Code mods, suggests having Claude read your own session logs first, so that's what I did.
What to look for in the logs
I asked Claude to look for three kinds of things: things I kept asking about or kept asking Claude to do; commands that made me nervous, like ones I stopped halfway or asked it to undo afterward; and how I check Claude's changes. The range was 19 sessions from September 3 to October 3, roughly 240 messages I typed and 2,725 tool calls.
What it found, ranked by how much it would help:
| mod | Evidence | Form |
|---|---|---|
leftovers |
Asked Claude to remove things it had set up earlier 11 times across 8 sessions, plus 5 more times asking what was actually installed or running right now | A one-line count above the prompt, /leftovers for the list |
your-turn |
Came back from a manual step and told Claude to continue 25 times across 6 sessions | One line above the prompt |
notes-due |
/session-notes 9 times across 6 sessions, my most-typed command |
One extra cell in the status line |
secret-mask |
Weaker evidence: one incident where a token got printed, plus 3 times credentials were blocked automatically | Hook only, plus a toast |
The fifth, plan-bar, didn't come from the logs. I saw the progress bar in the desktop app and wanted one in the CLI too.

leftovers: keeping track of what Claude leaves behind
A single session of mine often touches 3 to 5 places, and in the same month I ssh'd into servers 91 times. In that situation there's no single git diff that shows the whole picture.
leftovers works out what was left behind from Bash command patterns, like launchctl bootstrap, systemctl enable, docker compose up -d, crontab, git worktree add, and cp x x.bak. When the matching cleanup command shows up later, that item gets crossed off. Commands written in unusual ways get missed, which is a built-in limit of pattern matching.
The most important decision is in the Clean up button. Pressing it sends Claude a prompt with the suggested cleanup command, and Claude checks that the thing still exists before removing it. Running systemctl disable on a server straight from a button is too risky. In practice, when it's something you can't undo, like deleting a repo, Claude asks me first.

There's also an Uncommitted section that maps the directories Claude touched back to their git repos and lists uncommitted files at the end of each turn. That covers the third category, how I check changes.
The other four
your-turn lists the manual steps Claude handed to me above the prompt. The longest one in the evidence went about 7 hours between Claude listing it and me reporting back, with a context compaction in between. The key design point is controlling when to call the model. Only when a reply at the end of a turn looks like it contains something for me to do does it make one haiku call to extract it, capped at 8 seconds. When only one item is pending, it doesn't ask the model at all: if I reply with something like "done", it's crossed off directly.
notes-due only adds a reminder for whether it's time to write notes. After a merge, a deploy, or creating a new repo, the status line shows a count of N notes not yet written, and running /session-notes resets it to zero.
secret-mask only masks Bash output. Results from Read, Edit, and Write are left alone, because that's the original text used to edit files later. Masking it would make Edit fail to match, or write the masked value back into a config file.
plan-bar registers two tools, plan_set and plan_update, and asks Claude to use them for any work with three or more steps. Claude drives the progress bar itself. A terminal can only draw it with block characters, so it can't do the rounded labels the desktop version has.
Installing, and the pitfalls I hit
plan-bar, leftovers, and secret-mask were later cleaned up into the public homieyangg/claude-code-mods repo. To install:
/plugin marketplace add homieyangg/claude-code-mods
/plugin install leftovers@claude-code-mods
/reload-plugins
One pitfall worth writing down: $ can only be passed to functions declared at the top level of the file. A closure inside register that takes $ makes the whole module fail to load, so the shared function that draws the band has to be declared at the top level, with $ passed in. Also, don't keep a mod with the same name in both a dev directory and the installed folder, or it gets loaded twice on resume. Mods need tests too. After every change I run claude plugin validate and claude plugin test.
The day the first version went live I started reworking how you interact with the bands, and leftovers got a few blind spots patched along the way. That's the next post.

Investing
Bitfinex Lending's Hidden Clock: A Batch Auction Every 20 Minutes
Bitfinex 2-day funding is really a batch auction clearing every 20 minutes; here's how I found it in the data, where my new quoting strategy earns in backtests, and the pitfalls of a three-step rollout.
Letters
Loading comments…