By narailabs
Recursive Language Model integration for Claude Code - intelligent multi-provider routing and unbounded context handling
Run performance benchmarks for RLM-Claude-Code.
Review the current changes following docs/process/code-review.md.
Invoke the RLM orchestrator agent for complex context management tasks.
Toggle or configure RLM (Recursive Language Model) mode.
Bypass RLM mode for a simple operation.
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Transform Claude Code into a Recursive Language Model (RLM) agent with intelligent orchestration, unbounded context handling, persistent memory, and REPL-based decomposition.
RLM (Recursive Language Model) enables Claude to handle arbitrarily large contexts by decomposing complex tasks into smaller sub-queries. Instead of processing 500K tokens at once, RLM lets Claude:
This results in better accuracy on complex tasks while optimizing cost through intelligent model selection.
# Clone the repository
git clone https://github.com/rand/rlm-claude-code.git
cd rlm-claude-code
# Install dependencies
uv sync --all-extras
# Run tests to verify setup
uv run pytest tests/ -v
# Add the marketplace (one-time setup)
claude plugin marketplace add github:rand/rlm-claude-code
# Install the plugin
claude plugin install rlm-claude-code@rlm-claude-code
After installation, start Claude Code and you should see "RLM initialized" on startup.
User Query
│
▼
┌─────────────────────────────────────────────────────────┐
│ INTELLIGENT ORCHESTRATOR │
│ ┌───────────────────┐ ┌───────────────────────────┐ │
│ │ Complexity │ │ Orchestration Decision │ │
│ │ Classifier │ │ • Activate RLM? │ │
│ │ • Token count │──►│ • Which model tier? │ │
│ │ • Cross-file refs │ │ • Depth budget (0-3)? │ │
│ │ • Query patterns │ │ • Tool access level? │ │
│ └───────────────────┘ └───────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
│
▼ (if RLM activated)
┌─────────────────────────────────────────────────────────┐
│ RLM EXECUTION ENGINE │
│ │
│ ┌──────────────────┐ ┌──────────────────────────┐ │
│ │ Context Manager │ │ REPL Sandbox │ │
│ │ • Externalize │───►│ • peek(), search() │ │
│ │ conversation │ │ • llm(), llm_batch() │ │
│ │ • files, tools │ │ • map_reduce() │ │
│ └──────────────────┘ │ • find_relevant() │ │
│ │ • memory_*() functions │ │
│ └──────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────┐ ┌──────────────────────────┐ │
│ │ Recursive Handler│ │ Tool Bridge │ │
│ │ • Depth ≤ 3 │ │ • bash, read, grep │ │
│ │ • Model cascade │ │ • Permission control │ │
│ │ • Sub-query spawn│ │ • Blocked commands │ │
│ └──────────────────┘ └──────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ PERSISTENCE LAYER │
│ │
│ ┌──────────────────┐ ┌──────────────────────────┐ │
│ │ Memory Store │ │ Reasoning Traces │ │
│ │ • Facts, exps │ │ • Goals, decisions │ │
│ │ • Hyperedges │ │ • Options, outcomes │ │
│ │ • SQLite + WAL │ │ • Decision trees │ │
│ └──────────────────┘ └──────────────────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────────┐ ┌──────────────────────────┐ │
│ │ Memory Evolution │ │ Strategy Cache │ │
│ │ task → session │ │ • Learn from success │ │
│ │ session → long │ │ • Similarity matching │ │
│ │ decay → archive │ │ • Suggest strategies │ │
│ └──────────────────┘ └──────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ BUDGET & TRAJECTORY │
│ • Token tracking per component │
│ • Cost limits with alerts │
│ • Streaming trajectory output │
│ • JSON export for analysis │
└─────────────────────────────────────────────────────────┘
│
▼
Final Answer
The REPL provides a sandboxed Python environment for context manipulation:
Documentation wiki generator and maintainer for Claude Code. Atlas (full-codebase docs with ER diagrams and a cross-service map), ingest, query, lint — all driven by the doc-wiki skill and 8 namespaced slash commands.
Enforced Test-Driven Development with Claude Code agent teams. Fullstack unit pipeline (backend+frontend in one unit), TypeScript verification scripts enforce anti-cheat via Bash with tsc compilation checks built-in. Script output visible in conversation — cannot be fabricated.
Retrofit self-improving feedback loops into existing skills or agents. Makes any skill/agent learn from usage and mistakes, improving itself every run — without ever changing its scope.
AI-powered QA agent that uses Chrome browser tools to intelligently browse web applications, discover all screens and interactive elements, test them systematically, and automatically fix bugs it finds. Supports targeted workflow testing and bug fix cycles.
npx claudepluginhub narailabs/rlm-claude-codeUltra-compressed communication mode. Cuts 65% of output tokens (measured) while keeping full technical accuracy by speaking like a caveman.
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Comprehensive UI/UX design plugin for mobile (iOS, Android, React Native) and web applications with design systems, accessibility, and modern patterns
Unified capability management center for Skills, Agents, and Commands.