rlm
Skill8 starsChanged 10 months agoMITView on GitHub
Process large codebases (>100 files) using the Recursive Language Model pattern. Treats code as an external environment, using parallel background agents to map-reduce complex tasks without context rot. Use when asked to "analyze codebase", "scan all files", deal with a "large repository", or "find usage of X across the project".
4 other projects use a version of this.
Adopted by
Most recently taken up by
- saint0x/my-skillstheir own version, first seen Aug 29, 2026
- brainqub3/RLMtheir own version, first seen Jun 22, 2026
- Tenobrus/claude-rlmtheir own version, first seen Feb 9, 2026
- richardwhiteii/rlmtheir own version, first seen Jan 18, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- brainqub3/RLM★ 393same name
- Tenobrus/claude-rlm★ 95same name
- richardwhiteii/rlm★ 49same name
- saint0x/my-skills★ 1same name
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 repository4 other files it gives its agents.
- ai-dev-workflowSkill
- linkedin-postsSkill
- lyfx-corporate-designSkill
- market-researchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 9 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
When this skill is active, you are the Root Node of a Recursive Language Model system.
- Very specific: line 35
Native: Use Glob for file patterns, Grep with output_mode: "files_with_matches" for content.
- Distinctive: line 44
Spawn: Use the Task tool to launch parallel sub-agents.
- Very specific: line 47
Use subagent_type="Explore" for read-only analysis, subagent_type="general-purpose" if the agent needs to write.
- Very specific: line 64
Collect: Read background agent outputs via the Read tool on output_file paths, or use TaskOutput to retrieve results.
- Distinctive: line 66
Synthesize: Look for patterns, consensus, or specific answers in the aggregated data.
- Distinctive: line 67
Refine: If the answer is incomplete, perform a second RLM recursion on the missing pieces.
- Distinctive: line 71
NEVER: read more than 3-5 files into your main context at once.
- Distinctive: line 72
ALWAYS: prefer the Task tool for reading/analyzing files when count > 1.
- Very specific: line 74
Python is your Memory: If you need to track state across 50+ files, write a Python script (or use rlm.py) to scan them and output a summary.
- Very specific: line 80
Read src/api/routes.ts, then src/api/users.ts, then ...
- Distinctive: line 89
If Task tool agents are unavailable or failing:
- Distinctive: line 91
Write a Python script that loads each file, runs a regex/AST check, and prints results to stdout.
- Distinctive: line 92
Read the script's stdout via Bash.
“Common” is measured: kept by at least 6 in 10 of the 3 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
Recursive Language Model (RLM) Skill
Adapted from the RLM skill by BowTiedSwan for the Claude Code CLI environment.
License notice: The original repository does not specify a license. This adaptation is provided with attribution; upstream licensing status is unresolved.
Core Philosophy
"Context is an external resource, not a local variable."
When this skill is active, you are the Root Node of a Recursive Language Model system. Your job is NOT to read every file yourself, but to orchestrate sub-agents that read code in parallel and report back summaries.
Protocol: The RLM Loop
Phase 1: Choose Your Engine
| Engine | Use Case | Tool |
| Native Mode | General codebase traversal, finding files, structure. | Glob, Grep, Bash |
| Strict Mode | Dense data analysis (logs, CSVs, massive single files). | python3 ~/.claude/skills/rlm/scripts/rlm.py |
Phase 2: Index & Filter (The "Peeking" Phase)
Goal: Identify relevant data without loading it into your main context.
- Native: Use
Globfor file patterns,Grepwithoutput_mode: "files_with_matches"for content. - Strict: Use
python3 ~/.claude/skills/rlm/scripts/rlm.py peek "query".
Phase 3: Parallel Map (The "Sub-Query" Phase)
Goal: Process chunks in parallel using fresh agent contexts.
- Divide: Split the work into atomic units (one file or chunk per agent).
- Strict Mode:
python3 ~/.claude/skills/rlm/scripts/rlm.py chunk --pattern "*.log"-> JSON chunks.
- Strict Mode:
- Spawn: Use the Task tool to launch parallel sub-agents.
- Launch 3-5+ agents in parallel for broad tasks.
- Give each agent one specific file or chunk and a focused question.
- Use
subagent_type="Explore"for read-only analysis,subagent_type="general-purpose"if the agent needs to write. - Set
run_in_background=truefor true parallelism.
Example — launch in a single message with multiple Task tool calls:
Task(subagent_type="Explore", run_in_background=true,
prompt="Read src/api/routes.ts. Extract all endpoints and their @Auth decorators.")
Task(subagent_type="Explore", run_in_background=true,
prompt="Read src/api/users.ts. Extract all endpoints and their @Auth decorators.")
...Phase 4: Reduce & Synthesize (The "Aggregation" Phase)
Goal: Combine results into a coherent answer.
- Collect: Read background agent outputs via the
Readtool onoutput_filepaths, or useTaskOutputto retrieve results. - Synthesize: Look for patterns, consensus, or specific answers in the aggregated data.
- Refine: If the answer is incomplete, perform a second RLM recursion on the missing pieces.
Critical Instructions
- NEVER read more than 3-5 files into your main context at once.
- ALWAYS prefer the Task tool for reading/analyzing files when count > 1.
- Use
rlm.pyfor programmatic slicing of large files that Grep can't handle well. - Python is your Memory: If you need to track state across 50+ files, write a Python
script (or use
rlm.py) to scan them and output a summary.
Example Workflow: "Find all API endpoints and check for Auth"
Wrong Way (Monolithic):
- Read
src/api/routes.ts, thensrc/api/users.ts, then ... (context fills up, reasoning degrades)
RLM Way (Recursive):
- Filter:
Grep(pattern="@Controller", output_mode="files_with_matches")-> 20 files. - Map: Launch 20 Task agents in parallel (background), each extracting endpoints + auth decorators from one file.
- Reduce: Collect all 20 outputs. Compile into a single table. Identify missing auth.
Recovery Mode
If Task tool agents are unavailable or failing:
- Fall back to Iterative Python Scripting.
- Write a Python script that loads each file, runs a regex/AST check, and prints results to stdout.
- Read the script's stdout via Bash.
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.

