Roorlm — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Roorlm (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Recursive Language Model Intelligence for RooCode
A Model Context Protocol (MCP) server that uses Recursive Language Models (RLM) to transform your codebase into an intelligent, hierarchical knowledge map. Built specifically for RooCode integration, it eliminates context window limitations and prevents context rot by analyzing code in layers—from individual files to modules to system architecture—creating a persistent intelligence map that can be queried instantly.
Now with Standalone Mode: Analyze codebases directly from the filesystem without requiring Repomix!
RLM is an architectural pattern that breaks down large codebases into hierarchical layers of understanding:
This recursive approach solves the context window problem by:
When working with large codebases in RooCode (or any AI coding assistant), you face critical challenges:
Codebase RLM Navigator solves this using Recursive Language Models to create a persistent, hierarchical "intelligence map" that RooCode can query instantly—no context rot, no re-analysis, no token waste.
Scenario: You just cloned a 50-file Python project and need to understand it quickly.
# In RooCode, simply ask:
"Use the codebase-rlm MCP tool to analyze this codebase and explain the architecture"Important: Always specify "use the codebase-rlm MCP tool" to ensure RooCode uses the correct MCP server.
What happens:
mcp--codebase-rlm--analyze_codebase() → Scans the filesystem directly and analyzes all files in parallel using RLM.mcp--codebase-rlm--get_architecture() → Gets high-level system overview.mcp--codebase-rlm--list_modules() → Shows you all modules with summaries.Result: In 30 seconds, you understand the entire project structure without reading a single file. The RLM hierarchy prevents context rot—this analysis is cached forever.
Scenario: You need to add user authentication but don't know where the auth logic lives.
# In RooCode:
"Use the codebase-rlm MCP tool to show me all modules in this project"
# Then:
"Use the codebase-rlm tool to read the details of the 'auth' module"
# Then:
"Use the codebase-rlm tool to get the full content of auth/login.py"Important: Specify the MCP tool name to avoid confusion with other tools.
What happens:
mcp--codebase-rlm--list_modules() → Shows all folders with brief descriptionsmcp--codebase-rlm--read_module_details("auth") → Shows all files in auth folder with summariesmcp--codebase-rlm--get_file_content("auth/login.py") → Retrieves exact file contentResult: You navigate directly to the right file without guessing. The RLM structure maintains context across queries.
Scenario: You're reviewing a PR that touches 10 files across 3 modules.
# In RooCode:
"Use the codebase-rlm MCP tool to analyze the 'api', 'database', and 'utils' modules and explain how they interact"What happens:
Result: You review with full context of how changes affect the system. No context rot between review sessions.
Scenario: You need to refactor a monolithic app into microservices.
# In RooCode:
"Use the codebase-rlm MCP tool to show me the system architecture and identify tightly coupled modules"What happens:
mcp--codebase-rlm--get_architecture() → Reveals architecture patterns from RLM analysisResult: Data-driven refactoring decisions instead of guesswork. The recursive analysis reveals hidden coupling.
python --version # Must be 3.12 or highernvidia-smi # Install from https://ollama.ai/
# After installation, verify it's working:
ollama list
# Download the ministral-3 model (requires 6GB VRAM minimum):
ollama pull ministral-3:latest npm install -g repomixNote: Without a compatible NVIDIA GPU, Ollama will run on CPU (10-50x slower). AMD/Intel GPUs are not currently supported by Ollama.
pip install fastmcp requests#### Git Ignore Setup
The project includes a .gitignore file that excludes the following:
.repomix_rlm_cache/ - RLM analysis cache directoryrlm-main/ - RLM main directory (external/submodule)RLM-Research.pdf - Research documentationguidelines.md - Project guidelinesThese files are automatically excluded from git commits.
Add this to your RooCode MCP settings file:
Windows: %APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
macOS/Linux: ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
{
"mcpServers": {
"codebase-rlm": {
"command": "python",
"args": ["C:/Users/YourUsername/path/to/smart_context.py"],
"disabled": false,
"description": "Recursive Language Model codebase analyzer"
}
}
}Important Notes:
smart_context.pycodebase-rlm (this is what you reference in prompts)Close and reopen VS Code to load the MCP server.
# 1. Navigate to your project directory in VS Code
# 2. In RooCode, ALWAYS specify the MCP tool:
"Use the codebase-rlm MCP tool to analyze this codebase and show me the architecture"If you prefer to use a pre-generated Repomix XML file:
# 1. Generate Repomix snapshot manually
repomix .
# 2. In RooCode:
"Use the codebase-rlm MCP tool to analyze this codebase using the repomix XML"To avoid confusion with other MCP tools, always specify the tool name:
✅ Correct Prompts:
"Use the codebase-rlm MCP tool to analyze this codebase"
"Call the analyze_codebase tool from codebase-rlm"
"Use codebase-rlm to show me all modules"❌ Incorrect Prompts (will confuse RooCode):
"Analyze this codebase" # Too vague, might use wrong tool
"Show me the architecture" # Doesn't specify which MCP serverRooCode calls these tools when you specify the codebase-rlm MCP server:
| Tool | Purpose | Example Query |
|---|---|---|
mcp--codebase-rlm--analyze_codebase(path, use_repomix_xml, repomix_xml_path) | Scan files and build RLM intelligence map | "Use codebase-rlm to analyze this codebase" |
mcp--codebase-rlm--get_architecture() | Get system-level overview | "Use codebase-rlm to show the architecture pattern" |
mcp--codebase-rlm--list_modules() | List all modules with summaries | "Use codebase-rlm to show me all modules" |
mcp--codebase-rlm--read_module_details(module_path) | Get detailed module info | "Use codebase-rlm to explain the 'api' module" |
mcp--codebase-rlm--get_file_content(file_path) | Retrieve file content | "Use codebase-rlm to show me api/routes.py" |
Edit the Config class in smart_context.py:
class Config:
OLLAMA_BASE_URL = "http://localhost:11434" # Ollama API endpoint
LLM_MODEL = "ministral-3:latest" # Model for analysis
CACHE_DIR = "./.repomix_rlm_cache" # Cache location| Model | Speed | Quality | VRAM Required | Use Case |
|---|---|---|---|---|
ministral-3:latest | ⚡⚡⚡ | ⭐⭐⭐ | 6GB | Default - Fast & good quality |
llama3.2:latest | ⚡⚡ | ⭐⭐⭐⭐ | 8GB | Larger projects, better summaries |
qwen2.5-coder:latest | ⚡⚡ | ⭐⭐⭐⭐⭐ | 8GB | Code-specialized, highest quality |
Note: VRAM = Video RAM on your graphics card. Check yours with nvidia-smi.
| Traditional | Repomix RLM |
|---|---|
| ❌ Read files one by one | ✅ Instant hierarchical overview |
| ❌ Forget context between sessions | ✅ Persistent cached analysis |
| ❌ Miss architectural patterns | ✅ AI-generated architecture insights |
| Grep/Ripgrep | Repomix RLM |
|---|---|
| ❌ Keyword matching only | ✅ Semantic understanding |
| ❌ No context about file purpose | ✅ Function signatures + responsibilities |
| ❌ Can't explain relationships | ✅ Module collaboration analysis |
| Full Context Dump | Codebase RLM |
|---|---|
| ❌ Exceeds context window | ✅ Recursive hierarchy breaks context limits |
| ❌ Expensive token usage | ✅ One-time analysis, infinite queries |
| ❌ Slow processing | ✅ Cached, instant retrieval |
| ❌ Context rot between sessions | ✅ Persistent RLM intelligence map |
Solution:
# Check if Ollama is running
ollama list
# Start Ollama service
ollama serveSolution:
# Either run without XML mode (recommended):
"Use codebase-rlm to analyze this codebase"
# Or generate the XML file manually:
repomix .Causes & Fixes:
nvidia-smiministral-3:latest is the fastest optionSolution:
# Delete cache and re-analyze
rm -rf .repomix_rlm_cache
# Then in RooCode:
"Use codebase-rlm to analyze this codebase"Solution: Always specify the tool name in your prompt:
"Use the codebase-rlm MCP tool to [your request]"Edit the prompts in RLMIndexer to customize analysis style:
# File-level analysis (line 139)
prompt = f"""You are a Senior Code Reviewer. Summarize this code file.
...
"""
# Module-level analysis (line 182)
prompt = f"""You are a Software Architect. Summarize this MODULE.
...
"""
# System-level analysis (line 256)
prompt = f"""You are the CTO. Provide a System Architecture Overview...
...
"""The cache is project-specific (based on XML path hash):
# Project A
cd /project-a
repomix .
# RooCode analyzes → cached in .repomix_rlm_cache/abc12345/
# Project B
cd /project-b
repomix .
# RooCode analyzes → cached in .repomix_rlm_cache/def67890/1. Ask RooCode: "Use the codebase-rlm MCP tool to analyze this codebase"
→ RooCode calls mcp--codebase-rlm--analyze_codebase()
→ Builds RLM hierarchy (file → module → system)
2. Ask RooCode: "Use codebase-rlm to find where I should add user profile editing"
→ RooCode calls mcp--codebase-rlm--list_modules() + read_module_details()
→ Navigates the RLM structure
3. Ask RooCode: "Use codebase-rlm to show me the user model file"
→ RooCode calls mcp--codebase-rlm--get_file_content()
→ Retrieves from cached RLM map
4. Ask RooCode: "Add a profile_picture field to the User model"
→ RooCode edits the file with full architectural context
→ No context rot—RLM maintains relationships1. Ask RooCode: "Use codebase-rlm to explain the authentication flow"
→ RooCode queries auth module from RLM hierarchy
2. Ask RooCode: "Use codebase-rlm to show me where JWT tokens are validated"
→ RooCode retrieves specific file content
3. Ask RooCode: "Fix the token expiration bug"
→ RooCode makes targeted changes with full contextTest Project: 50 Python files, ~10,000 lines of code
| Operation | Time | Notes |
|---|---|---|
| Initial Analysis (GPU) | ~30s | One-time cost with RTX 4070 |
| Initial Analysis (CPU) | ~15min | Without GPU (not recommended) |
| Subsequent Queries | <1s | Cached retrieval |
| Architecture Overview | <1s | Pre-computed |
| File Content Retrieval | <0.1s | Direct XML access |
Cache Size: ~500KB for 50 files (JSON summaries)
.repomix_rlm_cache/ (add to .gitignore)Q: Does this work with non-Python projects? A: Yes! Repomix supports all languages. The LLM analyzes any code.
Q: Can I use a different LLM provider (OpenAI, Anthropic)? A: Currently Ollama-only, but you can modify OllamaClient to support other APIs.
Q: Do I really need an NVIDIA GPU? A: Technically no, but CPU analysis is 10-50x slower. For a 50-file project: GPU = 30s, CPU = 15min.
Q: How much disk space does the cache use? A: ~10KB per file (JSON summaries). A 100-file project = ~1MB cache.
Q: Does this replace reading code? A: No, it's a navigation tool. Use it to find what to read, then read the actual code.
Q: Can I share the cache with my team? A: Not recommended. Cache paths are machine-specific. Each dev should generate their own.
Q: What's the difference between RLM and RAG? A: RAG retrieves chunks on-demand. RLM pre-analyzes and caches hierarchical summaries, preventing context rot.
MIT License - Feel free to use, modify, and distribute.
Issues? Open an issue on GitHub or ask RooCode:
"Use the codebase-rlm MCP tool to help me debug the Repomix RLM server"Built with ❤️ for developers who want to understand code faster
_Stop reading files one by one. Start navigating with Recursive Language Model intelligence._
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.