rlm-prep
БесплатноБез исполняемых скриптовНе проверенPrepare source content for RLM processing by discovering files, chunking each one, and writing a unified searchable manifest
от jmagly★ 233 звезды на GitHubОб этом скилле
RLM Prep
Prepare source content for RLM processing in one shot: discovers files, chunks each one, builds a searchable index, and writes a unified manifest.json. Run this once on a codebase or document set; then use rlm-search or fanout against the output without re-preparing.
Triggers
Alternate expressions and non-obvious activations:
- "index this codebase for search" → rlm-prep on directory
- "get this ready for RLM" → rlm-prep with defaults
- "prep the docs folder" → rlm-prep on
docs/ - "build a chunk index" → rlm-prep with index output
Trigger Patterns Reference
| Pattern | Example | Action |
|---|---|---|
| Prep a directory | "prepare src/ for RLM" | rlm-prep src/ |
| Prep a single file | "prep this file for recursive search" | rlm-prep path/to/file.ts |
| Strategy override | "prep with fixed-count chunking" | --strategy fixed-count |
| Size override | "prep in 100-line chunks" | --size 100 |
| Custom output | "prep into tmp/rlm/" | --output tmp/rlm/ |
| Force refresh | "re-prep even if already done" | --force |
| Check status | "is this codebase already prepped?" | Inspect output dir for manifest |
Behavior
When triggered:
Resolve source — determine whether the input is a single file or a directory. For directories, discover all supported file types (
.ts,.js,.py,.go,.md,.txt,.yaml,.json,.sql, and others). Respect.gitignorepatterns.Check for existing prep — look for a manifest in the output directory. If found and
--forceis not set, report that prep already exists and offer to use it or re-run.Chunk each file — apply the selected strategy per file. Each file produces its own subdirectory under
chunks/, named after the file path (slashes replaced with underscores).Build index — construct a searchable index (
index.json) with:- Chunk IDs mapped to file, line range, and boundary label
- Content summaries (first non-blank line of each chunk)
- File-level metadata (language, size, last-modified)
Write unified manifest — a single
manifest.jsonat the output root that references all chunks across all files. This is whatfanoutandrlm-searchconsume.Report result — print file count, total chunk count, index size, and output path.
Output Directory Structure
.aiwg/rlm-prep/<source-hash>/
├── manifest.json # Unified chunk manifest (all files)
├── index.json # Searchable index with summaries
├── meta.json # Source path, strategy, timestamp
└── chunks/
├── src__auth__middleware.ts/
│ ├── chunk-0001.txt
│ ├── chunk-0002.txt
│ └── chunk-0003.txt
├── src__auth__jwt.ts/
│ ├── chunk-0001.txt
│ └── chunk-0002.txt
└── src__core__parser.ts/
├── chunk-0001.txt
├── chunk-0002.txt
├── chunk-0003.txt
└── chunk-0004.txt
Manifest Format (multi-file)
{
"source": "src/auth/",
"source_hash": "sha256:a1b2c3d4...",
"strategy": "semantic-boundary",
"chunk_size": 200,
"overlap": 20,
"created_at": "2026-04-01T14:23:00Z",
"files": 12,
"total_chunks": 47,
"output_dir": ".aiwg/rlm-prep/a1b2c3d4/",
"chunks": [
{
"id": "src__auth__middleware.ts/chunk-0001",
"file_source": "src/auth/middleware.ts",
"chunk_file": ".aiwg/rlm-prep/a1b2c3d4/chunks/src__auth__middleware.ts/chunk-0001.txt",
"start_line": 1,
"end_line": 218,
"boundary_label": "validateToken()"
}
]
}
Parameters
<file|dir>— Source file or directory to prepare (required)--output <dir>— Output directory (default:.aiwg/rlm-prep/<source-hash>/)--strategy semantic-boundary|fixed-count|adaptive— Chunking strategy (default:semantic-boundary)--size N— Target chunk size in lines (default:200)--overlap N— Overlap lines between adjacent chunks (default:20)--force— Re-prep even if a manifest already exists
Examples
Example 1: Prep a source directory
User: "prepare src/ for RLM processing"
Action:
aiwg rlm-prep src/
Response: "Prepped src/ for RLM. 12 files, 47 chunks. Strategy: semantic-boundary (200 lines, 20 overlap). Manifest: .aiwg/rlm-prep/a1b2c3d4/manifest.json"
Example 2: Prep with smaller chunks for a dense codebase
User: "index the entire repo for RLM, use 100-line chunks"
Action:
aiwg rlm-prep . --size 100 --overlap 15
Response: "Prepped . for RLM. 84 files, 312 chunks. Strategy: semantic-boundary (100 lines, 15 overlap). Manifest: .aiwg/rlm-prep/b3c4d5e6/manifest.json"
Example 3: Prep a documentation set
User: "get the docs folder ready for recursive search"
Action:
aiwg rlm-prep docs/ --strategy fixed-count --size 150
Response: "Prepped docs/ for RLM. 23 files, 89 chunks. Strategy: fixed-count (150 lines, 20 overlap). Manifest: `.aiwg/rlm-prep/
Установить rlm-prep в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл rlm-prep?
Prepare source content for RLM processing by discovering files, chunking each one, and writing a unified searchable manifest
Как установить скилл rlm-prep?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rlm-prep запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic