Communitygithub.com

Video2dsprite (Grok Build専用)

2Dキャラクター静止画から、Grok Buildの画像生成・動画生成機能を使って高密度アニメーションスプライト(連続フレーム、ストリップ、グリッド、GIF)を生成します。

Video2dsprite (Grok Build専用) とは?

このスキルは、Grok Build独自の `image_to_video` ツールを活用し、静止した2Dキャラクターのイラストからスムーズなアニメーションスプライトを生成するためのワークフローを提供します。ユーザーは走る・歩くなどのループモーションを、6~10秒の「その場で動作する」動画として生成し、ffmpegでフレーム抽出、マゼンタクロマキー処理を施した後、指定したフレーム数(8, 16, 24, 48など)で均等サンプリングしてスプライトシート、グリッド、プレビューGIFを出力します。このスキルはCodexやClaudeでは動作せず、Grok Buildでのみ実行可能です。従来の `generate2dsprite` に比べて中間ポーズが滑らかになる反面、画質がソフトになりアイデンティティがずれる可能性があるため、本番プロダクトでは `generate2dsprite` を優先し、動画由来のスプライトは実験的な利用やより滑らかな動きを求めるユーザー向けとされています。

対応✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/NeverSight/learn-skills.dev/tree/HEAD/data/skills-md/0x0funky/agent-sprite-forge/video2dsprite

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

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

ドキュメント

Video2dsprite (Grok Build専用) は何をしますか?

ベースとなる2Dキャラクター画像から、Grok Buildのネイティブ動画ツールを使用して高密度アニメーションスプライトを生成します。

ベース静止画 → image_to_video (その場モーション) → フレーム抽出 → クロマキー → サンプリング/正規化 → ストリップ / グリッド / GIF

プラットフォームゲート(最初にお読みください)

ランタイム対応?
Grok Build (xAI)はい — image_gen / image_edit + image_to_video(または reference_to_video)が必要
Codex / Claude / その他エージェントいいえ — Grokの動画ツールが不足しています。ユーザーにこのスキルはGrok Build専用であることを伝え、代わりに $generate2dsprite を提案してください

ツール一覧に image_to_video がない場合は停止し、説明してください。コードで描いたフレームでモーションを偽装しないでください。

このスキルはオプションの高密度モーションパスです。$generate2dsprite を置き換えるものではありません。

$generate2dsprite を使用する場合…$video2dsprite を使用する場合…
シャープなピクセルシート、固定グリッド、アイデンティティが重要なキャラクターユーザーがより密度の高い中間ポーズや滑らかなループを求める場合
攻撃/キャストボディシート、プロップパック、エンジンアトラス動画出力からの走る/歩く/待機モーションを試す場合
ほとんどのゲームスプライトのプロダクションデフォルトユーザーが明示的に動画 → フレーム → スプライトを要求した場合

動画はピクセルを柔らかくし、アイデンティティをずらし、クロマフリンジを残します。必ず品質確認を行ってください。本番キャラクターには、ユーザーが動画ルックを求めている場合を除き、$generate2dsprite を推奨します。

パラメータ

ユーザーリクエストから推論します。

  • subject: キャラクター/クリーチャーの説明、または既存の静止画へのパス
  • action: run | walk | idle | attack | カスタムモーションフレーズ
  • view: 通常は side(横スクロール)。topdown は難しいため警告し、カメラを固定したままにしてください
  • duration: 6(デフォルト)または 10 秒
  • frame_counts: エクスポートする高密度セット、デフォルト 8,16,24,48
  • cell_size: 出力スプライトセル、デフォルト 128
  • anchor: feet(サイド移動のデフォルト) | center
  • bg: 単色 #FF00FF(クロマキー必須)
  • name: 出力スラッグ
  • out_dir: 作業フォルダ(デフォルト ./sprites/video2dsprite/<name>/ またはプロジェクト相対)

エージェントルール

  1. Grok専用。 非Grokランタイムでは、簡単な説明と $generate2dsprite の代替案を示して拒否してください。
  2. 静止画 → 動画、テキスト→動画単独では不可。 フレーム1はクリーンな静止画(image_gen または参照から image_edit)として構築してください。その後 image_to_video を呼び出します。
  3. その場モーション。 固定方向を向いたその場でのラン/ウォークをプロンプトします。カメラパン、背景スクロール、シーンチェンジは禁止。被写体はほぼ中央に留めます。
  4. ベースと動画プロンプトに単色マゼンタ背景(#FF00FF / 純粋マゼンタ)を使用します。フラッドフィルクロマキーに必要です。
  5. PIL/Canvasでアートをでっち上げない。 ベースアートは image_gen / image_edit またはユーザー/ローカルの静止画から取得します。スクリプトは後処理のみ行います。
  6. ユーザーが統合を要求しない限り、実験的な出力をゲームに組み込まない。
  7. ゲーム使用には1つの移動サイクルを推奨。 プレビューでは6秒のマルチサイクルクリップ全体から高密度サンプリングしても構いませんが、エンジンシートには視覚QC後に1サイクル(12~16フレーム)を再サンプリングすることを推奨します。
  8. 完了時に動画、クリーンフレーム、ストリップ、プレビューGIFの絶対パスを報告します。

ワークフロー

1. 計画

最も小さな有用な実行を選びます。

  • サイドビューのラン/ウォークループ → このスキル
  • マルチアクションキャラクターキット → アクションごとに $generate2dsprite を引き続き使用。移動のみ動画を使用する場合はリクエストがあった場合のみ
  • FX / 投射物 / プロップパック → $generate2dsprite、動画は使いません

作成:

<out_dir>/
  base/
  video/
  frames-raw/
  frames-clean/
  sprite/          # デフォルト8フレームセット + 高密度x16/x24/x48
  prompt-used.txt
  pipeline-meta.json
  README.txt

2. ベース静止画の構築

オプション:

  • A. 既存スプライト: 画像ツールで開く/画像を読み取り、必要に応じて単色 #FF00FF 上に合成
  • B. 新規キャラクター: image_gen で単色マゼンタ背景、全身、サイドビュー、中央配置
  • C. 参照に合わせる: ユーザー参照から image_edit でマゼンタ上に、アイデンティティを維持

ベース要件:

  • 全身が表示され、十分なマゼンタの余白があること
  • ラン/ウォーク用のサイドビュー(横顔または3/4横)、足は下部3分の1付近
  • 参照がある場合はプロジェクトの他のアートスタイルと同じであること
  • テキスト、UI、透かし、2人目のキャラクターがないこと

<out_dir>/base/<name>-base.png として保存します。

正確な画像プロンプトを prompt-used.txt に書き込みます。

3. image_to_video でアニメーション化

Grokの image_to_video を呼び出します:

  • image: ベース静止画へのパス
  • duration: 6(デフォルト)または 10
  • resolution_name: 480p(ユーザーが 720p を要求した場合を除く)
  • prompt: 短い現在形のショット1つ(references/prompt-rules.md 参照)

プロンプト内の必須モーション制約:

  • 被写体がその場で走る/歩く(トレッドミル形式)
  • カメラロック — パン、ズーム、軌道移動なし
  • 背景はフラットな単色マゼンタを維持
  • アイデンティティ、コスチューム、パレットはショット全体で安定
  • 単一の連続アクションのみ

返された動画を <out_dir>/video/<name>-<duration>s.mp4 にコピーします。

動画ツールが利用できない場合は停止します(プラットフォームゲート)。

4. 抽出 + クロマキー + サンプリング(ローカルスクリプト)

プロセッサを実行します(ffmpeg + Pillow + numpy):

python skills/video2dsprite/scripts/video2dsprite.py process \
  --video <out_dir>/video/<name>-6s.mp4 \
  --out-dir <out_dir> \
  --name <name> \
  --frame-counts 8,16,24,48 \
  --cell-size 128 \
  --body-height 100 \
  --foot-y 118 \
  --fps 0

注意:

  • --fps 0 = デコードされたすべてのフレームを抽出(ソースfpsを使用)
  • コーナーからのマゼンタフラッドフィル + デスピル
  • --frame-counts の各カウントに対して均等サンプリング
  • 足正規化セル、水平ストリップ、グリッド、カウントごとのループGIF

オプション: 既存のクリーンフレームから高密度セットのみを再サンプリング:

python skills/video2dsprite/scripts/video2dsprite.py sample \
  --clean-dir <out_dir>/frames-clean \
  --out-dir <out_dir> \
  --frame-counts 16,24,48 \
  --cell-size 128

5. 品質確認

視覚的に確認:

  • プレビューGIFが大きな飛びなしでループする
  • マゼンタが除去されている(固いピンクブロックなし); フリンジは許容範囲または再キー処理
  • 足が安定したベースラインに留まっている(不適切なクロップによる飛び跳ねなし)
  • アイデンティティがほぼ安定している(顔/服が毎フレーム変形しない)
  • アクションがその場で行われている(フレーム外に滑り出さない)
  • ゲーム用: 1つのカウントを選択(多くの場合16または24)、または1つの真のサイクルを切り出す

アイデンティティが大きくずれるかピクセルが柔らかすぎる場合は、プロダクションシートには $generate2dsprite にフォールバックし、動画セットはモーション参照としてのみ保持します。

6. 提供

パスのみを報告(ユーザーがゲームに組み込むよう要求した場合を除く):

  • 動画: video/*.mp4
  • 高密度スプライト: sprite/x16|x24|x48/
  • ストリップ / グリッド / GIF: sprite/run-strip-N.png、run-grid-N.png、run-preview-N.gif
  • メタ: pipeline-meta.json

要求されない限り、ゲームコードを変更しないでください。

デフォルト

  • 期間: 6秒
  • アクション: その場でのサイドラン、右向き
  • エクスポートカウント: 8, 16, 24, 48
  • セル: 128²、身長約100、足y≈118
  • 背景: #FF00FF
  • reference_to_video よりも image_to_video を優先(必要に応じて最初に image_edit でマルチ参照を合成)

トレードオフ(ユーザーに一度伝えてください)

メリット: 高密度中間ポーズ → 4~8の離散生成ポーズよりも滑らかに感じられることが多い。 デメリット: ピクセルが柔らかい、アイデンティティがずれる、クロマフリンジ、6秒のマルチサイクルクリップは単一の完全なループではない、アセットが重い。 経験則: 8→16→24で通常滑らかさが向上。48は多くの場合、効果が薄い。145の生フレームはサンプリング用であり、すべてをランタイムで使うわけではありません。

リソース

他のスキルとの関係

  • $generate2dsprite — プライマリシートパイプライン(Codex + Grok、画像生成がある場合)
  • $generate2dmap — マップ用。ここでは使用しません
  • $video2dsprite — Grok Build限定 モーション高密度化パス

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

NeverSight/learn-skills.dev

Create AI avatar and talking head videos via inference.sh CLI. Recommended: P-Video-Avatar (fastest, cheapest, built-in TTS). Also: OmniHuman, Fabric, PixVerse. Audio: Inworld TTS-2 (100+ languages, emotion steering for characters), ElevenLabs, Kokoro. Capabilities: audio-driven avatars, text-to-avatar, lipsync videos, talking head generation, virtual presenters, UGC content. Use for: AI presenters, explainer videos, virtual influencers, dubbing, marketing videos, UGC ads, gaming avatars, NPC dialogue. Triggers: ai avatar, talking head, lipsync, avatar video, virtual presenter, ai spokesperson, audio driven video, heygen alternative, synthesia alternative, talking avatar, lip sync, video avatar, ai presenter, digital human, ugc, ugc video, ugc ad, avatar ugc

NeverSight/learn-skills.dev

Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awareness. Triggers: marketing video, ad video, promo video, commercial, brand video, product video, explainer video, ad creative, video ad, facebook ad video, youtube ad, instagram ad, tiktok ad, promotional video, launch video

NeverSight/learn-skills.dev

Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse

NeverSight/learn-skills.dev

ElevenLabs automatic dubbing - translate and dub audio/video into 29 languages while preserving speaker voice via inference.sh CLI. Capabilities: auto speaker detection, voice-preserving translation, video dubbing, audio localization. Use for: content localization, video translation, multilingual content, international distribution. Triggers: dubbing, dub video, translate audio, video translation, audio translation, localize content, elevenlabs dubbing, eleven labs dub, multilingual dub, voice translation, auto dub, language dub, content localization

NeverSight/learn-skills.dev

Explainer video production guide: scripting, voiceover, visuals, and assembly. Covers script formulas, pacing rules, scene planning, and multi-tool pipelines. Use for: product demos, how-it-works videos, onboarding videos, social explainers. Triggers: explainer video, how to make explainer, product video, demo video, video production, video script, animated explainer, product demo video, tutorial video, onboarding video, walkthrough video, video pipeline

NeverSight/learn-skills.dev

Still-to-video conversion guide: model selection, motion prompting, and camera movement. Covers Wan 2.5 i2v, Seedance, Fabric, Grok Video with when to use each. Use for: animating images, creating video from stills, adding motion, product animations. Triggers: image to video, i2v, animate image, still to video, add motion to image, image animation, photo to video, animate still, wan i2v, image2video, bring image to life, animate photo, motion from image

NeverSight/learn-skills.dev

Generate talking head avatar videos with Pruna P-Video-Avatar via inference.sh CLI. Turn a portrait image into a realistic speaking video with built-in TTS. 18x faster and 6x cheaper than competitors. Models: P-Video-Avatar, P-Image (for portrait generation). Capabilities: text-to-avatar, audio-driven avatars, 30 voices, 10 languages, 720p/1080p, built-in TTS, dynamic backgrounds, full-body control. Use for: AI presenters, product demos, explainer videos, virtual influencers, marketing, education, multilingual content, UGC, gaming avatars. Triggers: avatar video, talking head, ai avatar, p-video-avatar, pruna avatar, video avatar, ai presenter, digital human, virtual presenter, lipsync, talking avatar, ai spokesperson, heygen alternative, synthesia alternative, veed alternative, fabric alternative, omnihuman alternative

NeverSight/learn-skills.dev

Generate videos with Pruna P-Video and WAN models via inference.sh CLI. Models: P-Video, WAN-T2V, WAN-I2V. Capabilities: text-to-video, image-to-video, audio support, 720p/1080p, fast inference. Pruna optimizes models for speed without quality loss. Triggers: pruna video, p-video, pruna ai video, fast video generation, optimized video, wan t2v, wan i2v, economic video generation, cheap video generation, pruna text to video, pruna image to video

NeverSight/learn-skills.dev

Render videos from React/Remotion component code via inference.sh. Pass TSX code, get MP4. Supports all Remotion APIs: useCurrentFrame, useVideoConfig, spring, interpolate, AbsoluteFill, Sequence. Configurable resolution, FPS, duration, codec. Use for: programmatic video generation, animated graphics, motion design, data-driven videos, React animations to video. Triggers: remotion, render video from code, tsx to video, react video, programmatic video, remotion render, code to video, animated video, motion graphics code, react animation video

NeverSight/learn-skills.dev

Video ad creation with exact platform-specific specs for TikTok, Instagram, YouTube, Facebook, LinkedIn. Covers dimensions, duration limits, AIDA framework, and caption requirements. Use for: video ads, social media ads, paid media creative, video marketing, ad production. Triggers: video ad, social media ad, tiktok ad, instagram ad, youtube ad, facebook ad, linkedin ad, video creative, ad specs, paid media, video marketing, ad production, reels ad, stories ad, pre roll, bumper ad

NeverSight/learn-skills.dev

Best practices and techniques for writing effective AI video generation prompts. Covers: Veo, Seedance, Wan, Grok, Kling, Runway, Pika, Sora prompting strategies. Learn: shot types, camera movements, lighting, pacing, style keywords, negative prompts. Use for: improving video quality, getting consistent results, professional video prompts. Triggers: video prompt, how to prompt video, veo prompts, video generation tips, better ai video, video prompt engineering, video prompt guide, video prompt template, ai video tips, video prompt best practices, video prompt examples, cinematography prompts

NeverSight/learn-skills.dev

YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A/B testing. Use for: YouTube thumbnails, video cover images, click-through optimization. Triggers: youtube thumbnail, thumbnail design, video thumbnail, click through rate, ctr optimization, youtube cover, video cover image, thumbnail maker, thumbnail tips, youtube design, video preview image

NeverSight/learn-skills.dev

Landing page conversion optimization with layout rules, hero section design, and CTA psychology. Covers above-the-fold formula, social proof placement, mobile design, and F-pattern reading. Use for: startup landing pages, product pages, SaaS marketing, conversion optimization. Triggers: landing page, hero section, above the fold, conversion optimization, landing page design, cta button, hero image, landing page layout, saas landing page, product page design, conversion rate, landing page best practices

NeverSight/learn-skills.dev

Configure and use the hosted YouTube Data MCP end-to-end with minimal user input. Use when users want the agent to verify Node.js and `npx`, configure MCP server config (Windows/macOS, Cursor/Codex/OpenClaw/OpenCode), request API key at setup time, run post-install capability discovery (`tools/list` and `get_patch_notes`), and then strongly recommend helper skill and Python setup for full local document and spreadsheet workflows.

NeverSight/learn-skills.dev

Creates 120fps GPU-accelerated animations with Motion.dev (Framer Motion successor) for React, Next.js, Svelte, and Astro projects. Use when user requests animation, motion, scroll effects, parallax, hero animations, gestures, drag interactions, spring physics, whileHover effects, whileInView animations, animated UI, micro-interactions, page transitions, or layout animations. Generates production TypeScript/JSX code with accessibility (prefers-reduced-motion) and performance validation (≥60fps). Supports entrance animations, gesture interactions (hover/tap/drag), scroll-based reveals, and layout transitions using spring physics and natural timing. Do NOT use for CSS-only transitions (use native CSS), static sites without JavaScript, Vue animations (use motion-v variant instead), or SVG/Canvas complex animations (GSAP better suited).

NeverSight/learn-skills.dev

Static artifact craft skill for self-contained HTML/CSS/JS documents: docs, sheets, dashboards, explainers, slides, tools, and landing pages. Use when the user asks for a durable, openable, shareable web deliverable they'll keep or hand off — a report, a dashboard, a slide deck, a data table, a page. Local folder first, temporary public link via tunnel (localhost.run), optional durable publish to Surge, GitHub Pages, or Cloudflare. Not for quick look renders, inline snippets, or throwaway scratch. Not for SPA frameworks, backend APIs, database apps, or production product UI.

NeverSight/learn-skills.dev

FFmpeg commands for video/audio conversion, trimming, compression, and processing. Use when user mentions "ffmpeg", "convert video", "compress video", "extract audio", "trim video", "gif from video", "video codec", "transcode", "screen recording", "merge videos", "video to mp4", "reduce file size", or any media processing task.

NeverSight/learn-skills.dev

Vim keybindings, motions, text objects, and operators for efficient text editing. Use when user asks about "vim commands", "vim motions", "text objects", "vim keybindings", "vim cheat sheet", "learn vim", "vim in VS Code", or any Vim editing tasks.

NeverSight/learn-skills.dev

Download YouTube videos, extract/proofread/translate subtitles, and render them onto video. Use whenever the user asks to download a YouTube video with subtitles, translate video subtitles to Chinese, add subtitles/burn subtitles to a video, or do ASR transcription on video audio. Covers the full pipeline: video download → subtitle extraction → proofreading → translation → SRT generation → subtitle rendering. Also use for "下载视频加字幕", "视频翻译字幕", "把字幕烧录到视频中". For pure subtitle file creation without rendering (just SRT output), this skill handles that too — stop before Phase 5.

NeverSight/learn-skills.dev

Use when generating or modifying Remotion video code, creating demo videos, or working with the demo-video/ directory

関連スキル