Communitygithub.com

NeverSight/learn-skills.dev

仅限 Grok Build。将静态2D角色图通过 image_gen/image_edit → image_to_video → 抽帧 → 色度抠图 → 密集采样精灵(条状/网格/GIF)转化为流畅动画精灵。适用于需要从视频生成精灵、利用生成视频进行动作捕捉、通过密集帧获得更流畅奔跑/行走循环的场景。

learn-skills.dev 是什么?

该技能是 NeverSight 项目中的一个工具,专门用于在 Grok Build 平台(xAI)上将单张 2D 角色静态图转化为高质量的密集动画精灵序列。其核心工作流是:首先利用 Grok 的 image_gen 或 image_edit 工具生成或编辑一个带有纯品红(#FF00FF)背景的静态基底图;然后通过 Grok 独有的 image_to_video 工具生成一个原地循环的动作视频(如奔跑、行走);最后,用 ffmpeg 提取视频帧,经过色度抠图(chroma key)和智能采样(支持 8、16、24、48 帧等密度),输出为水平条状精灵图(strip)、网格图(grid)或预览 GIF。此技能的价值在于提供了比传统逐帧生成更密集、更平滑的中间过渡帧,特别适合制作流畅的跑动或行走循环;但代价是视频会软化像素、导致角色特征漂移并产生色度边缘残留。该技能明确标注为 Grok Build 独占,因为 Claude 或 Codex 等代理不具备 image_to_video API,若在非 Grok 环境被调用,技能会要求停止并推荐使用 $generate2dsprite 作为替代。输出目录结构清晰,包含 base、video、frames-raw、frames-clean、sprite 等子目录,最终报告生成视频、精灵图及元数据的绝对路径。

兼容平台✓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. 静态图 → 视频,不能仅使用文生视频。 先生成一个干净的静态图(通过 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

相关技能