Communitygithub.com

sprite2video

从一篇文章(文案)或一个 GitHub 仓库,制作带角色贴图库、丰富代码动效和帧级音效的 Remotion 视频。原生支持两大标杆风格:① 大肥鱼风格(dafeiyu,9:16 竖屏强动效信息图科普,顶部进度条 + NO.xx 标题 + 变色动态背景 + 双语字幕 + 底部常驻 Q 版贴图);② 卡普迪姆风格(capdim,16:9 横屏复古方格纸叙事/吐槽,底部章节导航条 + 截图/图表 + 右侧情绪立绘)。当用户丢来一篇文章、Markdown、或 GitHub 链接要求做成带角色贴图的代码视频时使用。

sprite2video 是什么?

sprite2video is a Claude Code agent skill that 从一篇文章(文案)或一个 GitHub 仓库,制作带角色贴图库、丰富代码动效和帧级音效的 Remotion 视频。原生支持两大标杆风格:① 大肥鱼风格(dafeiyu,9:16 竖屏强动效信息图科普,顶部进度条 + NO.xx 标题 + 变色动态背景 + 双语字幕 + 底部常驻 Q 版贴图);② 卡普迪姆风格(capdim,16:9 横屏复古方格纸叙事/吐槽,底部章节导航条 + 截图/图表 + 右侧情绪立绘)。当用户丢来一篇文章、Markdown、或 GitHub 链接要求做成带角色贴图的代码视频时使用。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/guohuiyuan/sprite2video/tree/HEAD/.agents/skills/sprite2video

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

sprite2video (Sprite-Driven Code Animation Video Skill)

This skill solves the problem of "pure code animations are too monotonous": breaks down an article or GitHub repository into high-density visual storyboards, then uses a 'QQ show'-style emotion router to assign transparent character sprites, micro-animations, and frame-level sound effects to each scene.


Two Base Layouts & Quick Preset Routing (Specify in One Sentence)

Dimensiondafeiyu (Vertical Preset)capdim (Horizontal Preset)
One-Keyword Triggervertical / 9:16 / dafeiyu / TikTok stylehorizontal / 16:9 / capdim / talk show
Aspect Ratio1080×1920 (9:16 vertical, 30fps)1920×1080 (16:9 horizontal, 30fps)
Default Character & Voicedafeiyu-chibi + voice-120 (dafeiyu)evil-neuro-chibi + evil-neuro-cn (Evil_Neuro_CN)
Default Scene (auto-detected if not specified)GitHub repo recommendations / tool introductions (60~100 seconds, fast-paced)Long articles / Markdown explanations / hands-on commentary (2~3 minutes narrative)
BackgroundScene-switching theme colors (cyan→red→indigo→green→orange→purple) + radial lines/3D grid/spectrum/code rainUniform warm retro beige double-layer grid paper texture (#e8e6d8)
NavigationTop multi-segment progress bar + NO.xx capsule + slanted bold outlined large titleBottom full-width multi-chapter tab bar (black background, white highlighted text + dynamic small badge)
Character SpriteBottom-center fixed Q-version mascot; when a large card appears, automatically switches to corner and shrinks to the bottom-rightLeft/right side white-border die-cut sticker illustration, repeatedly switched according to dialogue emotion
SubtitlesBottom-center karaoke gold-colored Chinese + English secondary subtitlesBottom-center semi-transparent black-background white-text single-line clear Chinese subtitles

Minimal Prompt Memory Aid (user only needs to provide a direction word, the default character/voice/effects/cover will be automatically applied; if override is needed, supplement character=xxx, voice=xxx):

  • Vertical default: Use sprite2video vertical to introduce https://github.com/owner/repo
  • Horizontal default: Use sprite2video horizontal to turn this article into a video: <file/article>
  • Free mix: Use sprite2video vertical to introduce <link>, character with evil-neuro-chibi, voice with evil-neuro-cn

End-to-End 6-Step Production Pipeline

Step 1: Refine Source Material (Copy or GitHub Repo)

  • If input is a GitHub repo: First fetch README.md and directory structure, strictly no fabricated data. Refine:
    1. One-sentence pain point Hook (grab attention within the first 3 seconds)
    2. Core numerical evidence (Star count, sample size, key metric comparisons)
    3. 3~6 concrete features or before/after comparisons (can be paired with actual webpage screenshots or terminal commands)
    4. One installation/startup command (place in TerminalBox)
    5. Ending one-image summary / CTA
  • If input is an article/copy: Split into 613 fast-paced storyboard scenes (1 core point per scene, 510 seconds). For each scene, extract a 4~6 character short title and a visual infographic type (number increment / progress bar comparison / stamp conclusion / terminal typing / screenshot highlight).

Step 2: Prepare Character Sprite Library

  • Check if a usable sprite pack already exists in public/characters/ (comes with demo-chibi out of the box).
  • If a new character is needed, first invoke the video-sprite-pack Skill to generate and verify contact-sheet.png and manifest.json.

Step 3: QQ Show-style Script Auto-Route Character Reactions

Write each scene's spoken dialogue into a temporary text file (one line per sentence, breathing tags like [sigh] [chuckle] [gasp] can be added as needed), then run:

python .agents/skills/video-sprite-pack/scripts/match_script.py `
  --manifest public/characters/<char>/manifest.json `
  --script work/<topic>/script.txt `
  -o work/<topic>/routed.json

Quickly review routed.json manually/with the Agent, and fine-tune pose, motion, or sfx for a particular scene if necessary.

Step 4: Prepare Voiceover & SFX (Optional Real TTS, or Estimate Duration by Word Count)

  • If LATENT_AUDIO_KEY is configured, call .agents/skills/latent-media/scripts/latent.py tts to generate .mp3 files scene by scene, and precisely back-calculate each scene's durationInFrames = Math.ceil(duration_ms / 1000 * 30) + 8 using duration_ms.
  • Ensure the 10 basic sound effects are ready in public/sfx/ (if missing, run python .agents/skills/sprite2video/scripts/generate_sfx.py -o public/sfx).

Step 5: Assemble the Remotion Video with Built-in Components

Create a new composition in src/videos/<TopicName>.tsx and register <Composition> in src/Root.tsx. Prioritize reusing built-in components; strictly avoid hand-writing a simplistic plain-text PPT:

  • DynamicBackground (sunburst / grid3d / spectrum / coderain / paper)
  • TopProgressBar (dafeiyu top progress bar + capsule) or BottomChapterBar (capdim bottom chapter bar)
  • CharacterSprite (pass src, motion, placement="bottom" | "corner" | "right" | "center")
  • MotionWidgets (CountUpCard, CompareBar, StampBadge, TerminalBox)
  • BilingualSubtitle (dafeiyu bilingual outlined / capdim black-background strip)
  • SfxTrack (pass per-scene transition whoosh + card pop + character emotion sfx, auto-collision avoidance and consecutive play volume reduction)

Step 6: Frame Extraction Visual Quality Check & Rendering

Before rendering, extract 3~4 key frames to check for text overflow or sprite occlusion:

npx.cmd remotion still src/index.ts <CompId> out/<CompId>-f1.png --frame=45
npx.cmd remotion still src/index.ts <CompId> out/<CompId>-f2.png --frame=180

Use read_file to visually confirm no occlusion, then render the final video:

npx.cmd remotion render src/index.ts <CompId> out/<CompId>.mp4

Step 7: Bilibili Publish Kit Delivery (Title + Dual-Spec Cover + Description, Not Skipable)

After the rendered video is complete, the publish kit for direct Bilibili submission must also be produced (and saved to out/<CompId>-bilibili-publish.md):

  1. Eye-Catching Title (Bilibili title + Douyin backup short title)

    • Bilibili Title (freely creative, no strict character limit; provide 3 style groups with 1 main recommended group):
      • Reverse-Circle-Back Style (Main Recommended): First throw out a counter-intuitive/provocative/self-deprecating hook to create a strong click desire (e.g., "Stop practicing your speaking skills! The more you memorize golden phrases, the more you sound like a trending reposter? An introvert crushed a 400-person stage with just 5 counter-intuitive tricks"), then in the second half or video body smoothly circle back to the core insight, landing on verifiable bottom-line methods and benefits. Never use clickbait that mismatches the content.
      • Data Contrast Style: Put the hardest real turnaround numbers or contrast upfront (e.g., "Cried from stage fright in 7th grade, now 5.2K followers from a 400-person speech: He only did 5 things right").
      • Emotional Resonance/Pain Point Direct Hit Style: Poke at the viewer's daily awkward moments + provide specific solution numbers.
    • Douyin Backup Short Title (Required, strictly < 30 characters including punctuation and spaces):
      • Specifically for Douyin submission: Compress the strongest hook/core number from the main title into 30 characters or fewer (must actually count characters to confirm < 30), provide 1~2 copy-paste ready options.
  2. Three-Spec Full-Platform Covers (Bilibili 16:9 1920×1080 + Bilibili Dynamic 4:3 1440×1080 + Douyin/Xiaohongshu 3:4 1080×1440)

    • Reuse the built-in src/components/BilibiliCover.tsx to register three <Still> groups (the component automatically switches between horizontal left-text-right-image / vertical top-text-bottom-image based on aspect ratio), generate images with npx.cmd remotion still, must visually verify with read_file:
      • Keep cover big text to 8~14 characters (2-line giant title + 1 high-contrast red/blue badge), visible within 1 second on mobile thumbnails;
      • Place 1~2 of the most dramatically expressive transparent white-border character sprites (e.g., shocked_fist breakdown / smug_wink smug / celebrate_star star-holding) to interact emotionally with the main text;
      • Horizontal version: reserve bottom-right corner for Bilibili duration badge avoidance zone; 3:4 vertical version: leave top and bottom safety margins to fit Douyin/Xiaohongshu recommendation feed cropping.
  3. Bilibili Complete Description (Fixed Four-Paragraph Format, Direct Copy Paste)

    • Paragraph 1 (Reverse-Circle-Back Hook → Circle Back to Core Point): 1~2 sentences that pick up the title's reverse/exaggerated suspense, naturally circling back to the video's core insight;
    • Paragraph 2 (What You'll Take Away After Watching): List 3~5 concrete, immediately actionable takeaways (framework formulas, situational scripts, training actions, etc.) in clear bullet points, so viewers instantly see "worth the click";
    • Paragraph 3 (Precise Chapter Timestamps for Air-Drop): Convert actual voiceover timeline.json into MM:SS chapter nodes matching Bilibili's auto-section progress bar;
    • Paragraph 4 (Interactive question + 5~8 precise #topic tags): Space-separated, fitting real searchable topic words (don't create unsought long phrases).

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

相关技能