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本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
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
$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. 下の青いボタンを押して
asciinema-record.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
asciinema-recordフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
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ファイルを上書きしないでください
ワークフロー
-
キャストファイル名を導き出す — タスクの説明から、デモされている内容を識別する簡潔な snake_case 名を選択します (例: "ディレクトリリストを表示" →
ls、"依存関係をインストール" →npm_install、"テストを実行" →test_run)。出力ファイルは./tmp/<name>.castになります。 -
出力ディレクトリが存在することを確認する — 次を実行します:
mkdir -p ./tmp -
記録を開始する — 出力ファイルをターゲットとする asciinema セッションを起動します:
asciinema rec ./tmp/<name>.castこれにより、記録セッション内にインタラクティブシェルが開きます。
-
開始マーカーを出力する — 記録されたセッション内の最初のコマンドとして、次を実行します:
echo "start here" -
デモンストレーションを実行する — タスクを示すコマンドを実行します。セッションに集中し、長い一時停止や無関係なコマンドは避けてください。
-
終了マーカーを出力する — デモンストレーションが完了したら、次を実行します:
echo "end here" -
記録セッションを終了する — 記録されたシェルを終了します:
exitasciinema は
./tmp/<name>.castを書き込み、閉じます。 -
キャストファイルをトリミングする —
references/trim_cast.pyにある Python スクリプトを使用して、マーカーの外側のすべてを削除し、常にヘッダー (1 行目) を保持します:python3 skills/asciinema-record/references/trim_cast.py ./tmp/<name>.castスクリプトはファイルをインプレースで書き換えます: ヘッダー行 +
start hereおよびend hereマーカー行の間の (排他的な) イベントのみ。 -
GIF をレンダリングする (オプション) — タスクで GIF が必要な場合、または
aggユーティリティが利用可能な場合は、キャストを変換します:agg ./tmp/<name>.cast ./tmp/<name>.gifGIF はキャストファイルと同じベース名を共有します。
注記
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
.castfile without confirmation
Workflow
-
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. -
Ensure the output directory exists — Run:
mkdir -p ./tmp -
Start the recording — Launch an asciinema session targeting the output file:
asciinema rec ./tmp/<name>.castThis opens an interactive shell inside the recording session.
-
Emit the start marker — As the very first command inside the recorded session, run:
echo "start here" -
Perform the demonstration — Run the commands that illustrate the task. Keep the session focused; avoid long pauses or unrelated commands.
-
Emit the end marker — When the demonstration is complete, run:
echo "end here" -
End the recording session — Exit the recorded shell:
exitasciinema writes and closes
./tmp/<name>.cast. -
Trim the cast file — Use the Python script in
references/trim_cast.pyto strip everything outside the markers, always preserving the header (line 1):python3 skills/asciinema-record/references/trim_cast.py ./tmp/<name>.castThe script rewrites the file in-place: header line + only the events between (exclusive of) the
start hereandend heremarker lines. -
Render a GIF (optional) — If the task calls for a GIF or the
aggutility is available, convert the cast:agg ./tmp/<name>.cast ./tmp/<name>.gifThe GIF shares the same base name as the cast file.
Notes
- The
start hereandend herestrings must appear as plainechooutput in the cast; the trim script searches for them as substrings in the event data. - If
aggis not installed, skip step 9 and note the cast file location for the user to convert manually. - The
./tmp/directory should be added to.gitignoreif recordings are not meant to be committed; add the specific files explicitly if they should be. - See
_assets/asciinema/for example.castand.gifreference files.