rlm
Skill1 starsChanged 9 months agoMITView on GitHub
Run a Recursive Language Model-style loop for long-context tasks. Uses a persistent local Python REPL and an rlm-subcall subagent as the sub-LLM (llm_query).
12 other projects use a version of this.
Adopted by
Most recently taken up by
- osick/ctx.skillstheir own version, first seen Oct 13, 2026
- Trampoline-AI/predict-rlmtheir own version, first seen Oct 8, 2026
- brainqub3/claude_code_RLMtheir own version, first seen Oct 8, 2026
- MiracleWeb3/rlmtheir own version, first seen Oct 8, 2026
- saint0x/my-skillstheir own version, first seen Aug 29, 2026
- brainqub3/RLMtheir own version, first seen Jun 22, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- Trampoline-AI/predict-rlm★ 436same name
- brainqub3/claude_code_RLM★ 393same name
- brainqub3/RLM★ 393same name
- Tenobrus/claude-rlm★ 94same name
- richardwhiteii/rlm★ 49same name
- andremoreira73/Useful-Skills-from-lyfX★ 8same name
- endjin/RLM★ 6same name
- rgoldr88/claude-rlm★ 1same name
- saint0x/my-skills★ 1same name
- arkaigrowth/rlm★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use this Skill when:
- Distinctive: line 35
If the user didn't supply arguments, ask for:
- Distinctive: line 54
Prefer semantic chunking if the format is clear (markdown headings, JSON objects, log timestamps).
- Distinctive: line 71
Keep subagent outputs compact and structured (JSON preferred).
- Distinctive: line 80
Do not paste large raw chunks into the main chat context.
- Distinctive: line 81
Use the REPL to locate exact excerpts.
- Very specific: line 83
Keep scratch/state files under .claude/rlm_state/.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
rlm (Recursive Language Model workflow)
Use this Skill when:
- The user provides (or references) a very large context file (docs, logs, transcripts, scraped webpages) that won't fit comfortably in chat context.
- You need to iteratively inspect, search, chunk, and extract information from that context.
- You can delegate chunk-level analysis to a subagent.
Mental model
- Main Claude Code conversation = the root LM.
- Persistent Python REPL (
rlm_repl.py) = the external environment. - Subagent
rlm-subcall= the sub-LM used likellm_query.
How to run
Inputs
This Skill reads $ARGUMENTS. Accept these patterns:
context=<path>(required): path to the file containing the large context.query=<question>(required): what the user wants.- Optional:
chunk_chars=<int>(default ~200000) andoverlap_chars=<int>(default 0).
If the user didn't supply arguments, ask for:
- the context file path, and
- the query.
Step-by-step procedure
- Initialise the REPL state
python3 .claude/skills/rlm/scripts/rlm_repl.py init <context_path> python3 .claude/skills/rlm/scripts/rlm_repl.py status - Scout the context quickly
python3 .claude/skills/rlm/scripts/rlm_repl.py exec -c "print(peek(0, 3000))" python3 .claude/skills/rlm/scripts/rlm_repl.py exec -c "print(peek(len(content)-3000, len(content)))" - Choose a chunking strategy
- Prefer semantic chunking if the format is clear (markdown headings, JSON objects, log timestamps).
- Otherwise, chunk by characters (size around chunk_chars, optional overlap).
- Materialise chunks as files (so subagents can read them)
python3 .claude/skills/rlm/scripts/rlm_repl.py exec <<'PY' paths = write_chunks('.claude/rlm_state/chunks', size=200000, overlap=0) print(len(paths)) print(paths[:5]) PY - Subcall loop (delegate to rlm-subcall)
- For each chunk file, invoke the rlm-subcall subagent with:
- the user query,
- the chunk file path,
- and any specific extraction instructions.
- Keep subagent outputs compact and structured (JSON preferred).
- Append each subagent result to buffers (either manually in chat, or by pasting into a REPL add_buffer(...) call).
- For each chunk file, invoke the rlm-subcall subagent with:
- Synthesis
- Once enough evidence is collected, synthesise the final answer in the main conversation.
- Optionally ask rlm-subcall once more to merge the collected buffers into a coherent draft.
Guardrails
- Do not paste large raw chunks into the main chat context.
- Use the REPL to locate exact excerpts; quote only what you need.
- Subagents cannot spawn other subagents. Any orchestration stays in the main conversation.
- Keep scratch/state files under .claude/rlm_state/.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

