asciinema-cast-format

Parse asciinema v3 cast NDJSON files into header metadata and event streams.

62|10|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/terrylica/cc-skills --skill asciinema-cast-format
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: asciinema-cast-format
Source: https://github.com/terrylica/cc-skills/tree/main/plugins/asciinema-tools/skills/asciinema-cast-format
Command: npx skills add https://github.com/terrylica/cc-skills --skill asciinema-cast-format

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill documents the v3 NDJSON .cast format used by asciinema, enabling developers to read, parse, and validate casts without guessing the structure.

Core Features & Use Cases

  • Format Reference: Clarifies header fields and event codes for parsing.
  • Parsing Guidance: Provides command-line and scripting tips to extract data.
  • Educational Utility: Helps new team members learn the format quickly.

Quick Start

Review the header and event code definitions in the cast file to understand how to parse recordings.

Frequently Asked Questions about asciinema-cast-format

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

FAQPage Schema
How do I parse asciinema cast files to extract header and event data?

Asciinema v3 cast files are NDJSON format with a JSON header line followed by event lines. Parse the first line to extract metadata (version, width, height, timestamp, duration, title, env, theme), then iterate through remaining lines to decode event codes (o for output, i for input, m for metadata, r for resize) with their associated data payloads.

What fields does an asciinema cast header contain?

The cast header JSON includes version, width, height, timestamp, duration, title, env (environment variables), and theme. These fields describe the recording environment, dimensions, timing, and playback settings needed to interpret the event stream correctly.

Can I use cast files for documentation and tooling integration?

Yes. Cast files work across Linux, macOS, and Windows for documentation parsing, playback analysis, and tooling integration. The structured NDJSON format enables streaming large recordings, extracting specific events, and converting or validating casts without external dependencies.

What are the event codes in asciinema cast format?

Asciinema cast events use four codes: 'o' (output—terminal data), 'i' (input—user input), 'm' (metadata—custom key-value pairs), and 'r' (resize—terminal dimension changes). Each event includes a timestamp and payload specific to its code.

How do I handle large asciinema cast files?

Process cast files line-by-line using streaming parsers to avoid loading entire NDJSON into memory. Parse the header once, then iterate through events, filtering or converting only the data you need for analysis, playback, or export workflows.

What's the difference between asciinema cast format versions?

This Skill documents v3 cast format specifically. The version field in the header identifies the format version, enabling parsers to handle format variations and ensure compatibility across recording and playback tools.