Communitygithub.com

NeverSight/learn-skills.dev

將靜態的 2D 角色圖轉換為流暢的動畫精靈,透過 Grok Build 原生影片工具生成密集的動作序列。

learn-skills.dev 是什麼?

此技能專為 Grok Build 平台設計,利用其獨有的 `image_to_video` 功能,將靜態的 2D 角色圖轉換為流暢的動畫精靈。工作流程包括:使用 `image_gen` 或 `image_edit` 生成基礎圖像,然後透過 `image_to_video` 產生原地循環動畫影片,接著使用 ffmpeg 提取影格、以洋紅色進行色鍵去背,最後取樣並輸出為精靈條、網格或 GIF 格式。此技能提供了比傳統逐幀生成更密集的動作過渡,適合製作更平滑的跑步、行走等循環動畫。但需要注意的是,影片會導致像素柔化、角色特徵飄移和色鍵殘邊,因此對於要求精準像素的生產級專案,仍推薦使用 `$generate2dsprite`。此技能僅支援 Grok Build,其他平台(如 Codex、Claude)因缺乏必要的影片工具而無法使用。

相容平台✓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 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Video2dsprite(僅限 Grok Build)

使用 Grok Build 的原生影片工具,將基礎 2D 角色圖轉換為密集動畫精靈。

基礎靜態圖 → 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. 遊戲使用偏好一個移動循環。 對於預覽,密集取樣整個 6 秒多循環片段是可以的;對於引擎圖表,可以在視覺品質檢查後選擇性地重新取樣單一循環(12–16 影格)。
  8. 完成時報告絕對路徑,包括影片、清理後的影格、精靈條和預覽 GIF。

工作流程

1. 規劃

選擇最小可行的執行:

  • 側視跑步/行走循環 → 此技能
  • 多動作英雄套件 → 每個動作仍使用 $generate2dsprite;僅在使用者要求時對移動使用影片
  • 特效 / 投射物 / 道具包 → $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 側面),腳部靠近底部三分之一處
  • 當有參考圖像時,與專案其餘部分的藝術風格一致
  • 無文字、UI、浮水印或第二個角色

儲存為 <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:一個簡短的現在式鏡頭(參見 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 = 提取每個解碼影格(使用來源影格率)
  • 從角落進行洋紅色泛洪填充 + 去色偏
  • 對 --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 循環時沒有明顯跳動
  • 洋紅色消失(無實心粉紅區塊);可接受殘邊或重新色鍵
  • 腳部保持在穩定的基準線上(無因裁切不良導致的跳躍)
  • 角色特徵大致穩定(臉部/衣服不會每幀變形)
  • 動作是原地進行的(不會滑出畫面)
  • 對於遊戲使用:選擇一個計數(通常是 16 或 24)或裁剪出一個真實循環

如果角色特徵嚴重飄移或像素過於柔軟,則退回使用 $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

除非要求,否則不要修改遊戲程式碼。

預設值

  • 持續時間:6s
  • 動作:側面原地跑步,面向右
  • 匯出計數:8, 16, 24, 48
  • 單元格:128²,身體高度約 100,腳部在 y≈118
  • 背景:#FF00FF
  • 優先使用 image_to_video 而非 reference_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

相關技能