rlm
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).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
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).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Verify a CVlization inference example is properly structured, builds successfully, and runs inference correctly. Use when validating inference example implementations or debugging inference issues.
Verify a CVlization training pipeline example is properly structured, can build, trains successfully, and logs appropriate metrics. Use when validating example implementations or debugging training issues.
Run CVlization examples on the `ssh l1` GPU host by copying only the needed example directory plus the shared `cvlization/` package into `/tmp`, then launching the example’s Docker scripts.
| name | rlm |
| description | 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). |
| allowed-tools | ["Read","Write","Edit","Grep","Glob","Bash"] |
Use this Skill when:
rlm_repl.py) = the external memory / environment.rlm-subcall = the sub-LM (equivalent to llm_query in the RLM paper).Accept these patterns from $ARGUMENTS:
context=<path> (required): path to the large context file.query=<question> (required): what to answer.chunk_chars=<int> (default 150000) and overlap_chars=<int> (default 0).If arguments are missing, ask for the context file path and query.
Initialise 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
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(f'Total: {len(content):,} chars')"
Choose a chunking strategy
Write chunks to files (so rlm-subcall can read them)
python3 .claude/skills/rlm/scripts/rlm_repl.py exec <<'PY'
paths = write_chunks('.claude/rlm_state/chunks', size=150000, overlap=0)
print(f'{len(paths)} chunks written')
PY
Subcall loop — for each chunk, invoke rlm-subcall with:
python3 .claude/skills/rlm/scripts/rlm_repl.py exec -c "add_buffer('<result from subagent>')"
Synthesise — combine buffers in the main conversation to produce the final answer. Optionally pass all buffers to rlm-subcall once more for a coherent draft.
.claude/rlm_state/.For reproducible, non-interactive pipelines consider the Docker-based alternatives in this repo:
examples/agentic/long_context/rlm_needle/ — needle-in-haystack demo (any LLM API)examples/agentic/long_context/rlm_doc_qa/ — document QA (any LLM API)