rlm-search
БесплатноБез исполняемых скриптовНе проверенRun the full Recursive Language Model pipeline — prep, fan out across chunks, and recursively synthesize until results fit one context window
от jmagly★ 233 звезды на GitHubОб этом скилле
RLM Search
The full Recursive Language Model pipeline in one command. Prepares content if needed, fans the query out across all chunks, and recursively synthesizes results until they fit in a single context window. Use this when you need to answer a question against content too large to read at once.
Triggers
Alternate expressions and non-obvious activations:
- "deep search this codebase" → rlm-search with source
. - "answer this using the whole repo" → rlm-search with source
. - "recursive search" → rlm-search
- "search the entire codebase for X" → rlm-search with extracted query
- "use RLM to find X" → rlm-search
Trigger Patterns Reference
| Pattern | Example | Action |
|---|---|---|
| Whole-repo search | "search the entire codebase for all usages of deprecated API" | rlm-search "..." --source . |
| Directory search | "recursively search src/ for logging calls" | --source src/ |
| File search | "use RLM to analyze this 5000-line file" | --source path/to/file.ts |
| Budget limit | "search but cap at 200k tokens" | --budget 200000 |
| Depth limit | "search up to 2 levels deep" | --depth 2 |
| Skip re-prep | "search using the existing prep" | No re-prep if manifest exists |
Behavior
When triggered:
Extract query and source — identify the natural language query and the source path (file or directory). Default source is
.(current directory).Check for existing prep — look for a valid manifest in
.aiwg/rlm-prep/matching the source. Reuse only when the prep index covers every source file, manifest, and chunk. If missing, stale, incomplete, or from an older single-chunk-dropping prep run, rebuild withrlm-prep.Initial fanout (level 1) — dispatch the query across all chunks, up to
--max-parallelsubagents at a time. Collect results with provenance.Check synthesis fit — measure the total size of all level-1 results. If they fit in a single context window, synthesize directly (base case). If not, recurse.
Recursive reduction — chunk the level-1 results into a new set of chunks and fan out again. Each level-N subagent synthesizes the results from one batch of level-(N-1) answers. Repeat until the output fits in one window.
Final synthesis — produce a single coherent answer from the last reduction level. Include provenance: trace each claim back to a source file and line range.
Cost summary — report total tokens consumed, number of subagents launched, recursion depth reached, and USD cost estimate.
Recursion Diagram
Level 0 (root query)
└── Level 1 fanout: N subagents (one per chunk)
├── chunk-0001 → answer fragment A
├── chunk-0002 → answer fragment B
├── chunk-0003 → (no match)
└── chunk-0004 → answer fragment C
If A + B + C fit in one window:
└── Synthesize → Final Answer ✓
If A + B + C do NOT fit:
Level 2 fanout: chunk the level-1 results
├── [A + B] → synthesis fragment 1
└── [C] → synthesis fragment 2
└── Synthesize fragments 1 + 2 → Final Answer ✓
The default --depth 3 means the pipeline will recurse at most 3 times before forcing synthesis even if results are large.
Final Answer Format
RLM Search Complete
Query: "Where is rate limiting implemented?"
Source: src/ | Chunks: 47 | Depth reached: 1 | Subagents: 14
Answer:
Rate limiting is implemented in three places:
1. **API gateway level** — `src/gateway/rate-limit.ts` (lines 12-45) applies
a sliding window limiter using Redis. Limits are configured per route in
`config/rate-limits.yaml`.
2. **Auth service** — `src/auth/middleware.ts` (lines 88-102) imposes a
per-IP limit of 10 login attempts per minute using an in-memory store.
3. **WebSocket connections** — `src/realtime/server.ts` (lines 231-248)
limits new connections per second to prevent connection floods.
Cost summary: 47 subagents, 184,320 tokens (~$0.18), 1 synthesis pass
Parameters
<query>— Natural language question or task (required)--source <file|dir>— Source content to search (default:.)--depth N— Maximum recursion depth before forcing synthesis (default:3)--max-parallel N— Max parallel subagents per level (default:4, bounded by context budget). Alias--parallelis also accepted by the CLI.--budget N— Token budget for the entire operation (default:500000)
Prep coverage note: files that fit within one chunk are still written to a manifest and included in the search plan. Existing prep indexes are validated before reuse so older partial indexes are rebuilt automatically.
Examples
Example 1: Whole-codebase search
User: "search the entire codebase for where authentication tokens are validated"
Action: Check for existing prep of ., fanout across all chunks, synthesize.
Response:
RLM Search Complete
Query: "where are authentication tokens validated?"
Source: .
Установить rlm-search в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл rlm-search?
Run the full Recursive Language Model pipeline — prep, fan out across chunks, and recursively synthesize until results fit one context window
Как установить скилл rlm-search?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rlm-search запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic