jpskill.com
📦 その他 コミュニティ

asciinema-record

ターミナル操作をasciinemaで記録し、指定した部分だけを切り出して.castファイルとして保存、必要に応じてaggを使ってGIFアニメに変換するSkill。

📜 元の英語説明(参考)

Record a terminal session to a named .cast file using asciinema, trim the recording to marked content, and optionally convert it to a GIF using agg.

🇯🇵 日本人クリエイター向け解説

一言でいうと

ターミナル操作をasciinemaで記録し、指定した部分だけを切り出して.castファイルとして保存、必要に応じてaggを使ってGIFアニメに変換するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o asciinema-record.zip https://jpskill.com/download/9084.zip && unzip -o asciinema-record.zip && rm asciinema-record.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/9084.zip -OutFile "$d\asciinema-record.zip"; Expand-Archive "$d\asciinema-record.zip" -DestinationPath $d -Force; ri "$d\asciinema-record.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して asciinema-record.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → asciinema-record フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Asciinema Record

asciinema を使用して、特定のターミナルセッションを記録し、生の .cast ファイルを start here / end here マーカー間のコンテンツにトリミングし、オプションで agg を使用してアニメーション GIF をレンダリングします。

役割

あなたはターミナル記録、asciinema ワークフロー、および開発者体験ツールに関する専門家です。

  • デモされるタスクから、短く説明的なファイル名を導き出します (例: ファイルリストのデモ → ls.cast)
  • シェルのプリアンブルとティアダウンを取り除き、ビューアが見る必要のあるコンテンツのみを保持することで、クリーンな記録を作成します
  • 記録 → トリミング → (オプションで) GIF レンダリングの完全なパイプラインを処理します
  • 確認なしに既存の .cast ファイルを上書きしないでください

ワークフロー

  1. キャストファイル名を導き出す — タスクの説明から、デモされている内容を識別する簡潔な snake_case 名を選択します (例: "ディレクトリリストを表示" → ls、"依存関係をインストール" → npm_install、"テストを実行" → test_run)。出力ファイルは ./tmp/<name>.cast になります。

  2. 出力ディレクトリが存在することを確認する — 次を実行します:

    mkdir -p ./tmp
  3. 記録を開始する — 出力ファイルをターゲットとする asciinema セッションを起動します:

    asciinema rec ./tmp/<name>.cast

    これにより、記録セッション内にインタラクティブシェルが開きます。

  4. 開始マーカーを出力する — 記録されたセッション内の最初のコマンドとして、次を実行します:

    echo "start here"
  5. デモンストレーションを実行する — タスクを示すコマンドを実行します。セッションに集中し、長い一時停止や無関係なコマンドは避けてください。

  6. 終了マーカーを出力する — デモンストレーションが完了したら、次を実行します:

    echo "end here"
  7. 記録セッションを終了する — 記録されたシェルを終了します:

    exit

    asciinema は ./tmp/<name>.cast を書き込み、閉じます。

  8. キャストファイルをトリミングするreferences/trim_cast.py にある Python スクリプトを使用して、マーカーの外側のすべてを削除し、常にヘッダー (1 行目) を保持します:

    python3 skills/asciinema-record/references/trim_cast.py ./tmp/<name>.cast

    スクリプトはファイルをインプレースで書き換えます: ヘッダー行 + start here および end here マーカー行の間の (排他的な) イベントのみ。

  9. GIF をレンダリングする (オプション) — タスクで GIF が必要な場合、または agg ユーティリティが利用可能な場合は、キャストを変換します:

    agg ./tmp/<name>.cast ./tmp/<name>.gif

    GIF はキャストファイルと同じベース名を共有します。

注記

  • start here および end here 文字列は、キャスト内でプレーンな echo 出力として表示される必要があります。トリムスクリプトは、イベントデータ内のサブストリングとしてそれらを検索します。
  • agg がインストールされていない場合は、ステップ 9 をスキップし、ユーザーが手動で変換できるようにキャストファイルの場所をメモしてください。
  • 記録をコミットしない場合は、./tmp/ ディレクトリを .gitignore に追加する必要があります。特定のファイルを追加する場合は、明示的に追加してください。
  • 例となる .cast および .gif 参照ファイルについては、_assets/asciinema/ を参照してください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Asciinema Record

Record a focused terminal session using asciinema, trim the raw .cast file to the content between start here / end here markers, and optionally render an animated GIF with agg.

Role

You are an expert in terminal recording, asciinema workflows, and developer experience tooling.

  • Derive a short, descriptive filename from the task being demonstrated (e.g. a file-listing demo → ls.cast)
  • Produce clean recordings by stripping shell preamble and teardown, keeping only the content the viewer needs to see
  • Handle the full pipeline: record → trim → (optionally) render GIF
  • Never overwrite an existing .cast file without confirmation

Workflow

  1. Derive the cast filename — From the task description, choose a concise snake_case name that identifies what is being demonstrated (e.g. "show directory listing" → ls, "install dependencies" → npm_install, "run tests" → test_run). The output file will be ./tmp/<name>.cast.

  2. Ensure the output directory exists — Run:

    mkdir -p ./tmp
  3. Start the recording — Launch an asciinema session targeting the output file:

    asciinema rec ./tmp/<name>.cast

    This opens an interactive shell inside the recording session.

  4. Emit the start marker — As the very first command inside the recorded session, run:

    echo "start here"
  5. Perform the demonstration — Run the commands that illustrate the task. Keep the session focused; avoid long pauses or unrelated commands.

  6. Emit the end marker — When the demonstration is complete, run:

    echo "end here"
  7. End the recording session — Exit the recorded shell:

    exit

    asciinema writes and closes ./tmp/<name>.cast.

  8. Trim the cast file — Use the Python script in references/trim_cast.py to strip everything outside the markers, always preserving the header (line 1):

    python3 skills/asciinema-record/references/trim_cast.py ./tmp/<name>.cast

    The script rewrites the file in-place: header line + only the events between (exclusive of) the start here and end here marker lines.

  9. Render a GIF (optional) — If the task calls for a GIF or the agg utility is available, convert the cast:

    agg ./tmp/<name>.cast ./tmp/<name>.gif

    The GIF shares the same base name as the cast file.

Notes

  • The start here and end here strings must appear as plain echo output in the cast; the trim script searches for them as substrings in the event data.
  • If agg is not installed, skip step 9 and note the cast file location for the user to convert manually.
  • The ./tmp/ directory should be added to .gitignore if recordings are not meant to be committed; add the specific files explicitly if they should be.
  • See _assets/asciinema/ for example .cast and .gif reference files.