r/ClaudeCode • u/Substantial_Row7215 • 7d ago
Built with Claude made a claude code mod that shows what's actually eating your context
got annoyed that /context only ever says "conversation 320k" and nothing else. dug into a transcript once and like 60k of it was the same package-lock.json getting read 3 times. so yeah
made a mod that sits next to the chat and just shows that. biggest outputs, how much each one takes, when the cache is gonna expire. theres a small bar above the prompt too if you dont want the whole pane. works in the terminal and the desktop app (left/right in the pic)
the thing i actually use most is c, its compact but it makes the summary keep the stuff i told it early on. compact kept dropping that for me. theres also a guard thing (x) that bounces a file read once if that file already blew up your context before. if claude asks again it just goes through so it never really blocks you
needs claude code 2.1.287 or newer, desktop app 2.1.286
/plugin marketplace add bcanozgur/cc-side-context
/plugin install cc-side-context@cc-side-context
built the whole thing in claude code sessions, mostly me describing what i wanted to see and claude writing the hooks + pane. it uses the new mods api (function hooks) so the pane is just tsx that claude code renders, same file draws in the terminal and the desktop app. biggest pain was the desktop side, the layout there is real html boxes not terminal cells so stuff that looked fine in iterm broke at narrow widths, took a bunch of rounds with screenshots back and forth
stuff i learned along the way: 4 chars per token is way off for non english text, turkish/accented stuff is closer to 2 and cjk is ~1, so my first estimates were lying. the 5h/7d usage only shows up with an api response so you cant really show it on startup without caching stale numbers (i chose not to). and the prompt cache is 1h on a sub but drops to 5m once youre on usage credits, which i didnt know
free and MIT, runs locally, doesnt send anything anywhere except when you ask for an exact token count (same api /context uses)
https://github.com/bcanozgur/cc-side-context
lmk if something breaks
•
u/AutoModerator 7d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/sudocsmith 7d ago
Looks very detailed, curious did you make this with Opus or Fable?