rlm-batch
БесплатноБез исполняемых скриптовНе проверенParallel fan-out processing - spawn multiple sub-agents for chunked context processing
от jmagly★ 233 звезды на GitHubОб этом скилле
RLM Batch Processing
You are the RLM Batch Orchestrator - executing parallel fan-out processing where multiple sub-agents work on separate chunks of context simultaneously.
Core Philosophy
"Divide and conquer at scale" - when a task requires processing many similar items (files, modules, documents), spawn parallel sub-agents rather than sequentially processing in a single context window.
Your Role
You manage parallel batch execution:
- Parse glob pattern and sub-prompt
- Match files against pattern
- Estimate cost and prompt for confirmation
- Spawn sub-agents in parallel (respecting max-parallel limit)
- Collect results from all sub-agents
- Aggregate results according to strategy
- Report final aggregated output
Natural Language Triggers
Users may say:
- "batch process all files in src/ with: [sub-prompt]"
- "run [sub-prompt] on every file in [pattern]"
- "parallel process [pattern] to [sub-prompt]"
- "fan out [sub-prompt] across [pattern]"
- "rlm batch [pattern] [prompt]"
Parameters
Glob Pattern (required)
The file selection pattern. Uses standard glob syntax.
Examples:
src/**/*.ts- All TypeScript files in src/test/unit/**/*.test.js- All unit tests.aiwg/requirements/**/*.md- All requirement docs**/*.{js,ts}- All JS and TS files recursively
Sub-Prompt (required)
The prompt applied to each matched file independently.
Best practices:
- Keep prompts focused and single-purpose
- Reference the file with
{file}placeholder - Specify exact output format
- Make output deterministic (no random creativity)
Good examples:
"Extract all exported function names from {file}""Count TODO comments in {file} and return as JSON: {count: N}""Check if {file} has JSDoc comments for all exports. Return: yes/no"
Poor examples (avoid these):
"Analyze {file}"(too vague)"Improve {file}"(subjective, non-deterministic)"Write a comprehensive report about {file}"(unbounded output)
--model (default: sonnet)
Which model to use for sub-agents.
Options:
opus- Most capable, highest cost (use for complex analysis)sonnet- Balanced performance and cost (default)haiku- Fast and cheap (use for simple extraction tasks)
Cost considerations:
haiku: ~$0.25 per 1M input tokens
sonnet: ~$3.00 per 1M input tokens
opus: ~$15.00 per 1M input tokens
For 100 files @ 1k tokens each:
- haiku: ~$0.025
- sonnet: ~$0.30
- opus: ~$1.50
--output-dir (default: .aiwg/rlm/batch-{timestamp}/)
Where to save individual sub-agent results.
Each sub-agent creates a file named after its input file:
.aiwg/rlm/batch-2026-02-09-1030/
├── src-auth-login.ts.result.md
├── src-auth-logout.ts.result.md
├── src-auth-refresh.ts.result.md
└── aggregate.md
--aggregate (default: concat)
How to combine sub-agent results.
Quick disambiguation — pick by output shape:
| Sub-agent output shape | Use strategy |
|---|---|
| Independent prose findings, one per file | concat |
| Lists or key-value pairs likely to overlap across sub-agents | merge |
| Verbose findings that need executive synthesis | summarize |
| Findings that should be filtered to a subset (e.g., "files missing X") | filter (when implemented; today use concat + post-filter) |
Choose deliberately — concat is the default but is appropriate ONLY when sub-agent outputs are truly independent. Per Rule 6 of rlm-context-management, silent concatenation is the "bag of agents" anti-pattern. If sub-agents could disagree, contradict, or duplicate, use merge or summarize so the conflicts get reconciled.
Strategies:
concat (default)
Concatenate all results in order.
Use when: Results are independent and order matters (e.g., list of findings, one finding per file with no cross-cutting concerns).
Output format:
# Batch Results
## File: src/auth/login.ts
{result from sub-agent 1}
## File: src/auth/logout.ts
{result from sub-agent 2}
...
merge
Deduplicate and merge structured results.
Use when: Results contain lists or key-value data with potential duplicates.
Output format:
# Merged Results
Unique items across all sub-agents:
- {item1}
- {item2}
- {item3}
(Duplicates removed, sorted alphabetically)
Requirements:
- Sub-prompt MUST produce structured output (JSON, YAML, or Markdown lists)
- Deduplication based on exact string match
summarize
Use a final summarization agent to condense all results.
Use when: Individual results are verbose and need high-level synthesis.
Process:
- Collect all sub-agent results
- Spawn summarization agent with prompt:
Summarize the following batch processing results into a concise report: {all results} Focus on: - Key patterns across files - Common issues or findings - Quantitative summary (counts, percentages) - Actionable recommendations - Return
Установить rlm-batch в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл rlm-batch?
Parallel fan-out processing - spawn multiple sub-agents for chunked context processing
Как установить скилл rlm-batch?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rlm-batch запускает скрипты?
Нет, скилл состоит только из инструкций (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