rerun-chunk-processing
What it does
This skill teaches your AI how Rerun's chunk processing works, from reading a source file to writing an optimized recording. It is for developers who convert or clean up robot or sensor data.
When to use it
- ✓When you are writing code to convert an MCAP, Parquet or video file into Rerun format.
- ✓When you want to preprocess an existing .rrd recording.
- ✓When you are porting an old data converter to Rerun's reader and lens pipeline.
Skill link
https://github.com/rerun-io/rerun/blob/main/skills/rerun-chunk-processing/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Write a Rerun pipeline that reads my MCAP file, applies lenses, and saves an optimized recording.”
5 new skills a week. 1 minute to read.
How it works
The skill explains how readers produce data chunks, how streams and lenses change them, and how a final call runs the pipeline and saves the result.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Rerun chunk processing
The pipeline layer between raw data and an RRD: readers produce Chunks,
streams transform them, terminal calls execute. This skill is the generic
mechanics only. Decide the data model first (rerun-data-model), then pick the
importer skill for each source:
| Source | Reader | Skill |
|---|---|---|
| MCAP file (ROS2, protobuf, Foxglove) | McapReader(path).stream() |
rerun-mcap |
| URDF robot model (+ joint states → FK) | UrdfTree.from_file_path(...).stream() |
rerun-urdf |
| Parquet table (trajectories, sensor logs) | ParquetReader(path).stream() |
rerun-parquet |
| mp4 camera video | Mp4Reader(path).stream() |
rerun-mp4 |
| HDF5 file (groups → entities) | Hdf5Reader(path).stream() |
none yet |
| LeRobot dataset directory | built-in importer, then RrdReader |
rerun-lerobot |
| Existing RRD | RrdReader(path) |
here, below |
| Sidecar files (JSON calib, metadata) | Chunk.from_columns + from_iter |
here, below |
The API is rerun.chunk; when
behavior matters, check the installed surface:
python -c "from rerun.chunk import LazyChunkStream; help(LazyChunkStream)".
Decision rule: where does each component come from?
Default: a reader produces the chunks; lenses shape them. Walk this before writing any conversion code — most "build it by hand" instincts are wrong here:
- Source a reader supports? Use the reader's
.stream(); never hand-parse and re-log. MCAP→McapReader, URDF→UrdfTree, parquet→ParquetReader, mp4→Mp4Reader, HDF5→Hdf5Reader, RRD→RrdReader, LeRobot dir→log_file_from_path. - A decoder already emits the archetype? Foxglove gives
Transform3D,Pinhole,VideoStream(real sample bytes) ready-made — pass it through, do not re-derive. Only custom-protobuf topics arrive as<Name>:messageand need a lens (seererun-mcap). - Fix an existing component in place (swapped resolution, recolor, unit
convert)?
MutateLens,output_mode="forward_unmatched". - Derive a new component/entity (FK→
/tf, scalars from a message)?DeriveLens. To scatter one row into N (a joint batch → per-joint/tf), use the two-lens pair: derive the batch withoutput_mode="forward_all"(keeps the originals, e.g. the joint states), then a secondDeriveLenswithscatter=Trueandoutput_mode="drop_unmatched"(emits only the scattered rows). See therobot_data_preprocessingexample. - Genuine sidecar no reader or lens can produce (JSON calibration offsets,
hand-measured extrinsics, external metadata)?
Chunk.from_columns+from_iter. - Finish with
LazyChunkStream.merge(...)→.collect(optimize=OptimizationProfile.OBJECT_STORE)→write_rrd(application_id, recording_id).
Why this order: the pipeline stays lazy, columnar, multithreaded, and
OBJECT_STORE-optimizable. A hand-built row loop or an out-of-lens pa.array
throws all of that away — that is the path we are deliberately avoiding.
Anti-patterns (use a reader + lens instead)
If you are writing the left, stop and use the right:
for-loop building rows/components → a lens with aSelector(...).pipe(...)PyArrow-compute callback.rr.init+rr.logper message for conversion → that is live logging; for ingestion, read with a reader andwrite_rrd.chunk.to_record_batch()+pc.filterthen rebuilding viaChunk.from_columns(row-thinning by hand) →stream.drop(content=...),.split(...), or aMutateLensreturning a filteredpa.array.pa.array/pa.RecordBatch/np.frombufferassembled OUTSIDE a lens → move the transform inside aMutateLens/DeriveLensselector callback.rr.send_columnshand-assembled from a custom parser → use the matching reader; it produces chunks directly.- Parsing MCAP/URDF with a non-Rerun library then re-logging →
McapReader/UrdfTree. Chunk.from_columnsfor data a reader already decodes (Pinholeintrinsics,VideoStream,Transform3Dfrom a transforms topic) → keep it in the reader stream; fix with aMutateLensif neede
FAQ
Should I build chunks by hand?
The skill says to use a reader and lenses when one exists, and to build chunks by hand only for external metadata.
Which readers does it mention?
It lists readers for MCAP, URDF, Parquet, mp4 video and LeRobot datasets, plus RRD files.
Should I model the data first?
Yes. The skill says to decide the data model first, using the rerun-data-model skill.
Details
Original description by the author
Core mechanics of the Rerun Chunk Processing API (rerun.chunk) — LazyChunkStream pipelines, Chunk, lenses (MutateLens/DeriveLens/Selector), RrdReader, writing optimized RRDs. Read BEFORE writing any ingestion/conversion/preprocessing code (convert an MCAP, build a recording from a dataset, preprocess an .rrd, port an old converter): it mandates reader+lens pipelines and steers away from hand-built chunks — no Chunk.from_columns for data a reader/lens can produce, no per-message rr.log, no manual pa.array assembly. Source-specific knowledge lives in the importer skills (rerun-mcap, rerun-urdf,
repo: rerun-io/rerun
Popularity
- GitHub stars
- 12k
- Ranking position
- #11550
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
investigate-puffin
12kLets your agent investigate Puffin profiler recordings (.puffin files), find slow code sections and compare traces from before and after a change.
rerun-blueprint
12kTeaches your agent to change how the Rerun viewer looks by writing a blueprint for a recording or table, including layout, views and hidden columns.
rerun-catalog-queries
12kHelps your agent query a Rerun catalog from Python faster, with tips on round trips, payload size and slow dataset reads.
rerun-data-model
12kHelps your agent map robot or multimodal data onto Rerun's data model, deciding entities, components and static or time-based values first.
Similar skills
gitcrawl
394kLets your agent search a saved archive of GitHub issues and pull requests, group duplicates, and check their current status on GitHub.
slacrawl
394kLets your agent search and count messages in a local Slack archive, check how fresh that archive is, and refresh it when needed.
goplaces
394kHelps your agent search for places, get their details and reviews, and resolve place names using Google Places, with JSON output for scripts.