From rlm
Run the bundled RLM tool to analyze a document by recursively exploring it with LLM-generated Python code in a REPL.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rlm:rlmThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run the bundled RLM tool to analyze a document by recursively exploring it with LLM-generated Python code in a REPL.
Run the bundled RLM tool to analyze a document by recursively exploring it with LLM-generated Python code in a REPL.
The RLM Python package is bundled in this plugin. Run it with uv run:
uv run --directory "${CLAUDE_PLUGIN_ROOT}" rlm --context-file <path> --query "<question>" --verbose
This requires no pre-installation — uv resolves dependencies and executes from the bundled source automatically.
Parse $ARGUMENTS to determine the context file and query:
$0): path to the context fileIf only one argument is provided, treat it as the context file and use a default query. If no arguments are provided, ask the user which file to analyze and what to ask about it.
Anthropic (default): Requires ANTHROPIC_API_KEY env var to be set.
uv run --directory "${CLAUDE_PLUGIN_ROOT}" rlm --context-file <path> --query "<question>" --verbose
OpenAI: Requires OPENAI_API_KEY env var to be set.
uv run --directory "${CLAUDE_PLUGIN_ROOT}" --with openai rlm --backend openai --context-file <path> --query "<question>" --verbose
OpenRouter: Requires OPENROUTER_API_KEY env var to be set.
uv run --directory "${CLAUDE_PLUGIN_ROOT}" --with openai rlm --backend openrouter --context-file <path> --query "<question>" --verbose
Hugging Face: Requires HF_TOKEN env var to be set.
uv run --directory "${CLAUDE_PLUGIN_ROOT}" --with openai rlm --backend huggingface --context-file <path> --query "<question>" --verbose
Ollama (local models): Requires Ollama running locally.
uv run --directory "${CLAUDE_PLUGIN_ROOT}" --with openai rlm --backend ollama --model llama3.2 --context-file <path> --query "<question>" --verbose
--model <name>: Override the LLM model (default: claude-sonnet-4-20250514)--sub-rlm-model <name>: Use a different (cheaper) model for sub-RLM calls--compact: Use a shorter system prompt--max-iterations <n>: Limit REPL iteration count (default: 10)ANTHROPIC_API_KEY is set)uv run --directory "${CLAUDE_PLUGIN_ROOT}" rlm command with the appropriate argumentsnpx claudepluginhub ondrasek/spike-claude-code-rlm --plugin rlmBased on the Recursive Language Models (RLM) research by Zhang, Kraska, and Khattab (2025), this skill provides strategies for handling tasks that exceed comfortable context limits through programmatic decomposition and recursive self-invocation. Triggers on phrases like "analyze all files", "process this large document", "aggregate information from", "search across the codebase", or tasks involving 10+ files or 50k+ tokens.
Uses dspy.RLM to recursively reason over huge contexts (>100k tokens) via a sandboxed Python REPL that writes code to slice, grep, and sub-query data.