RLM (Recursive Language Model) Skill

Load large text outside the prompt, chunk it, and run batched sub-queries with aggregation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The RLM pattern solves the problem of losing or failing to analyze information when file sizes exceed the LLM context window.

Core Features & Use Cases

  • Load massive context as external variables: Ingest very large text content (e.g., 10M+ token workloads) without pushing it directly into the prompt.
  • Inspect structure without full prompt exposure: Retrieve metadata and previews to understand what you loaded before processing.
  • Chunk, recursively sub-query, then aggregate: Break content into manageable pieces using lines/chars/paragraphs, process each chunk (optionally batched with concurrency), and synthesize a final answer.
  • Use cases: Large log triage, extracting TODOs across a codebase, multi-document Q&A, and summarizing lengthy research or documentation sets.

Quick Start

Use the RLM (Recursive Language Model) Skill to analyze the attached large file by chunking it into line-based segments, running a batched extraction prompt across the chunks, and then aggregating the chunk outputs into a single result.

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 large log files that exceed the LLM context window limit?▼

To analyze large log files exceeding the LLM context window, you load the text as an external variable, chunk it into manageable pieces, run per-chunk sub-queries, and aggregate the partial results into a synthesized response.

What is recursive chunking for large context processing?▼

Recursive chunking is a technique that breaks down massive content into smaller segments by lines, characters, or paragraphs, allowing an LLM to process each chunk individually and extract cross-chunk patterns without losing information.

Can I summarize a massive codebase without hitting token limits?▼

Yes, you can summarize a massive codebase without hitting token limits by loading the content outside the prompt, applying a chunking strategy, and using batched sub-queries to extract information like TODOs before aggregating the outputs.

How do I extract patterns across multiple documents during log analysis?▼

You extract cross-chunk patterns across multiple documents by running batched sub-queries concurrently on each chunk, then using an aggregation step to synthesize the partial results into a single unified response.

What is the best way to inspect a large file structure before processing it with an LLM?▼

The best way to inspect a large file structure before processing is to load it as an external variable and retrieve metadata and previews, allowing you to understand the content before running recursive sub-queries.

Are there limitations to processing 10M+ token workloads using chunk-based analysis?▼

While chunk-based analysis handles 10M+ token workloads by processing segments individually, the final response must be synthesized from many partial results, meaning the aggregation step must effectively summarize extensive sub-query outputs.