/rlm:rlmfrom Recursive Language Model
Analyze repositories, logs, and document sets that are too large to read in one pass, using bounded recursive exploration with cited evidence. Use this skill when the user asks for a repository-wide review, a security or architecture audit, a cross-file trace, a change review against a baseline, a search through huge logs or many documents, or any question whose evidence is spread across more files than fit in context, even if they never say "RLM". It keeps raw content outside the context window, budgets recursion by model tier, and validates findings before reporting.
Ships in Recursive Language Model. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Use the user's current request as the task and scope. Hosts with explicit skill arguments may expose that request as $ARGUMENTS. If the scope is omitted, use the current working directory. Resolve paths before analysis and keep all work inside the user-authorized scope.
The central idea: a large context is an external environment to query, not a prompt to ingest. Measure it, search it, slice it, and reduce it with commands. Recursion is an escalation for evidence that is spread out, not the default for every lookup.
Paths are relative to this skill's directory. Load each one only when its condition holds.
scripts/rlm_inventory.py: run before partitioning standard or deep work.scripts/rlm_ledger.py: run on every worker result before using it.evals/rlm_eval_cases.json: read when changing this skill, then re-run the cases.The scripts need Python 3.11 or newer and use only the standard library. Both support --help. If Python is unavailable, follow the same rules by hand and say so in the report.
Use available tools without assuming a specific harness or model family.
Run the cheapest bounded probe that could answer the question before selecting a recursive mode.
Mode depends on scope and risk, not on keywords. A request that begins with "what is" may still need a deep audit. Escalate from focused lookup only when the evidence spans several subsystems or the first probe cannot support a reliable answer.
Follow the Print Contract. Raw content stays in files and variables. Only compact, bounded summaries enter the context.
rg, sed -n, awk, jq, short Python) to pull out the part that answers the question. Do not load a large file to look for something a command can find..rlm/<topic>/ holds the inventory manifest, slices, worker ledgers, and notes. Later turns reopen those files instead of repeating the work. Where the harness has a persistent REPL, variables serve the same purpose.Scratch hygiene:
.rlm/ is ignored by version control before writing to it. Redact sensitive values.For standard and deep work, record the contract before partitioning:
Stop expanding when the acceptance criteria are supported, two consecutive probes add no material evidence, the remaining work is lower priority than the ceiling allows, or a required capability or authorization is unavailable. Report the resulting proof gap. Do not silently exceed the budget.
Pick the tier of the model doing the work. If unsure, pick the lower tier. A user-stated budget may lower these limits. The ledger validator rejects any depth above the tier ceiling.
| Tier | Typical models | Default depth | Max depth | Max partitions per level | Max sub-calls |
|---|---|---|---|---|---|
| frontier | top reasoning models of any vendor | 1 | 2 | 8 | 16 |
| mid | fast general-purpose models | 1 | 1 | 5 | 8 |
| small | small or local models | 0 | 1 | 3 | 4 |
Depth 0 is direct exploration with commands. Depth 1 is one layer of independently useful partitions. Depth 2 is a sub-call made from inside a partition.
Guardrails against overthinking, for every tier:
scripts/rlm_inventory.py and does not invent its own decomposition. When its budget is spent it stops and lists the unreviewed chunks as deferred.Skip opaque binary payloads by default, but inspect their metadata and provenance when relevant. SVG, manifests, and lockfiles are text. Inspect dependency lockfiles during supply-chain, reproducibility, and release analysis.
For change reviews: resolve the comparison point from the request, prior verified metadata, the merge-base, or recent history. Confirm the ref exists. Review the diff plus enough unchanged context to judge reachability. Fall back to a full relevant-scope analysis if the baseline is missing or touches most of the system. Do not claim "no changes" from a clean worktree when committed changes may exist relative to the intended baseline.
Build the worklist with the inventory script. It prints a bounded summary and writes the full chunk list to the scratchpad:
python3 scripts/rlm_inventory.py <scope> --manifest .rlm/<topic>/manifest.json
It skips dependency, cache, and build directories (override with --include-noise), skips symbolic links and counts those that point outside the scope, caps the listed files with --max-files, and stops 64 directory levels down unless --max-depth says otherwise. When its summary shows coverage_complete: false, part of the scope was not listed. Report that as deferred. Regroup its chunks into partitions with one owner and independently checkable completion criteria, such as a package, a runtime entry point, a trust boundary, or a document section. Stay inside the tier's partition limit. Defer the rest and say so.
The first decomposition has disproportionate impact. For a deep audit, pilot one representative partition first. Check that its boundaries, evidence format, and verification criteria give a useful result, revise the plan once, then dispatch the rest. Do not propagate a weak or overlapping decomposition.
Delegate or run serially:
Worker result format:
## Budget
- Tier: frontier | mid | small
- Depth: 1
- Max depth: 1
- Named dependency: none
## Coverage
- Reviewed: <paths or chunk ids>
- Deferred: <scope and reason, or none>
## Findings
### [SEVERITY] Title
- Location: path:line
- Evidence: source -> control -> sink, or observed behavior
- Impact: concrete consequence
- Confidence: high | medium | low
## Counterevidence
- <mitigation, or the search that found none>
## Verification
- <check that was run and its result, or why none could run>
Write "None" under Findings when there are none. Validate every result before using it:
python3 scripts/rlm_ledger.py .rlm/<topic>/worker-01.md --root <scope> --tier <tier> --depth <depth>
Exit code 1 means the result is rejected: a required section is missing or empty, a citation is empty, a placeholder, or points at a file or line that does not exist, or the depth exceeds its budget. Send the errors back to the worker once. If the second result also fails, record the partition as a proof gap.
For every candidate finding:
Then decide whether an independent check is worth a call:
| Impact | Evidence state | Action |
|---|---|---|
| any | direct source evidence, no conflict | cite it, no extra check |
| low | uncertain | report as unverified, no extra call |
| high | single source or medium confidence | one independent check: a different query, source path, or test |
| high | conflicting evidence, low confidence, or a small-tier author | one independent reviewer, from a different model family when the harness has one |
| irreversible or security-critical | any | independent reviewer from a different model family, plus a test when one can run safely |
Give the reviewer the claim and the source locations, not the first worker's conclusion as fact. Resolve disagreement against source lines or a test result. Repeated self-opinion, longer reasoning, and a confidence score are not verification. If no other model family is available, use a fresh context of the same family and state that in the report.
Absence of evidence is a proof gap, not proof of safety. Static review is not runtime validation. Scanner output is a lead, not a confirmed finding.
Keep one compact ledger for standard and deep work: claim, source location, verification method, confidence, and unresolved gap. Worker results in the format above are the ledger entries. Store them under .rlm/<topic>/ for deep audits. Working notes are enough for standard analysis. A claim with no ledger entry does not go in the report.
Deduplicate only when findings share the same root cause and remediation. Keep separately reachable instances apart when their ownership or impact differs. Rank by evidence-backed severity and confidence.
Return, in this order:
path:line citations;When the user requested implementation, use test-first changes, re-run focused and broad checks, review the final diff, and report what changed. When they requested review only, stop after the evidence-backed report.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
rlm@oci-skills is listed by adibirzu/oci-skills — review the source before installing
npx claudepluginhub adibirzu/oci-skills --plugin rlm