Streams asciinema terminal recordings to a GitHub orphan branch with zstd compression and brotli archival via GitHub Actions. Uses idle-detection for intelligent chunking.
Ships in asciinema-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Complete system for streaming asciinema recordings to GitHub with automatic brotli archival. Uses idle-detection for intelligent chunking, zstd for concatenatable streaming compression, and GitHub Actions for final brotli recompression.
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.
Use this skill when:
Platform: macOS, Linux Isolation: Uses Git orphan branch (separate history, cannot pollute main)
┌─────────────────┐ zstd chunks ┌─────────────────┐ Actions ┌─────────────────┐
│ asciinema rec │ ──────────────────▶ │ GitHub Orphan │ ───────────────▶ │ brotli archive │
│ + idle-chunker │ (concatenatable) │ gh-recordings │ │ (300x compress)│
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │
│ Idle ≥30s triggers chunk │ Separate history
▼ │ Cannot PR to main
~/asciinema_recordings/ ▼
└── repo-name/ .github/workflows/
└── chunks/*.zst └── recompress.yml
| Component | Required | Installation | Version |
|---|---|---|---|
| asciinema CLI | Yes | brew install asciinema | 3.0+ (Rust) |
| zstd | Yes | brew install zstd | Any |
| brotli | Yes | brew install brotli | Any |
| git | Yes | Pre-installed | 2.20+ |
| gh CLI | Yes | brew install gh | Any |
| fswatch | Optional | brew install fswatch | For real-time |
Verify all tools installed, offer self-correction if missing. Run the preflight check script, then AskUserQuestion to offer installation for missing tools.
See Setup Scripts for the complete preflight-check.sh script.
Self-Correction: If tools are missing, generate installation command and offer to run it.
Detect available GitHub accounts from 4 sources (SSH config, SSH keys, gh CLI, git config) and let user choose which to use.
See Account & Repository Detection for the detection script, scoring logic, and AskUserQuestion flow.
Detect current git repository context (CURRENT_REPO_OWNER, CURRENT_REPO_NAME, DETECTED_FROM) to provide intelligent defaults for Phase 2.
See Account & Repository Detection for the detection script.
Gather essential configuration: repository URL (with auto-detection from Phase 1.5), recording directory, and branch name.
See Configuration Reference for all AskUserQuestion sequences and URL normalization logic.
Allow customization of compression and behavior parameters:
| Parameter | Default | Range |
|---|---|---|
| Idle threshold | 30s | 5-300s |
| zstd level | 3 | 1-22 |
| Brotli level | 9 | 1-11 |
| Auto-push | Yes | Yes/No |
| Poll interval | 5s | 2s, 5s, 10s |
See Configuration Reference for all AskUserQuestion sequences.
Create or configure the orphan branch with GitHub Actions workflow. Checks for existing branch first and offers clone/reset/verify options.
Key actions:
git ls-remoteSee Setup Scripts for the complete setup-orphan-branch.sh script.
See GitHub Workflow for the full recompress.yml Actions workflow.
Configure local directory and generate customized idle-chunker.sh with user parameters embedded from Phase 3.
Key actions:
~/asciinema_recordings/<repo>/idle-chunker.sh with embedded configurationSee Setup Scripts for local setup scripts. See Idle Chunker for the complete chunker implementation.
Claude executes 8 tests autonomously, displaying formatted results. Only 2 tests require user action (recording test, chunker live test).
| Test Category | Count | Autonomous? |
|---|---|---|
| Tool preflight | 5 | Yes |
| Compression round-trip | 3 | Yes |
| Repository validation | 4 | Yes |
| GitHub Actions trigger | 1 | Yes |
| Recording test | 1 | No (USER) |
| Chunker live test | 1 | No (USER) |
See Autonomous Validation for the complete validation script, user-required test flows, and troubleshooting table.
/usr/bin/env bash << 'PREFLIGHT_EOF'
# 1. Check requirements
for tool in asciinema zstd brotli git gh; do
command -v "$tool" &>/dev/null && echo "$tool: OK" || echo "$tool: MISSING"
done
# 2. Create orphan branch (replace with your repo)
REPO="[email protected]:YOUR/REPO.git"
./setup-orphan-branch.sh "$REPO"
# 3. Validate setup
./validate-setup.sh "$HOME/asciinema_recordings/REPO"
PREFLIGHT_EOF
/usr/bin/env bash << 'SKILL_SCRIPT_EOF'
# Terminal 1: Start recording
WORKSPACE=$(basename "$PWD")
asciinema rec $PWD/tmp/${WORKSPACE}_$(date +%Y-%m-%d_%H-%M).cast
# Terminal 2: Start idle-chunker
~/asciinema_recordings/REPO/idle-chunker.sh $PWD/tmp/${WORKSPACE}_*.cast
SKILL_SCRIPT_EOF
| Decision | Rationale |
|---|---|
| zstd for streaming | Supports frame concatenation (brotli doesn't) |
| brotli for archival | Best compression ratio (~300x for .cast files) |
| Orphan branch | Complete isolation, can't pollute main history |
| Idle-based chunking | Semantic breakpoints, not mid-output splits |
| Shallow clone | Minimal disk usage, can't accidentally access main |
| 30s idle threshold | Balances chunk frequency vs semantic completeness |
See Troubleshooting Guide for common issues and fixes.
After modifying this skill:
After this skill completes, reflect before closing the task:
Do NOT defer. The next invocation inherits whatever you leave behind.
references/account-detection.md (opens in a new tab)references/autonomous-validation.md (opens in a new tab)references/configuration-reference.md (opens in a new tab)references/evolution-log.md (opens in a new tab)references/github-workflow.md (opens in a new tab)references/idle-chunker.md (opens in a new tab)references/setup-scripts.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/asciinema-tools:asciinema-streaming-backupfrom asciinema-tools
npx claudepluginhub terrylica/cc-skills --plugin asciinema-tools24 skills in this plugin
/analyzeSemantic analysis of converted recordings. TRIGGERS - analyze cast, keyword extraction, find patterns./asciinema-analyzerSemantic analysis of asciinema recordings. TRIGGERS - analyze cast, keyword extraction, find patterns in recordings./asciinema-cast-formatAsciinema v3 .cast file format reference. TRIGGERS - cast format, asciicast spec, event codes, parse cast file.Other plugins' skills for the same job