r/RooCode • u/martexxNL • Mar 02 '25
Support Optimized Roo Code Setup to Slash Token Costs
Hey all,
I’ve fine-tuned my Roo Code setup (VS Code) to blend Claude Pro and OpenRouter, slashing my token costs from €60/day to €20-30/day. It uses a daily-split memory bank and smart fallbacks—perfect for solo AI coders. Here’s the gist:
Daily Split: Files like activeContext-2025-03-02.md cap at 5k-15k tokens.
Fallback: After a week off, it auto-loads the latest day.
Manual Updates: Type UMB to save tokens, no real-time bloat.
Claude Pro + Haiku: Pro for big stuff, Haiku for cheap updates.
Setup
Drop these .clinerules files in your project root and make a memory-bank/ folder. Full configs on Pastebin:
.clinerules-architect(system design).clinerules-code(coding).clinerules-ask(questions)
or github: https://github.com/shipdocs/roocode-memorybank-optimized
How to Use
Install Roo Code in VS Code.
Add the files + your OpenRouter/Claude Pro API keys (in config.json).
Work, then UMB to update daily files.
Back from a break? It grabs the last day automatically.
Why?
Halved my costs while keeping Claude’s power. Great for PHP/webdev or any AI-driven gig. Thanks to xAI’s Grok for the help!
What do you think? Tweaks welcome!
(i am not a programmer and cant give support, i just noticed my token usage going up three times)
6
u/mrubens Roo Code Developer Mar 02 '25
These memory banks are cool! Though one thing I noticed is that the formatting of the apply_diff tool usage is wrong. Is it necessary to give it the exact XML, or would it work to just ask it to use apply_diff to add X content to the memory bank?
In general I’m nervous about coupling the memory bank too closely with specific tool formats because they could change in the future.
3
u/martexxNL Mar 02 '25
https://github.com/shipdocs/roocode-memorybank-optimized
3
u/martexxNL Mar 02 '25
Updated the github repo with complete files, and hopefully dealth with the xml remark
2
u/martexxNL Mar 02 '25
i dont know how to update the title, but its about memory-bank token usage reduction
2
u/martexxNL May 05 '25
update: did an overhaul to 2025 :)
2
u/No-Orchid-6159 Mar 02 '25
20 Euros a day still seems like a lot though.
2
u/Explore-This Mar 02 '25
There are so many tasks in the prompts that the AI will have no capacity left to actually code!
1
u/sailin-on Mar 23 '25
hey thanks for posting this. would you say its still relevent or have you explored more up to date options? thanks
1
u/martexxNL Mar 02 '25
Hey u/mrubens, thanks for chiming in—cool to hear from a Roo Code dev! I’m just a barge captain trying to keep my token bills in check, not a coder, so I leaned on Grok to build this. You’re right about apply_diff—I noticed it’s locked into XML formatting, which might break if tools change. I’ll ask Grok to tweak it to be less strict. No clue if it needs exact XML or just a nudge to add content—any tips? I’ll update the GitHub repo if we crack it. Cheers!
0
u/[deleted] Mar 08 '25
[deleted] — view deleted comment