Communitygithub.com

atlantis-mk/remotion-video-template

用一个选题全自动制作深色信息图风格的口播视频:写口播稿、豆包配音、分镜与素材、Remotion 动画、渲染成片、封面与发布文案。用户说“开始制作”、要做口播/信息图/财经科技解说视频时使用。支持横屏与竖屏。

remotion-video-template 是什么?

remotion-video-template is a Claude Code agent skill that 用一个选题全自动制作深色信息图风格的口播视频:写口播稿、豆包配音、分镜与素材、Remotion 动画、渲染成片、封面与发布文案。用户说“开始制作”、要做口播/信息图/财经科技解说视频时使用。支持横屏与竖屏。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/atlantis-mk/remotion-video-template/tree/HEAD/.agents/skills/remotion-infographic-video

在你喜欢的 AI 中提问

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

文档

Infographic Voice-Over Video

Location and Delivery Layout (Architecture v1.11)

  • The delivery repository root must have AGENTS.md (how to use this template); this skill is fixed at .agents/skills/remotion-infographic-video/.
  • tests/ is at the repository root (same level as .agents/), belongs to development gate/CI, and is not part of the skill runtime. It is not copied when installing only the skill.
  • .env is only in this skill directory, not at the repository root.

Preparation Before Use (Copy and Use)

  1. Copy:
    • Full repository use: Clone/copy the delivery repository root and open it (including root AGENTS.md and tests/).
    • Install only the skill: Copy .agents/skills/remotion-infographic-video/ to the same relative path in the target project (including scripts/ and its lib/).
    • The skill package itself does not require pip/npm installation; scripts/ uses only the Python standard library. After configuring .env, steps 0–5 can be run.
  2. Configure .env: In the skill directory, run cp .env.example .env, then edit .env to fill in:
    • Required: DOUBAO_TTS_API_KEY= (write the Key after the equals sign, no quotes)
    • Optional: DOUBAO_SPEAKER= (default voice, see VOICE)
    • .env is ignored by .gitignore. Do not paste the Key into the chat, and do not switch to other TTS engines.
  3. Environment Prerequisites (install yourself, the script does not install them): Node 18+, Python 3, ffmpeg, ffprobe, internet.
  4. Start Production: When the user says "Start production" or an equivalent intent:
    • First run python3 scripts/check_env.py (can use --skill-dir <absolute path to this skill package>; default is this directory).
    • Exit code 3: Prompt to fill in DOUBAO_TTS_API_KEY in .env (located at .agents/skills/remotion-infographic-video/.env or the absolute path of this skill), wait for the user to reply "filled" and rerun; do not proceed with TTS or project creation before that.
    • If passed: If the topic is already in the message, go directly into the fixed steps; otherwise ask only one question for the topic (can specify "portrait"; default landscape 1920×1080, portrait 1080×1440, rules in LAYOUT). Platform name does not affect aspect ratio.

Hard Rules

  • The Key is read only from DOUBAO_TTS_API_KEY in .env in this skill directory (for delivery repository: .agents/skills/remotion-infographic-video/.env); do not let the user paste the Key in chat, do not switch TTS engines, do not display the Key in any output.
  • Do not publish or upload: Only produce the final video, cover, and copy files.
  • All numbers must have a source; numbers on screen must have a source badge; schematic icons must be labeled "schematic".
  • The last line of each script's stdout is a JSON summary; handle by exit code: 3 = missing Key (prompt to fill .env, stop), 4 = authentication failure (stop), 5 = fix upstream output, 6 = re-run only failed items, 7 = enter repair.

Fixed Steps

  1. Pre-check: python3 scripts/check_env.py. If exit code 3, prompt to fill .env as above and rerun.
  2. Topic collection: Determine topic, slug, and aspect ratio; write <slug>/job.json (default landscape if not specified). When the user mentions a platform, write platforms; otherwise, use default platforms per PUBLISH.
  3. Write script: Write script.md (## Sxx section name + - [01] text {context: … | rate: 0 | pause: 300}) and sources.md (JSON block at the end); run python3 scripts/validate.py sources <slug>/script.md <slug>/sources.md. Numbers without sources must be removed or have sources added.
  4. Voiceover: If an MCP TTS tool (tts_synthesize) with equivalent input/output is available in the environment, use it; otherwise, run python3 scripts/tts_doubao.py <slug>/script.md --out-dir <slug>/voice. Validate the resulting timeline.json using the same Schema (assets/schemas/): python3 scripts/validate.py timeline <slug>/voice/timeline.json. Rerun failed sentences with --only.
  5. Storyboard: Write storyboard.json (each sentence must be covered by at least one shot; segment transitions and shot entrances take enum values); run python3 scripts/validate.py storyboard <slug>/storyboard.json --timeline <slug>/voice/timeline.json.
  6. Assets: Use python3 scripts/fetch_asset.py's add command to register each asset; use prune to remove unused assets. Do not use assets with unclear licensing.
  7. Build project: python3 scripts/scaffold_project.py --job <slug>/job.json --out <slug>/project generates the project; write each segment's scene following the example (assets/example/). Then run python3 scripts/build_timeline.py --timeline <slug>/voice/timeline.json --storyboard <slug>/storyboard.json --subtitles <slug>/voice/subtitles.json --manifest <slug>/assets-manifest.json --project <slug>/project. Then run npm ci inside the project.
  8. Self-check: Run bash scripts/check_project.sh <slug>. On failure, read check/report.json, fix, and rerun; maximum 3 attempts. If still failing, stop and report.
  9. Render: Run bash scripts/render.sh <slug> to produce the final video (<slug>/out/video.mp4) and cover (<slug>/publish/cover_<W>x<H>.png), with automatic validation.
  10. Publish copy and delivery: Per PUBLISH, write a set of publish/<platform>/title.txt, description.txt for each target platform; write tags per platform in publish/<platform>/tags.txt (one per line). Run python3 scripts/validate.py publish <slug>, python3 scripts/validate.py deliverable <slug>, python3 scripts/validate.py leak <slug>. Then run python3 scripts/fetch_asset.py credits-diff --manifest <slug>/assets-manifest.json --slug-dir <slug> to verify credits.

Style Hard Rules Summary

  • Colors, font sizes, and animation values come only from assets/tokens.json; background color base is #070A0F. Scene code must not hardcode color values (STYLE).
  • Entrances are uniformly spring; segment transitions have 5 types, shot entrances have 3 types; use the storyboard enums (MOTION).
  • Use only the 15 registered components; for components not in the registry, write them inside the project using tokens + useLayout() (COMPONENTS).
  • Only four layers: background / scene / hud / subtitle. No end credits screen. Video length = voiceover length.
  • Randomness uses only random(seed); Math.random is forbidden.
  • Layout is derived from canvas width and height; only src/layout/presets.ts in src/ may contain canvas dimensions (LAYOUT).
  • Script format per SCRIPT; voiceover parameters per VOICE; asset licensing and credits per ASSETS.

Prohibited Actions

  • Do not publish or upload to any platform.
  • Do not leak the Key: do not display it, do not write it into output files, do not let the user paste it in chat, do not switch TTS engines.
  • Do not use assets with unclear licensing. Do not include links in credits, descriptions, or titles.
  • Do not fabricate data: numbers without sources must not appear in the script or on screen.
  • Do not ask the user any questions between topic collection and delivery, and do not request any assets.

Delivery

Return the contents of deliverable.json in one go: final video path and duration, aspect ratio, cover, titles and descriptions per platform, tags, asset credits, output directory, and notes.

相关技能