rlm

A method for analysing files, logs, repositories, or datasets that are too large to fit comfortably into one AI conversation. It explores the material with small programmed searches and summaries instead of showing all raw content at once.

In plain words
What is it for?
Use it to scan large codebases, process huge logs, inspect oversized files or databases, and extract specific information from massive data.
Why use it?
It reduces the chance of overwhelming the conversation with irrelevant data and helps preserve useful context. The input describes different procedures for small, medium, and very large inputs.

Skill for Claude CodeCodex

Part of the rlm plugin — 2 skills, 2 commands, 1 agent, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lets7512/rlm-skill/rlm
Any agent
npx skills add Lets7512/rlm-skill --skill rlm
Clone the repo
git clone --depth 1 https://github.com/Lets7512/rlm-skill

Made for: Claude Code, Codex.

Or install rlm, the plugin that ships this one along with the rest of its 2 skills, 2 commands, 1 agent, 1 hook.

Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,983 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00076 $0.01983
Opus 5 $0.00038 $0.00992
Sonnet 5 $0.00015 $0.00397
Haiku 4.5 $0.00008 $0.00198

Measured 3d ago against content hash f062d9359280, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rlm scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**WebFetch is blocked.** Never use WebFetch/fetch to pull remote data into context. Instead, download via `python3 -c` using urllib/requests, save to a local file, then process that file through the protocol.
skills/rlm/SKILL.md · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RLM — Recursive Language Model Protocol

Based on MIT's RLM paper (arXiv:2512.24601) and DSPy's structured REPL pattern. Instead of stuffing data into the token window, explore it programmatically through a structured protocol. Only printed results enter context.

Tokens are CPU, not storage. Never dump raw data into context. Write code to extract what matters, print only the summary.

When to Use

  • File/data too large for context window (logs, databases, binaries)
  • Codebase-wide analysis (grep across 100+ files, dependency graphs)
  • Multi-step data extraction where each step depends on prior results
  • Any task where raw data would burn tokens without adding value

Decision Logic

Size Protocol
< 5KB Read directly — no RLM needed
5KB–500KB Steps 1-3 only (METADATA, PEEK, SEARCH)
500KB+ Full protocol steps 1-6 with sub-agent decomposition

The 6-Step Protocol

Follow these steps IN ORDER. Each step uses python3 -c (or python -c on Windows) via Bash/shell. Raw data never enters context — only stdout does.

Windows note: Use python instead of python3. PowerShell commands like Get-Content, Select-String are also intercepted by the RLM hook — prefer python scripts over PowerShell for data processing.

Step 1: METADATA

Assess the file before touching it.

For multi-file discovery: Use Glob (Claude Code) or glob tool (OpenCode) to find files by pattern. Never use find via Bash — Glob is faster and keeps output compact.

WebFetch is blocked. Never use WebFetch/fetch to pull remote data into context. Instead, download via python3 -c using urllib/requests, save to a local file, then process that file through the protocol.

python3 -c "
import os
path = '/path/to/file'
size = os.path.getsize(path)
print(f'File: {path}')
print(f'Size: {size:,} bytes ({size/1024/1024:.1f}MB)')
print(f'Type: {os.path.splitext(path)[1] or \"unknown\"}')
with open(path, 'rb') as f:
    head = f.read(200)
    try: preview = head.decode('utf-8', errors='replace')
    except: preview = repr(head)
print(f'Preview: {preview[:200]}')
try:
    with open(path) as f:
        lines = sum(1 for _ in f)
    print(f'Lines: {lines:,}')
except: pass
"

Read the full file on GitHub · 198 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 198 lines · 76 tokens per session scan A f062d9359280

Subscribe to this mod's changes

rlm is a skill published in the GitHub repository Lets7512/rlm-skill (24 stars, last pushed 6mo ago), licensed MIT. It adds 76 tokens to every session and 1,983 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

agent-platform-model-registry

Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.

google/skills · 60 tokens

bigquery-ai-ml

Leverages BigQuery's built-in machine learning and GenAI capabilities for advanced data analytics. Use when you need to write SQL queries that perform time-series forecasting, predict values, detect outliers or anomalies, find key drivers, perform semantic search or vector search, classify text, calculate similarity…

google/skills · 104 tokens

ondb

A logical analysis and reasoning tool for AI. Use when decomposing documents into structured knowledge, querying entities and relations, validating consistency, or indexing files. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", "analyze this document", entity CRUD, or cross-skill…

x-cmd/x-cmd · 71 tokens

neuron-evaluation-engineer

Create and run AI evaluations with datasets, assertions, and output drivers in Neuron AI. Use this skill whenever the user mentions evaluation, testing AI systems, creating evaluators, dataset-driven testing, assertion-based validation, or wants to measure AI system performance. Also trigger for tasks involving…

neuron-core/neuron-ai · 77 tokens

mixed-precision

Use FP16/BF16 mixed precision to accelerate training and reduce memory. Use when optimizing GPU performance.

aiming-lab/AutoResearchClaw · 25 tokens

sparse-autoencoder-training

Provides guidance for training and analyzing Sparse Autoencoders (SAEs) using SAELens to decompose neural network activations into interpretable features. Use when discovering interpretable features, analyzing superposition, or studying monosemantic representations in language models.

Orchestra-Research/AI-Research-SKILLs · 58 tokens