rlm

A six-step method for exploring large files or datasets in stages, from checking their structure to producing a final answer. RLM refers to the named structured protocol described by the command.

In plain words
What is it for?
Reviewing large files, searching their contents, analysing sections, combining findings, and submitting a documented result.
Why use it?
It keeps large amounts of raw data out of the working context and focuses each inspection step on a specific question.

Command

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 commands/lets7512/rlm-skill/rlm
Clone the repo
git clone --depth 1 https://github.com/Lets7512/rlm-skill
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 375 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.00000 $0.00375
Opus 5 $0.00000 $0.00187
Sonnet 5 $0.00000 $0.00075
Haiku 4.5 $0.00000 $0.00038

Measured 2d ago against content hash 07bb6c3678ed, 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 2d 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.

1. **METADATA**: Assess file — type, size, lines, 200-char preview via `python3 -c` (or `python -c` on Windows). Use **glob** for file discovery (never `find`). **WebFetch is blocked** — download via python urllib instea
.opencode/commands/rlm.md · 32 lines

What it actually says

Use the RLM 6-step structured protocol for this task. Instead of reading large data into context, explore it programmatically through: METADATA -> PEEK -> SEARCH -> ANALYZE -> SYNTHESIZE -> SUBMIT.

Key principle: Tokens are CPU, not storage. Never dump raw data into context.

For the user's request "$ARGUMENTS":

  1. METADATA: Assess file — type, size, lines, 200-char preview via python3 -c (or python -c on Windows). Use glob for file discovery (never find). WebFetch is blocked — download via python urllib instead. Prefer python over PowerShell for data processing.
  2. PEEK: Sample head/tail/random slices to understand structure
  3. SEARCH: Targeted extraction (regex, AST, JSON keys) based on PEEK findings

If file is 500KB+, continue with:

  1. ANALYZE: Decomposition — spawn @explore sub-agents per chunk (up to 15 sub-queries). Pass only the chunk + specific question to each sub-agent.
  2. SYNTHESIZE: Combine findings, cross-reference, resolve conflicts
  3. SUBMIT: End with explicit SUBMIT block:
=== RLM SUBMIT ===
Query: [question]
Confidence: [high/medium/low]
Protocol: [steps executed]
Sub-queries: [N spawned, N completed]
Data processed: [size]

[Answer]
=== END ===

If data is 50MB+ — use rlm-cli query "..." --file <path> --stats

Budget: 20 iterations max, 15K chars/step, 15 sub-queries max. Always SUBMIT.

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. 2d ago First seen · 32 lines · 0 tokens per session scan A 07bb6c3678ed

Subscribe to this mod's changes

rlm is a command published in the GitHub repository Lets7512/rlm-skill (24 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 375 tokens. 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.