Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计通过

asciinema-cast-formatasciinema 演员表格式

Agent Skill

asciinema-cast-format 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,020

周安装

85

GitHub Stars

38

下载量

707
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:asciinema-cast-format(asciinema 演员表格式)
来源仓库:https://github.com/terrylica/cc-skills
仓库路径:skills/asciinema-cast-format
安装命令:
npx skills add https://github.com/terrylica/cc-skills --skill asciinema-cast-format
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/terrylica/cc-skills --skill asciinema-cast-format

简介

asciinema-cast-format 提供 asciinema v3 .cast 文件格式的官方文档与技术规范。

  • 它用于解析、检查或构建读取/写入 .cast 文件的工具,帮助调试录制与格式错误。
  • 涵盖 NDJSON 头部结构与事件格式说明,适用于开发者理解底层数据流。
  • 作为参考技能,不涉及实际转换或播放,仅提供格式定义与使用指导。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

asciinema-cast-format

Reference documentation for the asciinema v3.cast file format (asciicast v2 specification).

Platform: All platforms (documentation only)
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

When to Use This Skill

Use this skill when:

  • Parsing or inspecting.cast file structure
  • Understanding NDJSON header and event formats
  • Building tools that read or write.cast files
  • Debugging recording issues or format errors
  • Learning the asciicast v2 specification

Format Overview

Asciinema v3 uses NDJSON (Newline Delimited JSON) format:

  • Line 1: Header object with recording metadata
  • Lines 2+: Event arrays with timestamp, type, and data

Header Specification

The first line is a JSON object with these fields:

FieldTypeRequiredDescription
versionintYesFormat version (always 2 for v3 recordings)
widthintYesTerminal width in columns
heightintYesTerminal height in rows
timestampintNoUnix timestamp of recording start
durationfloatNoTotal duration in seconds
titlestringNoRecording title
envobjectNoEnvironment variables (SHELL, TERM)
themeobjectNoTerminal color theme

Example Header

{
  "version": 2,
  "width": 120,
  "height": 40,
  "timestamp": 1703462400,
  "duration": 3600.5,
  "title": "Claude Code Session",
  "env": { "SHELL": "/bin/zsh", "TERM": "xterm-256color" }
}

Event Codes

Each event after the header is a 3-element array:

[timestamp, event_type, data]
CodeNameDescriptionData Format
oOutputTerminal output (stdout)String
iInputTerminal input (stdin)String
mMarkerNamed marker for navigationString (marker name)
rResizeTerminal resize event"WIDTHxHEIGHT"
xExitExtension for custom dataVaries

Event Examples

[0.5, "o", "$ ls -la\r\n"]
[1.2, "o", "total 48\r\n"]
[1.3, "o", "drwxr-xr-x  12 user  staff  384 Dec 24 10:00 .\r\n"]
[5.0, "m", "file-listing-complete"]
[10.5, "r", "80x24"]

Timestamp Behavior

  • Timestamps are relative to recording start (first event is 0.0)
  • Measured in seconds with millisecond precision
  • Used for playback timing and navigation

Calculating Absolute Time

/usr/bin/env bash << 'CALC_TIME_EOF'
HEADER_TIMESTAMP=$(head -1 recording.cast | jq -r '.timestamp')
EVENT_OFFSET=1234.5  # From event array

ABSOLUTE=$(echo "$HEADER_TIMESTAMP + $EVENT_OFFSET" | bc)
date -r "$ABSOLUTE"  # macOS
# date -d "@$ABSOLUTE"  # Linux
CALC_TIME_EOF

Parsing Examples

Extract Header with jq

/usr/bin/env bash << 'HEADER_EOF'
head -1 recording.cast | jq '.'
HEADER_EOF

Get Recording Duration

/usr/bin/env bash << 'DURATION_EOF'
head -1 recording.cast | jq -r '.duration // "unknown"'
DURATION_EOF

Count Events by Type

/usr/bin/env bash << 'COUNT_EOF'
tail -n +2 recording.cast | jq -r '.[1]' | sort | uniq -c
COUNT_EOF

Extract All Output Events

/usr/bin/env bash << 'OUTPUT_EOF'
tail -n +2 recording.cast | jq -r 'select(.[1] == "o") | .[2]'
OUTPUT_EOF

Find Markers

/usr/bin/env bash << 'MARKERS_EOF'
tail -n +2 recording.cast | jq -r 'select(.[1] == "m") | "\(.[0])s: \(.[2])"'
MARKERS_EOF

Get Event at Specific Time

/usr/bin/env bash << 'TIME_EOF'
TARGET_TIME=60  # seconds
tail -n +2 recording.cast | jq -r "select(.[0] >= $TARGET_TIME and .[0] < $((TARGET_TIME + 1))) | .[2]"
TIME_EOF

Large File Considerations

For recordings >100MB:

File SizeLine CountApproach
<100MB<1Mjq streaming works fine
100-500MB1-5MUse --stream flag, consider ripgrep
500MB+5M+Convert to.txt first with asciinema

Memory-Efficient Streaming

/usr/bin/env bash << 'STREAM_EOF'
# Stream process large files
jq --stream -n 'fromstream(1|truncate_stream(inputs))' recording.cast | head -1000
STREAM_EOF

Use asciinema convert

For very large files, convert to plain text first:

asciinema convert -f txt recording.cast recording.txt

This strips ANSI codes and produces clean text (typically 950:1 compression).


TodoWrite Task Template

1. [Reference] Identify .cast file to analyze
2. [Header] Extract and display header metadata
3. [Events] Count events by type (o, i, m, r)
4. [Analysis] Extract relevant event data based on user need
5. [Navigation] Find markers or specific timestamps if needed

Post-Change Checklist

After modifying this skill:

  1. Event code table matches asciinema v2 specification
  2. Parsing examples use heredoc wrapper for bash compatibility
  3. Large file guidance reflects actual performance characteristics
  4. All jq commands tested with sample.cast files

Reference Documentation


Troubleshooting

IssueCauseSolution
jq parse errorInvalid NDJSON in.cast fileCheck each line is valid JSON with jq -c.
Header missing durationRecording in progressDuration added when recording ends
Unknown event typeCustom extension eventCheck for x type events (extension data)
Timestamp out of orderCorrupted fileEvents should be monotonically increasing
Large file jq timeoutFile too big for in-memoryUse --stream flag or convert to.txt first
Markers not foundNo markers in recordingMarkers are optional; not all recordings have them
Wrong version numberOlder cast formatThis skill covers v2 format (asciinema v3+)
Empty output from tailFile has only headerRecording may be empty or single-line

Post-Execution Reflection

After this skill completes, check before closing:

  1. Did the command succeed? — If not, fix the instruction or error table that caused the failure.
  2. Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
  3. Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.

Only update if the issue is real and reproducible — not speculative.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.48%
按下载量换算208

OpenCode

24.28%
按下载量换算172

Antigravity

16.03%
按下载量换算113

Gemini CLI

13.18%
按下载量换算93

windsurf

7.52%
按下载量换算53

trae

3.92%
按下载量换算28

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills