RLM (Recursive Language Model) Skill

Chunk large inputs exceeding context limits and aggregate sub-query results.

1|Updated Jan 18, 2026
One-click install
npx skills add https://github.com/egoughnour/massive-context-mcp --skill rlm-recursive-language-model-skill-egoughnour
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: RLM (Recursive Language Model) Skill
Source: https://github.com/egoughnour/massive-context-mcp/tree/main/.claude/skills/rlm
Command: npx skills add https://github.com/egoughnour/massive-context-mcp --skill rlm-recursive-language-model-skill-egoughnour

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

RLM (Recursive Language Model) helps you handle inputs that are too large for a single model context window by breaking them into smaller parts and synthesizing the final answer.

Core Features & Use Cases

  • Load massive content safely: store large text into an RLM context without pushing it into the main prompt at once.
  • Inspect and chunk with strategy control: choose chunking by lines, chars, or paragraphs to match code, logs, or prose.
  • Run chunk-level sub-queries and aggregate: parallelize processing across chunks and then combine results into a coherent final response.
  • Use cases: scanning large codebases for patterns, summarizing multi-megabyte logs, and answering questions across many long documents.

Quick Start

Load your large text into an RLM context, chunk it by the best-fit strategy for your content, then run a batch sub-query across the chunks and aggregate the results into one synthesized answer.

Frequently Asked Questions about RLM (Recursive Language Model) Skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze massive log files that exceed the model context window?▼

To analyze massive log files that exceed the model context window, you can recursively chunk the input by lines or characters, process the smaller units in parallel, and aggregate the sub-query results into a final synthesized summary.

What is the best way to run document Q&A across multiple large files?▼

The best way to run document Q&A across multiple large files is to load the content into a recursive context, apply paragraph-based chunking, and execute batch sub-queries to combine cross-chunk answers into a coherent response.

Can I use local inference for codebase analysis without exceeding context limits?▼

You can use local inference providers like ollama for codebase analysis by breaking the codebase into smaller chunks, running parallel sub-queries on each chunk, and aggregating the outputs to stay within local context limits.

How does recursive summarization work for multi-megabyte text processing?▼

Recursive summarization for multi-megabyte text processing works by breaking the input into manageable chunks, processing each chunk individually through a chosen provider, and then synthesizing the chunk-level summaries into a high-quality aggregated result.

Do I need a specific provider to run batch sub-queries on large inputs?▼

You need to choose a provider like claude-sdk or ollama to run batch sub-queries on large inputs, as the process requires an external model to execute the parallel chunk-level queries and aggregate the final response.

When should I chunk by lines versus paragraphs for codebase analysis?▼

You should chunk by lines or characters for codebase analysis and log mining to preserve structural formatting, whereas paragraph-based chunking is better suited for processing prose and continuous document text.