Communitygithub.com

k8s-animate

3Blue1Brown スタイルの Manim 動画で Kubernetes のプロセスを公式アイコンを使って解説します。ナレーション付き/無しを選択可能。ユーザーが /k8s-animate と入力した時のみ動作します。

k8s-animate とは?

k8s-animate は、3Blue1Brown スタイルの高品質なアニメーション動画を生成する AI エージェントスキルです。Kubernetes の内部プロセス(例:kubeadm によるノード参加や Pod スケジューリングなど)を、公式 Kubernetes コミュニティアイコン(CC-BY-4.0)と Manim アニメーションライブラリを用いて視覚的に解説します。ユーザーが /k8s-animate とタイプした時のみ手動で起動され、自律的には動作しません。ナレーションはオフラインの Kokoro TTS(無料、Apache-2.0)がデフォルトで有効で、無音の動画も選択可能です。セットアップ用スクリプトが macOS、Arch Linux、Debian/Ubuntu に対応しており、初回実行時に必要な依存関係を自動的に確認・インストールします。スキルはストーリーボードの提案、承認、レンダリングというワークフローで進行し、最終的に MP4 ファイルが出力されます。参照実装として node_join.py が同梱されており、カラーパレットやヘルパークラスが標準化されています。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/wielenmaker/k8s-animate/tree/HEAD

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Create a Kubernetes explainer video

The output is an MP4 for a lecture: graphical, animated, almost no text, no subtitles.

Argument voiceover=on|off (default on). on narrates with the local Kokoro TTS voice; off makes a silent video and never installs or loads Kokoro.

Argument setup: install only, no video. Do the "Check the environment" step below, then stop.

Two folders. SKILL is the skill's base directory (the folder holding this file). It holds .venv/, icons/, references/ and scripts/. OUT is <the user's working directory>/<topic>, created per video. Scene file, media/ and the final MP4 live in OUT, never in SKILL (updating or removing the skill deletes SKILL). Use absolute paths; do not rely on the current directory.

What ships with this skill

  • icons/: the official Kubernetes community icons (labelled set, CC-BY-4.0). Use only these icons for Kubernetes components and resources. Never redraw, recolor into something else, or substitute a generic shape for a component that has an icon here. For concepts with no icon (CSR, certificate, packet, iptables rules), use simple shapes like Doc and Packet in the reference.
  • references/node_join.py: a complete, approved example (kubeadm node join). Copy its style, palette and helper classes.
  • references/kokoro_service.py: Kokoro-82M plugged into manim-voiceover.
  • references/kit.py: shared palette, helpers and the Explainer base scene plus voiced(Scene). New scenes import from it.
  • scripts/setup.sh [voiceover=on|off] [--yes]: reports what is missing and prints the install plan (macOS, Arch, Debian/Ubuntu); installs only with --yes.
filecomponentfilecomponentfilecomponent
apikube-apiserverpodPodcmConfigMap
etcdetcdrsReplicaSetsecretSecret
schedkube-schedulerdeployDeploymentpvPersistentVolume
c-mkube-controller-managerstsStatefulSetpvcPersistentVolumeClaim
c-c-mcloud-controller-managerdsDaemonSetscStorageClass
kubeletkubeletjobJobnsNamespace
k-proxykube-proxycronjobCronJobsaServiceAccount
control-planecontrol plane nodesvcServicerole / c-roleRole / ClusterRole
nodeworker nodeepEndpointsrb / crbRoleBinding / ClusterRoleBinding
hpaHorizontalPodAutoscaleringIngressquotaResourceQuota
crdCustomResourceDefinitionnetpolNetworkPolicylimitsLimitRange

Manim drops the text baked into these SVGs, and api, c-m, sched, kubelet, k-proxy share the same gear glyph. Always label icons with the Icon(name, label) helper.

Workflow

1. Check the environment

Run bash SKILL/scripts/setup.sh voiceover=<on|off>. If it prints Ready., continue. Otherwise it printed what is missing and the plan (first run on this machine): show the plan to the user and ask before installing.

  • On confirmation run it again with --yes. It is slow (torch, system packages), so run it in the background or with a long timeout.
  • If the plan has a sudo line you cannot type the password: give the user the command to run themselves (! bash SKILL/scripts/setup.sh voiceover=<on|off> --yes).
  • Kokoro is free, Apache-2.0 (fine for paid courses), offline and near-commercial quality; if the user does not want it, suggest voiceover=off.

2. Agree the storyboard

Ask for the topic if it wasn't given. Then propose a storyboard in chat and wait for approval, because rendering takes minutes:

  • 6–12 beats, each with: a 1–3 word step label, what moves on screen, one spoken sentence.
  • Story told through motion: icons in boxes, packets on arcs, color changes for state. Only short labels on screen.
  • Facts must be correct for the current Kubernetes version. If unsure about a detail, say so instead of guessing.

3. Write the scene

Model it on references/node_join.py:

  • One NARRATION dict (beat → sentence) as a class attribute, one method per beat; Explainer.construct loops them inside with self.voice(line).
  • Write OUT/<topic>.py with from references.kit import *, subclass Explainer, and add <Name>Voiced = voiced(<Name>) at the bottom. Beats are def beat(self, i). The silent <Name> and the narrated <Name>Voiced come from the same code.
  • Never name the scene file after a stdlib module (operator.py breaks Python's imports).
  • Reuse the palette (dark #0b1220, k8s blue #326ce5, gold token, teal network, amber NotReady, green Ready) and the helpers Icon, Packet, Doc, Step, Pill, send.
  • Small classes, minimal code.
  • Spell terms the way they're spoken in the narration: kubeadm → "kube admin", etcd → "et-cee-dee", kubectl → "kube control".

4. Preview, then render

Run manim as PYTHONPATH=SKILL SKILL/.venv/bin/manim --media_dir OUT/media ... from OUT.

  1. Preview: ... -ql <topic>.py <Name>, then extract ~8 frames with ffmpeg into one contact sheet and look at it once. Fix overlaps, clipped labels, and dim or unreadable text.
  2. Render final: ... -qh <topic>.py <Name> when voiceover=off, or <Name>Voiced when voiceover=on. Copy OUT/media/videos/<topic>/1080p60/<Name>.mp4 to OUT/<topic>.mp4.
  3. With voiceover=on, confirm the MP4 has an audio stream (ffprobe).
  4. Open the MP4 when you finish (open on macOS; xdg-open on Linux, or if there is no display just print the path).

Report the absolute MP4 path, the duration, anything to listen for (pronunciation of unusual terms) and remind the user the icons need the credit "Kubernetes community icons, CC BY 4.0" (the outro already shows it). Voice options: af_heart (default), am_michael, am_fenrir; pass one as voiced(<Name>, voice="am_michael").

関連スキル