Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计提醒

asciinema-streaming-backupasciinema 流式备份

Agent Skill

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

总安装

2,076

周安装

84

GitHub Stars

38

下载量

652
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/terrylica/cc-skills --skill asciinema-streaming-backup

简介

asciinema-streaming-backup 用于实时流式备份 asciinema 录制到 GitHub,支持 brotli 归档压缩。

  • 它利用空闲检测实现智能分块,结合 zstd 流式压缩与 GitHub Actions 最终处理。
  • 适用于长期会话保存与团队协作,确保录制数据安全存储与版本追溯。
  • 安装来自 GitHub,需配置 GitHub Token 与 Actions 权限,注意网络与安全策略。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

asciinema-streaming-backup

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.

When to Use This Skill

Use this skill when:

  • Setting up real-time backup of asciinema recordings to GitHub
  • Configuring idle-detection chunking for recordings
  • Creating orphan branch infrastructure for recording storage
  • Integrating GitHub Actions for brotli recompression
Platform: macOS, Linux Isolation: Uses Git orphan branch (separate history, cannot pollute main)

Architecture Overview

┌─────────────────┐     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

Requirements

ComponentRequiredInstallationVersion
asciinema CLIYesbrew install asciinema3.0+ (Rust)
zstdYesbrew install zstdAny
brotliYesbrew install brotliAny
gitYesPre-installed2.20+
gh CLIYesbrew install ghAny
fswatchOptionalbrew install fswatchFor real-time

Workflow Phases

Phase 0: Preflight Validation

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.


Phase 1: GitHub Account Detection

Detect available GitHub accounts from 5 sources (SSH config, SSH keys, gh CLI, mise env, git config) and let user choose which to use.

See Account & Repository Detection for the detection script, scoring logic, and AskUserQuestion flow.


Phase 1.5: Current Repository Detection

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.


Phase 2: Core Configuration

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.


Phase 3: Advanced Configuration

Allow customization of compression and behavior parameters:

ParameterDefaultRange
Idle threshold30s5-300s
zstd level31-22
Brotli level91-11
Auto-pushYesYes/No
Poll interval5s2s, 5s, 10s

See Configuration Reference for all AskUserQuestion sequences.


Phase 4: Orphan Branch Setup

Create or configure the orphan branch with GitHub Actions workflow. Checks for existing branch first and offers clone/reset/verify options.

Key actions:

  1. Check if branch exists on remote via git ls-remote
  2. If exists: AskUserQuestion for clone/reset/verify
  3. If new: Create orphan branch, add workflow + directory structure, push

See Setup Scripts for the complete setup-orphan-branch.sh script. See GitHub Workflow for the full recompress.yml Actions workflow.


Phase 5: Local Environment Setup

Configure local directory and generate customized idle-chunker.sh with user parameters embedded from Phase 3.

Key actions:

  1. Clone orphan branch to ~/asciinema_recordings/<repo>/
  2. Generate idle-chunker.sh with embedded configuration
  3. Display configuration summary and usage instructions

See Setup Scripts for local setup scripts. See Idle Chunker for the complete chunker implementation.


Phase 6: Autonomous Validation

Claude executes 8 tests autonomously, displaying formatted results. Only 2 tests require user action (recording test, chunker live test).

Test CategoryCountAutonomous?
Tool preflight5Yes
Compression round-trip3Yes
Repository validation4Yes
GitHub Actions trigger1Yes
Recording test1No (USER)
Chunker live test1No (USER)

See Autonomous Validation for the complete validation script, user-required test flows, and troubleshooting table.


Quick Start

First-Time Setup

/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="git@github.com:YOUR/REPO.git"
./setup-orphan-branch.sh "$REPO"

# 3. Validate setup
./validate-setup.sh "$HOME/asciinema_recordings/REPO"
PREFLIGHT_EOF

Recording Session

/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

Key Design Decisions

DecisionRationale
zstd for streamingSupports frame concatenation (brotli doesn't)
brotli for archivalBest compression ratio (~300x for.cast files)
Orphan branchComplete isolation, can't pollute main history
Idle-based chunkingSemantic breakpoints, not mid-output splits
Shallow cloneMinimal disk usage, can't accidentally access main
30s idle thresholdBalances chunk frequency vs semantic completeness

Troubleshooting

See Troubleshooting Guide for common issues and fixes.


Post-Change Checklist

After modifying this skill:

  1. Orphan branch creation scripts use heredoc wrapper
  2. All bash blocks compatible with zsh (no declare -A, no grep -P)
  3. GitHub Actions workflow validates brotli recompression
  4. Idle chunker handles both macOS and Linux stat syntax
  5. Detection flow outputs parseable key=value format
  6. References validate links to external documentation

Reference Documentation

Post-Execution Reflection

After this skill completes, reflect before closing the task:

  1. Locate yourself. — Find this SKILL.md's canonical path before editing.
  2. What failed? — Fix the instruction that caused it.
  3. What worked better than expected? — Promote to recommended practice.
  4. What drifted? — Fix any script, reference, or dependency that no longer matches reality.
  5. Log it. — Evolution-log entry with trigger, fix, and evidence.

Do NOT defer. The next invocation inherits whatever you leave behind.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

Claude Code

30.96%
按下载量换算202

OpenCode

22.77%
按下载量换算148

Antigravity

19.64%
按下载量换算128

Gemini CLI

11.61%
按下载量换算76

windsurf

7.77%
按下载量换算51

trae

3.29%
按下载量换算21

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/terrylica/cc-skills --skill asciinema-streaming-backup;npx skills add terrylica/cc-skills --skill "asciinema-streaming-backup" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills