MCP Server Builder
anthropics/skills
Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.
Recursive Language Model (RLM) loop for processing a context that is too large to read into the conversation directly.
$ npx skills add brainqub3/RLM --skill rlm -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install brainqub3/RLM rlm --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/brainqub3/RLM.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/rlm .claude/skills/rlm && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "rlm" agent skill from https://github.com/brainqub3/RLM/tree/main/.claude/skills/rlm into .claude/skills/rlm/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rlm", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/brainqub3/RLM/tree/main/.claude/skills/rlmType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add brainqub3/RLM --skill rlm -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install brainqub3/RLM rlm --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/brainqub3/RLM.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/rlm .agents/skills/rlm && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rlm" agent skill from https://github.com/brainqub3/RLM/tree/main/.claude/skills/rlm into .agents/skills/rlm/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rlm", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add brainqub3/RLM --skill rlm -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install brainqub3/RLM rlm --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/brainqub3/RLM.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/rlm .cursor/skills/rlm && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rlm" agent skill from https://github.com/brainqub3/RLM/tree/main/.claude/skills/rlm into .cursor/skills/rlm/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rlm", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/brainqub3/RLM.git --path .claude/skills/rlm--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add brainqub3/RLM --skill rlm -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install brainqub3/RLM rlm --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/brainqub3/RLM.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/rlm .gemini/skills/rlm && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rlm" agent skill from https://github.com/brainqub3/RLM/tree/main/.claude/skills/rlm into .gemini/skills/rlm/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rlm", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install brainqub3/RLM rlmInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add brainqub3/RLM --skill rlm -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/brainqub3/RLM.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/rlm .github/skills/rlm && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rlm" agent skill from https://github.com/brainqub3/RLM/tree/main/.claude/skills/rlm into .github/skills/rlm/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rlm", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add brainqub3/RLM --skill rlm -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install brainqub3/RLM rlm --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/brainqub3/RLM.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/rlm .opencode/skills/rlm && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rlm" agent skill from https://github.com/brainqub3/RLM/tree/main/.claude/skills/rlm into .opencode/skills/rlm/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rlm", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rlmRecursive Language Model (RLM) loop for processing a context that is too large to read into the conversation directly.
Rlm is an agent skill from brainqub3/RLM. Recursive Language Model (RLM) loop for processing a context that is too large to read into the conversation directly. Loads the context as a variable in a persistent Python REPL and answers the query by writing code that probes, chunks, and programmatically sub-queries a cheap LLM (llmquery) over slices of it, then aggregates. Use this WHENEVER the user points you at a big context file/log/transcript/codebase/scraped corpus (anything from ~50K chars up to millions) and asks a question that needs most of the…
Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 25 other files, including scripts (for example `eval/README.md`, `eval/_cache/build_eval.py` and `eval/_cache/pyarrow_fetch.py`).
It works with Python. The repository describes itself as: Claude code setup as an RLM scaffhold Implemented by Brainqub3. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 0039c00. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
BashReadWriteEditGrepGlobFrom allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Python, from the files we listed), which the agent can run.
Shell commands in SKILL.md call:
pythonclaudeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Rlm loads about 3k tokens when it runs. Until then it costs about 249 tokens; SKILL.md has 1,239 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Bash, Read, Write, Edit, Grep, GlobAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from brainqub3/RLM at commit 0039c00, republished under its MIT licence (© brainqub3). 1,239 words, ~2,995 tokens.
.claude/skills/rlm/SKILL.md (or your agent's skills folder). This skill also uses 19 other files; get the full folder from GitHub.A faithful instantiation of Recursive Language Models (Zhang, Kraska, Khattab; arXiv:2512.24601), Algorithm 1, on Claude Code's primitives. The paper's insight: an arbitrarily long prompt should not be fed into a model's context window at all. It should live in an environment the model interacts with programmatically, recursively calling a model over slices of it. That's what this skill does.
You (the main Claude Code conversation) are the root model. You do not read the big context into this conversation. Instead:
context variable inside a persistent Python REPL
(scripts/rlm_repl.py). You only ever see metadata about it (length, a short
prefix) and the truncated stdout of code you run — never the whole thing. This
is the one rule that lets the context be far larger than any window.llm_query(prompt) / llm_query_map(prompts) — a single / a parallel batch of
plain sub-LM calls (a nested headless claude -p, tools off). This is the
leaf: it reads a bounded chunk in its own window and returns text.rlm_query(context, query) — a full recursive RLM over a sub-context, for
sub-tasks that are themselves too big for one leaf call (depth > 1). Falls back
to llm_query at the depth limit.FINAL(answer) or FINAL_VAR(varname).The division of labour that makes this work: the LLM does the semantics (classify this question, extract this fact, summarise this section); your Python does the bookkeeping (loop over every chunk, count, aggregate, format). Do not ask the LLM to count or do arithmetic over the whole corpus, and do not try to do the semantics yourself in Python with keyword heuristics — that is exactly the failure mode the paper's ablations show. Split the work along that seam.
Use it when the context won't fit comfortably in the conversation and the task
needs broad access to it: aggregation/counting over every item, labelling every
row, multi-hop questions across a corpus, whole-document summarisation, or
"the answer depends on almost every line". For a one-off needle lookup in a file
you can just grep, you don't need this.
$ARGUMENTS)context=<path> (required): path to the large context file.query=<question> (required): what to answer about it.sub_model=<alias> (default haiku), max_workers=<int> (default 8),
max_depth=<int> (default 1; >1 enables recursive rlm_query).If the user didn't supply them, ask for the context file path and the query.
Set optional knobs via environment before running, e.g.:
export RLM_SUB_MODEL=haiku RLM_MAX_WORKERS=8 RLM_MAX_DEPTH=1.
Run these via the Bash tool. State persists between calls in
.claude/rlm_state/state.pkl. By default, init also creates a standalone
audit replay package under .claude/rlm_runs/<run_id>/; every exec saves the
submitted Python as steps/step_XXXX.py.
python .claude/skills/rlm/scripts/rlm_repl.py init <context_path>This prints the context's type, char/line/token estimate, and a short prefix.
Do not read the context file with the Read tool — that defeats the purpose.
It also prints the audit replay package path. Use --no-audit only when you do
not want standalone step scripts.
Look at the shape of the data before deciding a strategy. Print small slices and structure, not the bulk:
python .claude/skills/rlm/scripts/rlm_repl.py exec <<'PY'
print(peek(0, 1500)) # head
lines = [l for l in content.splitlines() if l.strip()]
print("lines:", len(lines))
print("sample:", lines[1] if len(lines) > 1 else "")
PYAsk: Is it line-oriented? JSON objects? Markdown sections? Logs with timestamps? The format dictates the chunking.
This is the core. Chunk the context, build one prompt per chunk, and fan the
semantic work out to the sub-LM with llm_query_map (parallel). Keep the
chunks fat (a leaf can hold a large slice — batch to minimise call count) but small
enough that the sub-LM stays accurate. Accumulate results in a variable; let Python
do the aggregation.
python .claude/skills/rlm/scripts/rlm_repl.py exec <<'PY'
# Example shape for an aggregation task: derive records from the actual format,
# ask leaf LMs for semantic labels, then count/aggregate in Python.
records = [line.strip() for line in content.splitlines() if line.strip()]
# Fill these from the user's query and what you observed while probing. Do not
# assume the file's delimiter, item marker, or labels before inspecting it.
question = "What should be classified or extracted for each record?"
categories = ["category_a", "category_b", "category_c"]
def build(batch, start):
body = "\n".join(f"{start+i}: {record}" for i, record in enumerate(batch))
return (
f"{question}\n"
f"Use exactly one of these categories: {', '.join(categories)}.\n"
"Output exactly one line per record as 'N: <category>'. No extra text.\n\n"
+ body
)
BATCH = 50
prompts = [build(records[s:s+BATCH], s) for s in range(0, len(records), BATCH)]
outs = llm_query_map(prompts) # parallel sub-LM calls; order preserved
import re
from collections import Counter
labels = {}
for out in outs:
for ln in out.splitlines():
m = re.match(r"\s*(\d+)\s*[:.\)]\s*(.+)", ln)
if m:
labels[int(m.group(1))] = m.group(2).strip().strip("*[]").lower()
missing = [i for i in range(len(records)) if i not in labels]
counts = Counter(labels.values())
print("classified:", len(labels), "/", len(records), "missing:", len(missing))
print("counts:", dict(counts))
PYBecause the REPL is persistent, items, labels, and counts survive into your
next exec. Inspect, sanity-check, and re-run pieces as needed. Save durable
intermediate text with add_buffer(...) (it lives in the buffers list).
Do the final arithmetic/formatting in Python, then set the answer. The answer must be a REPL variable or literal — not just something you say in chat (so it can be arbitrarily long and is captured verbatim):
python .claude/skills/rlm/scripts/rlm_repl.py exec <<'PY'
top = counts.most_common(1)[0][0]
answer = f"Label: {top}"
FINAL_VAR("answer") # or: FINAL(f"Label: {top}")
PY
python .claude/skills/rlm/scripts/rlm_repl.py final # prints the stored answerThen report that final answer to the user, in the exact output format the query asked for.
exec)Injected automatically every exec (you never import or define these):
| name | what it does |
|---|---|
context / content | the full context, as a str (two names for the same value) |
llm_query(prompt, model=None, timeout=300, system=...) | one sub-LM leaf call → text |
llm_query_map(prompts, max_workers=8, ...) | many leaf calls in parallel → list of texts, in order |
rlm_query(context_text, query, ...) | recursive RLM over a sub-context (depth>1); falls back to llm_query at max depth |
FINAL(answer) / FINAL_VAR(name) | set the final answer (literal / by variable name) |
peek(start, end) | a slice of the raw context |
grep(pattern, max_matches, window) | regex search → matches with surrounding snippets |
chunked(seq, size) | yield size-length slices of a list (lines, etc.) |
chunk_indices(size, overlap) / write_chunks(dir, ...) | character chunk spans / write chunks to files |
add_buffer(text) / buffers | append to / read the persistent list of intermediate results |
Your own variables persist between exec calls (anything pickleable). stdout is
truncated (~8000 chars) before you see it — print summaries and samples, not bulk.
Each audited exec writes:
steps/step_XXXX.py - a normal Python script containing the original REPL code
plus a small prelude that recreates the RLM globals.steps/step_XXXX.json - metadata such as hashes, output paths, and final status.steps/step_XXXX.stdout.txt / .stderr.txt - the original captured output.runtime/ - a copy of the runtime needed by the generated scripts.replay_all.py - runs all saved steps from a clean replay_state.pkl.Replay with:
python .claude/rlm_runs/<run_id>/replay_all.pyReplay calls llm_query live, so sub-LM text can differ from the original run.
The replay checkpoint is separate from the live REPL state and does not mutate
.claude/rlm_state/state.pkl.
print(content). Work through the REPL and sub-LM calls. If you
catch yourself wanting the full text in chat, chunk it and llm_query it instead.if "keyword" in line, both score badly.llm_query (e.g. 50–100 short lines per call) and parallelise with
llm_query_map. Thousands of one-item calls are slow and costly for no accuracy
gain. But keep batches small enough that the sub-LM doesn't drop or miscount items
— verify classified == total and re-run any short/garbled batch.FINAL/FINAL_VAR, then echo it to the
user in the requested format. Don't stop at intermediate buffers.rlm_query) is for sub-tasks too big for one leaf, e.g. "analyse
these 500 documents that each need their own chunking". It is slower and costlier;
most tasks (including pure aggregation) only need llm_query. Default max_depth
is 1.claude -p) and reuses your existing
login — no API key or SDK. llm_query runs it with tools off (a plain LLM);
rlm_query runs it with bash + this skill on (its own REPL)..claude/rlm_state/.© brainqub3, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 19 other files (scripts) in .claude/skills/rlm of brainqub3/RLM.
Open the folder on GitHubat commit 0039c00
Rlm next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Rlm this skillbrainqub3/RLM | 393 | — | ~3k | Automated safety check: Notes | MIT | |
| MCP Server Builderanthropics/skills | 180k | 64 repos | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| PDF Processinganthropics/skills | 180k | 48 repos | ~2k | Automated safety check: Pass | Proprietary | |
| NotebookLM Research AssistantPleasePrompto/notebooklm-skill | 7.8k | 14 repos | ~2.4k | Automated safety check: Notes | MIT | |
| Manim Video Productionbrowser-use/video-use | 28k | 6 repos | ~3k | Automated safety check: Pass | MIT | |
| Code Review ChecklistshareAI-lab/learn-claude-code | 78k | 5 repos | ~1.1k | Automated safety check: Pass | MIT |
anthropics/skills
Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.
anthropics/skills
Handles everyday PDF jobs in Python and on the command line: extract text and tables, merge, split, rotate, watermark, fill forms, encrypt and OCR.
PleasePrompto/notebooklm-skill
Lets Claude Code ask questions of your Google NotebookLM notebooks through browser automation and return answers grounded in your uploaded sources.
browser-use/video-use
Produces math and technical explainer videos with Manim Community Edition: concept animations, equation derivations, algorithm walkthroughs and data stories.
shareAI-lab/learn-claude-code
Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.
hugohe3/ppt-master
Generates editable PowerPoint decks, rebuilds slides from images, fills .pptx templates and polishes existing presentations through routed workflows.
Works with
Recursive Language Model (RLM) loop for processing a context that is too large to read into the conversation directly. Rlm is an agent skill from brainqub3/RLM. Recursive Language Model (RLM) loop for processing a context that is too large to read into the conversation directly.
Rlm fits situations like: classifying every item; multi-hop lookup; summarising the whole thing -- ESPECIALLY when the answer depends on almost every line and a single retrieval/grep wont do; it even if the user doesnt say RLM: phrases like this file is huge.
Run `npx skills add brainqub3/RLM --skill rlm -a claude-code`. Or copy the skill folder (.claude/skills/rlm in brainqub3/RLM) into .claude/skills/rlm in your project. Claude Code loads it when a task matches its description.
Run `npx skills add brainqub3/RLM --skill rlm -a codex`. Or copy the skill folder (.claude/skills/rlm in brainqub3/RLM) into .agents/skills/rlm in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add brainqub3/RLM --skill rlm -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rlm, .gemini/skills/rlm, .github/skills/rlm and .opencode/skills/rlm in your project.
Going by SKILL.md and its folder, Rlm needs Python for the scripts in its folder and the command-line tools its instructions call (python and claude). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash, Read, Write, Edit, Grep, Glob.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Rlm is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Rlm: MCP Server Builder (anthropics/skills, 180k stars), PDF Processing (anthropics/skills, 180k stars), NotebookLM Research Assistant (PleasePrompto/notebooklm-skill, 7.8k stars) and Manim Video Production (browser-use/video-use, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
brainqub3 (a GitHub organization) maintains it in brainqub3/RLM, which has 393 GitHub stars. The repository was last updated on June 22, 2026.
Source: brainqub3/RLM on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.