rolldown-repl

Encode and decode rolldown REPL share URLs containing base64 zlib-compressed source files.

13.9k|1.0k|Updated Sep 18, 2023
One-click install
npx skills add https://github.com/rolldown/rolldown --skill rolldown-repl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rolldown-repl
Source: https://github.com/rolldown/rolldown/tree/main/.claude/skills/rolldown-repl
Command: npx skills add https://github.com/rolldown/rolldown --skill rolldown-repl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Rolldown REPL share links store all state (source files and rolldown version) in the URL hash as base64(zlib(JSON)), which browsers never send to a server, so fetching the URL returns an empty shell. This Skill decodes those hashes locally to recover the actual reproduction files, and encodes local source directories back into shareable REPL URLs.

Core Features & Use Cases

  • Decode REPL URLs: Extract the file list, sizes, and rolldown version from any repl.rolldown.rs/#... link, optionally writing files to disk with --write.
  • Encode local directories: Turn a source directory or integration-test fixture into a shareable REPL URL, with automatic _config.json translation into a rolldown.config.ts.
  • Use Case: A GitHub issue reports a rolldown bug with a REPL link as the minimal reproduction. Decode the URL to a temp directory, note the pinned rolldown version, reproduce the bug locally, then encode your own fixture back into a REPL URL to attach to the issue or PR.

Quick Start

Decode this rolldown REPL URL and show me the source files and version it contains.

Frequently Asked Questions about rolldown-repl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decode a rolldown REPL share URL?

Run the bundled decode script with Node: `node decode.mjs '<full-url>'`. It prints a JSON summary of the version and files, and with `--write <dir>` it writes each source file to disk. Quote the URL so the shell does not strip the `#` hash.

How do I create a rolldown REPL link from local files?

Run `node encode.mjs <dir>` to walk a directory and print a shareable REPL URL. Use `--entry <file>` to mark entry files, `--version <v>` to pin a rolldown version, and `--variant <name>` to select a config variant from `_config.json`.

Does the rolldown REPL encoder support _config.json fixtures?

Yes. The encoder reads a fixture's `_config.json`, translates the flattened BundlerOptions into a generated `rolldown.config.ts` with output options nested under `output`, and auto-marks entries declared in `config.input`. Plugins cannot be serialized and are flagged with a warning.

Why does decoding a REPL URL fail with Invalid base64?

The Invalid base64 error means the URL was truncated when copied, so the hash payload is incomplete. Ask the user to repaste the full URL including everything after the `#` character.

Can I decode old rolldown REPL share links?

Yes. The decoder handles both the modern zlib-compressed format (identified by the `\x78\xDA` header) and the legacy `decodeURIComponent(escape(...))` format used by older share links. The encoder always emits the modern format.