mcpField
C
claude-typer

claude-typer

github.com/vibe-motion创意与媒体1.4k1.1k 次安装3 周前更新
代码仓库

关于 claude-typer

claude-typer 是一项将指定文本制作为打字机动画视频的技能。它渲染远程 Remotion composition,并返回生成的视频路径。

主要功能

  1. 01将文本渲染为打字动画
  2. 02设置视频与画面尺寸
  3. 03传递 Remotion 渲染参数
  4. 04将输出保存为命名 MOV 文件

适用场景

  1. 01根据提示词制作打字动画片段
  2. 02按视频成品要求调整尺寸

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/vibe-motion/skills --skill claude-typer

安装后在 Claude Code 中输入/claude-typer确认已加载。

附带文件agents/openai.yamlscripts/render_claude_typer.py

详细介绍

Claude Typer

工作流

  1. 将动画中要输入的文本提取为 prompt。
  2. 运行:
    • skill_dir=""
      for base in "${AGENTS_HOME:-$HOME/.agents}" "${CLAUDE_HOME:-$HOME/.claude}" "${CODEX_HOME:-$HOME/.codex}"; do
        if [ -d "$base/skills/claude-typer" ]; then
          skill_dir="$base/skills/claude-typer"
          break
        fi
      done
      [ -n "$skill_dir" ] || { echo "claude-typer skill not found under ~/.agents, ~/.claude, or ~/.codex"; exit 1; }
      /usr/local/bin/python3 "$skill_dir/scripts/render_claude_typer.py" "<prompt>"
      
    • 指定尺寸和缩放比例的示例:
      /usr/local/bin/python3 "$skill_dir/scripts/render_claude_typer.py" \
        "claude-typer skill可以让智能体做出提示词打字机动效视频,快来试试吧" \
        --video-width 1080 \
        --video-height 600 \
        --claude-width 600 \
        --scale 2
      
    • 使用自定义运行器并传递 remotion 参数的示例:
      /usr/local/bin/python3 "$skill_dir/scripts/render_claude_typer.py" \
        "vibe-motion/skills:一个面向智能体的MG动画/视频技能仓库." \
        --runner-prefix "npx -y -p @remotion/[email protected] -p @remotion/[email protected] remotion" \
        --composition Typer30fps \
        --output-file Typer30fps.mov \
        --codec prores \
        --prores-profile 4444 \
        --pixel-format yuva444p10le \
        --image-format png \
        --audio-codec aac \
        --video-width 1080 \
        --video-height 1080 \
        --claude-width 880
      
  3. 返回当前工作目录中生成的视频路径。

渲染行为

  • 从 https://www.laosunwendao.com 渲染远程合成 Typer30fps。
  • 使用 @remotion/cli(而非 remotion 包名)。
  • 优先使用 bunx @remotion/cli。
  • 如果 bunx 不可用,则回退到 npx -y -p @remotion/[email protected] -p @remotion/[email protected] remotion。
  • 保留透明 MOV 默认设置:
    • --fps=30
    • --codec=prores
    • --prores-profile=4444
    • --pixel-format=yuva444p10le
    • --image-format=png
    • --scale=2
  • 为保证稳定性,保留以下默认设置:
    • --timeout=300000
    • --concurrency=1
    • 自动检测本地 Chrome/Chromium,找到后传入 --browser-executable。
  • 保留项目的默认属性;替换 prompt,并允许通过脚本参数覆盖 videoWidth / videoHeight / claudeWidth。
  • 未知 CLI 参数会直接传递给 remotion render(用于高级标志)。
  • --runner-prefix 可让你完全控制运行器命令(例如固定版本、全局解析行为等)。
  • 此技能公开的 Remotion 属性仅包含标量字段:prompt、typingSpeedMs、model、videoWidth、videoHeight、claudeWidth、tiltStartX、tiltStartY、tiltEndX、tiltEndY、tiltDurationRatio。

输出文件命名

  • 将文件保存到当前目录,命名为 xxx.mov。
  • 通过精简提示词来构建 xxx:
    • 移除开头常见的请求用语,例如 帮我、请、做一个、生成一个、制作、创建。
    • 移除非法文件名字符。
    • 保留中文/英文字母和数字。
    • 如果结果为空,则使用 claude-typer。
  • 示例:
    • 提示词:帮我做一个web画板
    • 输出:web画板.mov

注意事项

  • 在干净的机器上,只要可以访问 npm 和 https://www.laosunwendao.com,此回退路径只需 Node.js + npx 即可。
  • 如果 bunx 和 npx 都不可用,请安装其中一个并重试。
  • 如果输出名称已存在,则遵循 Remotion 的覆盖行为。
  • 如果遇到 delayRender() 超时,请保留 --concurrency=1,并根据需要提高 --timeout-ms。

评论

支持 Markdown