DEV Community

livecodelife
livecodelife

Posted on

Roo Code Workflow: Build a Free, Always-On LLM-Powered Dev Assistant

TL;DR: I’ve been running a local Roo Code setup 24/7—two weeks straight—using only free tiers (Gemini + OpenRouter) and a custom “Think” mode for planning. Here’s how to replicate it, why it’s cost-efficient, and key tweaks I learned from the community (this setup reached #1 on r/RooCode for 3 days).


Why This Setup Exists

  • Cost Control: Free tiers (Gemini via Google AI Studio, OpenRouter’s free models) let you run thousands of daily LLM calls with zero spend.
  • Specialized Modes: Assign each model to the task it does best—planning, architecture, code, debugging—so you don’t waste expensive tokens.
  • “Think” Mode: A custom reasoning agent that breaks complex tasks into bullet-proof plans, cutting down trial-and-error.

Whether you’re prototyping a SaaS MVP, experimenting with AI-driven features, or just love playing with LLMs, this guide will get you up and running in under 20 minutes.


1. Prerequisites

You’ll need:

  • VS Code + Roo Code extension
  • A free Google AI Studio API key for Gemini
  • A free OpenRouter API key (Buy $10 of credits for 1,000 free calls/day)

Create a Gemini provider profile through the Roo UI in VS Code and paste your API key in the specified field.

Do the same for OpenRouter, or just setup OpenRouter when you install the Roo Code extension. Roo makes this easy!


2. Modes & Model Allocation

Mode Role Model(s) Source
Orchestrator Breaks tasks into subtasks Gemini Google AI
Think Detailed reasoning & edge-case planning Gemini Google AI
Architect High-level design & module outlines DeepSeek R1 0528 OpenRouter
Code Snippet & module generation DeepSeek V3 0324, Qwen3 235B, Mistral Devstal Small OpenRouter
Debug Bug-fix suggestions & refinements Same as Code OpenRouter

Pro tip: If DeepSeek V3 feels sluggish, switch to Qwen3 for straightforward code. Use Devstral Small when you need more context in your prompts.


3. Step-by-Step Setup

A) Create the “Think” Mode

  1. Open Roo Code → Custom Modes → Add “Think”
  2. Role:
   You are a specialized reasoning engine. Analyze tasks, break them into steps, list edge cases, and return a markdown-structured plan. Do NOT write final code.
Enter fullscreen mode Exit fullscreen mode
  1. Instructions:
   - Use markdown headings and lists.
   - Start with a task summary, then steps, then challenges.
   - Output only the reasoning plan.
Enter fullscreen mode Exit fullscreen mode

B) Tweak Your Orchestrator Prompt

In your Orchestrator’s custom instructions, replace step 1:

1. When given a complex task, break it into logical subtasks. If a subtask needs deep analysis, call `new_task` to delegate to “Think” mode first. Use its structured output to guide subsequent steps.
Enter fullscreen mode Exit fullscreen mode

And update step 2’s first sentence:

2. For each subtask (directly or after using “Think”), use `new_task` to assign it to Architect, Code, or Debug.
Enter fullscreen mode Exit fullscreen mode

C) Configure Your Mode Profiles

  1. Gemini profile → Orchestrator + Think
  2. OpenRouter – Code-Debug-Plan → Architect, Code, Debug

4. Running Your First Task

  1. Generate a PRD: Ask any LLM to outline your project scope.
  2. Feed the PRD into Orchestrator—watch it delegate:
  • Off to Think for edge-case plans
  • Off to Architect for module sketches
  • Off to Code for implementation
    1. Review & Iterate: Use Debug mode to fix any errors, then loop back.

5. Tips, Tricks & Community Q&A

Q: How do I reduce inference costs?
A: Use “Think” mode to pre-plan—fewer back-and-forth code iterations = fewer tokens.

Q: Are these models the best?
A: Yes and no. There are more "premium" paid models available, but these models do well on benchmarks and have been shown to have good outputs. They also give you a lot more bang for your (non-existent) buck

Q: Does this replace human input?
A: No—LLMs still need good prompts. Think of this as an assistant that you guide. The more precise your PRD and tasks, the better the output.


6. What’s Next

This is just the start. There are a lot of enhancements you can add like Roo Commander and several Memory Bank strategies to make Roo work even better. Try different things and see what works for you


Enjoyed this? Share your own modes, tips, or questions in the comments, or drop me a note on LinkedIn/Reddit.

Top comments (0)