How much of your Claude is just re-reading?
Run /stats in Claude Code and type two numbers from it. Nothing leaves your browser.
Accepts 44.5b, 812m, 350k or plain numbers. The example is the author's real usage since March 2026.
One session, two timelines
Every message re-sends the whole conversation. Watch the same long session with and without Rubi. Drag the sliders to match how you work.
Without Rubi 0
With Rubi 0
fewer tokens billed in this session
Cost is in input-token equivalents (cache read 0.1×, cache write 1.25×, output 5×) using Anthropic's price ratios, so it holds for any model or plan. Across 30 days of real usage (284 sessions, short ones included), the measured saving was about one third.
How it works
Four hooks and a markdown vault. No server, no database, no dependencies beyond Node.
Compact early
Claude Code compacts on its own at 150k instead of near 1M. You never type /clear.
Meter
At 80% of the window, a hook tells Claude to save a handoff: goal, decisions, key files, next step.
Record
Right before compaction, Rubi writes what's about to vanish: your requests, files changed, commands run.
Restore
Right after, the handoff is injected back. Claude carries on from ~60k tokens instead of 500k+.
Install
Pick where you use Claude.
- Add and install the plugin inside Claude Code:
> /plugin marketplace add YURIBEDRAN/rubi > /plugin install rubi@rubi
- Turn on early compaction and pick your vault folder:
$ git clone https://github.com/YURIBEDRAN/rubi && cd rubi $ node scripts/instalar.mjs
- That's it. Work normally. Try
/rubi:raio-xto see where your tokens go.
- Download rubi.mcpb from Releases.
- Open it with Claude Desktop and choose a vault folder (an Obsidian vault works).
- In the app, Rubi provides the memory: knowledge graph, search and handoffs. The code map and automatic hooks need Claude Code.
- Clone Rubi, then run the connector from inside your project:
$ git clone https://github.com/YURIBEDRAN/rubi $ node rubi/scripts/conectar.mjs codex
- Swap
codexfor gemini, cursor, vscode, windsurf, cline, opencode, continue, goose or zed. - It registers the MCP server, writes the instructions file and, in Codex and Gemini CLI, turns on the automatic map and recall hooks.
- Works with local models (Ollama, LM Studio) in Codex, Cline, OpenCode, Continue, Goose and Zed. Use models with tool calling, 8B+.
- Coming soon. Support for the website and the mobile app is in development.
- Follow the repository to know when it ships.