重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
asciinema-player by terrylica/cc-skills
npx skills add https://github.com/terrylica/cc-skills --skill asciinema-player在专用的 iTerm2 窗口中播放终端会话录制文件 (.cast 文件),并提供完整的播放控制功能。会打开一个干净窗口(绕过默认布局),以实现无干扰观看。
平台 : 仅限 macOS(需要 iTerm2)
在以下情况下使用此技能:
| 方面 | 浏览器播放器 | iTerm2 CLI |
|---|---|---|
| 大文件 (>100MB) | 崩溃(内存限制) | 从磁盘流式读取 |
| 内存使用 | 700MB 文件占用 2-4GB | 极少 |
| 启动时间 | 慢(下载 + 解析) | 即时 |
| 原生体验 | 基于网页 | 真正的终端 |
结论 : 对于大型录制文件,iTerm2 CLI 是唯一可靠的方法。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 组件 | 必需 | 安装方法 |
|---|---|---|
| iTerm2 | 是 | brew install --cask iterm2 |
| asciinema CLI | 是 | brew install asciinema |
注意 : 此技能仅限 macOS。Linux 用户应直接在终端中运行
asciinema play。
重要 : 所有阶段均为强制。请勿跳过任何阶段。在每个决策点必须使用 AskUserQuestion。
目的 : 验证 iTerm2 和 asciinema 是否已安装。
# Check iTerm2 is installed
ls -d /Applications/iTerm.app 2>/dev/null && echo "iTerm2: OK" || echo "iTerm2: MISSING"
# Check asciinema CLI
which asciinema && asciinema --version
强制 AskUserQuestion 如果缺少任何依赖项:
Question: "缺少必需的依赖项。是否安装?"
Header: "设置"
Options:
- Label: "全部安装(推荐)"
Description: "将安装:{缺失项列表: iTerm2, asciinema}"
- Label: "取消"
Description: "中止 - 没有依赖项无法继续"
# Install iTerm2
brew install --cask iterm2
# Install asciinema CLI
brew install asciinema
目的 : 发现并选择要播放的录制文件。
# Search for .cast files in common locations
fd -e cast . --max-depth 5 2>/dev/null | head -20
# Also check common locations
ls -lh ~/scripts/tmp/*.cast 2>/dev/null
ls -lh ~/.local/share/asciinema/*.cast 2>/dev/null
ls -lh ./tmp/*.cast 2>/dev/null
# Get file size and line count for selected file
ls -lh {file_path}
wc -l {file_path}
如果用户直接提供了路径,请确认:
Question: "播放此录制文件?"
Header: "确认"
Options:
- Label: "是,播放 {filename}"
Description: "{size}, {line_count} 个事件"
- Label: "选择其他文件"
Description: "浏览其他录制文件"
如果未提供路径,则发现并呈现选项:
Question: "您想播放哪个录制文件?"
Header: "录制文件"
Options:
- Label: "{filename} ({size})"
Description: "{line_count} 个事件"
- ... (最多 4 个最近的)
目的 : 在启动 iTerm2 之前配置播放选项。
Question: "选择播放速度:"
Header: "速度"
Options:
- Label: "2x (快速)"
Description: "适合审阅,查看所有内容"
- Label: "6x (非常快)"
Description: "快速浏览长会话"
- Label: "16x (超快)"
Description: "快速浏览 700MB+ 文件"
- Label: "自定义"
Description: "输入您自己的速度倍数"
如果选择了"自定义",则询问速度值(使用 Other 选项进行数字输入)。
Question: "选择附加播放选项:"
Header: "选项"
multiSelect: true
Options:
- Label: "限制空闲时间 (2秒)"
Description: "将暂停时间上限设为 2 秒(推荐)"
- Label: "循环播放"
Description: "完成后自动重新开始"
- Label: "调整终端大小"
Description: "使终端尺寸与录制尺寸匹配"
- Label: "在标记处暂停"
Description: "在标记点自动暂停(用于演示)"
目的 : 打开干净的 iTerm2 窗口并开始播放。
根据用户选择构建 asciinema play 命令:
# Example with all options
asciinema play -s 6 -i 2 -l -r /path/to/recording.cast
选项标志:
-s {speed} - 播放速度-i 2 - 空闲时间限制(如果选中)-l - 循环(如果选中)-r - 调整终端大小(如果选中)-m - 在标记处暂停(如果选中)使用 AppleScript 打开一个干净窗口(绕过默认布局):
osascript -e 'tell application "iTerm2"
create window with default profile
tell current window
tell current session
write text "asciinema play -s {speed} {options} {file_path}"
end tell
end tell
end tell'
## 播放已开始
**录制文件:** `{filename}`
**速度:** {speed}x
**选项:** {options_summary}
### 键盘控制
| 按键 | 操作 |
| -------- | --------------------------------- |
| `空格键` | 暂停 / 恢复 |
| `Ctrl+C` | 停止播放 |
| `.` | 步进(暂停时) |
| `]` | 跳转到下一个标记(暂停时) |
### 提示
- 随时按 `空格键` 暂停
- 使用 `.` 逐帧步进
- 完成后按 `Ctrl+C` 退出
在开始前将此模板加载到 TodoWrite 中:
1. [预检] 检查 iTerm2 是否安装
2. [预检] 检查 asciinema CLI 是否安装
3. [预检] AskUserQuestion: 安装缺失的依赖项(如果需要)
4. [预检] 安装依赖项(如果确认)
5. [选择] 获取文件信息(大小,事件数)
6. [选择] AskUserQuestion: 确认文件选择
7. [设置] AskUserQuestion: 播放速度
8. [设置] AskUserQuestion: 附加选项(多选)
9. [启动] 构建 asciinema play 命令
10. [启动] 执行 AppleScript 以打开 iTerm2
11. [启动] 显示控制参考
| 选项 | 标志 | 值 | 描述 |
|---|---|---|---|
| 速度 | -s | 0.5, 1, 2, 6, 16... | 播放速度倍数 |
| 空闲限制 | -i | 秒数 (例如, 2) | 限制空闲/暂停时间 |
| 循环 | -l | (标志) | 连续循环 |
| 调整大小 | -r | (标志) | 使终端与录制尺寸匹配 |
| 标记 | -m | (标志) | 在标记处自动暂停 |
| 静默 | -q | (标志) | 抑制信息消息 |
tell application "iTerm2"
create window with default profile
tell current window
tell current session
write text "your command here"
end tell
end tell
end tell
为何有效 : create window with default profile 会创建一个新窗口,绕过任何已保存的窗口布局。
osascript -e 'tell application "iTerm2"
create window with default profile
tell current window
tell current session
write text "asciinema play -s 6 -i 2 /path/to/file.cast"
end tell
end tell
end tell'
原因 : 从非 TTY 上下文(例如 Claude Code 的 Bash 工具)运行 asciinema play
修复 : 使用 AppleScript 打开一个真正的 iTerm2 窗口(此技能会自动执行此操作)
修复 : 使用速度 AskUserQuestion 选择适当的速度:
原因 : iTerm2 未安装或未授予 AppleScript 权限
修复 :
brew install --cask iterm2CLI 播放器从磁盘流式读取,因此文件大小不会导致内存问题。但是:
-i 2 跳过空闲时间修改此技能后:
每周安装次数
62
仓库
GitHub 星标数
24
首次出现
2026年1月24日
安全审计
安装于
opencode58
gemini-cli57
claude-code57
codex56
github-copilot55
cursor55
Play terminal session recordings (.cast files) in a dedicated iTerm2 window with full playback controls. Opens a clean window (bypasses default arrangements) for distraction-free viewing.
Platform : macOS only (requires iTerm2)
Use this skill when:
| Aspect | Browser Player | iTerm2 CLI |
|---|---|---|
| Large files (>100MB) | Crashes (memory limit) | Streams from disk |
| Memory usage | 2-4GB for 700MB file | Minimal |
| Startup time | Slow (download + parse) | Instant |
| Native feel | Web-based | True terminal |
Decision : iTerm2 CLI is the only reliable method for large recordings.
| Component | Required | Installation |
|---|---|---|
| iTerm2 | Yes | brew install --cask iterm2 |
| asciinema CLI | Yes | brew install asciinema |
Note : This skill is macOS-only. Linux users should run
asciinema playdirectly in their terminal.
IMPORTANT : All phases are MANDATORY. Do NOT skip any phase. AskUserQuestion MUST be used at each decision point.
Purpose : Verify iTerm2 and asciinema are installed.
# Check iTerm2 is installed
ls -d /Applications/iTerm.app 2>/dev/null && echo "iTerm2: OK" || echo "iTerm2: MISSING"
# Check asciinema CLI
which asciinema && asciinema --version
MANDATORY AskUserQuestion if any dependency is missing:
Question: "Required dependencies are missing. Install them?"
Header: "Setup"
Options:
- Label: "Install all (Recommended)"
Description: "Will install: {list of missing: iTerm2, asciinema}"
- Label: "Cancel"
Description: "Abort - cannot proceed without dependencies"
# Install iTerm2
brew install --cask iterm2
# Install asciinema CLI
brew install asciinema
Purpose : Discover and select the recording to play.
# Search for .cast files in common locations
fd -e cast . --max-depth 5 2>/dev/null | head -20
# Also check common locations
ls -lh ~/scripts/tmp/*.cast 2>/dev/null
ls -lh ~/.local/share/asciinema/*.cast 2>/dev/null
ls -lh ./tmp/*.cast 2>/dev/null
# Get file size and line count for selected file
ls -lh {file_path}
wc -l {file_path}
If user provided path directly , confirm:
Question: "Play this recording?"
Header: "Confirm"
Options:
- Label: "Yes, play {filename}"
Description: "{size}, {line_count} events"
- Label: "Choose different file"
Description: "Browse for other recordings"
If no path provided , discover and present options:
Question: "Which recording would you like to play?"
Header: "Recording"
Options:
- Label: "{filename} ({size})"
Description: "{line_count} events"
- ... (up to 4 most recent)
Purpose : Configure playback options before launching iTerm2.
Question: "Select playback speed:"
Header: "Speed"
Options:
- Label: "2x (fast)"
Description: "Good for review, see everything"
- Label: "6x (very fast)"
Description: "Quick scan of long sessions"
- Label: "16x (ultra fast)"
Description: "Rapid skim for 700MB+ files"
- Label: "Custom"
Description: "Enter your own speed multiplier"
If "Custom" selected , ask for speed value (use Other option for numeric input).
Question: "Select additional playback options:"
Header: "Options"
multiSelect: true
Options:
- Label: "Limit idle time (2s)"
Description: "Cap pauses to 2 seconds max (recommended)"
- Label: "Loop playback"
Description: "Restart automatically when finished"
- Label: "Resize terminal"
Description: "Match terminal size to recording dimensions"
- Label: "Pause on markers"
Description: "Auto-pause at marked points (for demos)"
Purpose : Open clean iTerm2 window and start playback.
Construct the asciinema play command based on user selections:
# Example with all options
asciinema play -s 6 -i 2 -l -r /path/to/recording.cast
Option flags:
-s {speed} - Playback speed-i 2 - Idle time limit (if selected)-l - Loop (if selected)-r - Resize terminal (if selected)-m - Pause on markers (if selected)Use AppleScript to open a clean window (bypasses default arrangements):
osascript -e 'tell application "iTerm2"
create window with default profile
tell current window
tell current session
write text "asciinema play -s {speed} {options} {file_path}"
end tell
end tell
end tell'
## Playback Started
**Recording:** `{filename}`
**Speed:** {speed}x
**Options:** {options_summary}
### Keyboard Controls
| Key | Action |
| -------- | --------------------------------- |
| `Space` | Pause / Resume |
| `Ctrl+C` | Stop playback |
| `.` | Step forward (when paused) |
| `]` | Skip to next marker (when paused) |
### Tips
- Press `Space` to pause anytime
- Use `.` to step through frame by frame
- `Ctrl+C` to exit when done
Load this template into TodoWrite before starting :
1. [Preflight] Check iTerm2 installed
2. [Preflight] Check asciinema CLI installed
3. [Preflight] AskUserQuestion: install missing deps (if needed)
4. [Preflight] Install dependencies (if confirmed)
5. [Selection] Get file info (size, events)
6. [Selection] AskUserQuestion: confirm file selection
7. [Settings] AskUserQuestion: playback speed
8. [Settings] AskUserQuestion: additional options (multi-select)
9. [Launch] Build asciinema play command
10. [Launch] Execute AppleScript to open iTerm2
11. [Launch] Display controls reference
| Option | Flag | Values | Description |
|---|---|---|---|
| Speed | -s | 0.5, 1, 2, 6, 16... | Playback speed multiplier |
| Idle limit | -i | seconds (e.g., 2) | Cap idle/pause time |
| Loop | -l | (flag) | Continuous loop |
| Resize | -r | (flag) | Match terminal to recording size |
| Markers |
tell application "iTerm2"
create window with default profile
tell current window
tell current session
write text "your command here"
end tell
end tell
end tell
Why this works : create window with default profile creates a fresh window, bypassing any saved window arrangements.
osascript -e 'tell application "iTerm2"
create window with default profile
tell current window
tell current session
write text "asciinema play -s 6 -i 2 /path/to/file.cast"
end tell
end tell
end tell'
Cause : Running asciinema play from a non-TTY context (e.g., Claude Code's Bash tool)
Fix : Use AppleScript to open a real iTerm2 window (this skill does this automatically)
Fix : Use the speed AskUserQuestion to select appropriate speed:
Cause : iTerm2 not installed or AppleScript permissions not granted
Fix :
brew install --cask iterm2The CLI player streams from disk, so file size doesn't cause memory issues. However:
-i 2 to skip idle timeAfter modifying this skill:
Weekly Installs
62
Repository
GitHub Stars
24
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode58
gemini-cli57
claude-code57
codex56
github-copilot55
cursor55
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
123,700 周安装
-m |
| (flag) |
| Auto-pause at markers |
| Quiet | -q | (flag) | Suppress info messages |