SuperAPI AI Directory

repo-film

Coding & development

View repository

Updated 11-09 16:38

About this skill

repo-film: a period of a repository → a short film

Decision to support: whether any period of any repository can produce a publishable film with one command without changing scene code. Abandonment conditions: as of 2026-12-15, it has not been used again apart from the two acceptances for Keepline and Spellbook; or two consecutive new repositories both require changing template/scene.html before a film can be produced. If either is met, stop using it and merge the branch layout script into the motion-stack examples. After finishing each film, record a row in the "Films made" table below.

Usage

node <本 skill 目录>/scripts/make.mjs \
  --repo <仓库路径> --since "2026-11-01 20:00" --until "2026-11-02 06:00" \
  [--branch main] [--map auto|none|<地图 html>] [--config film.json] [--out <目录>] [--sheet-only]
  • First add --sheet-only to output only a keyframe contact sheet (out/beats.png), review it yourself, then produce the film.
  • The finished film is in <out>/out/<仓库名>-film.mp4, 1920×1080, 30fps, loudness about -14 LUFS. About 13 seconds without a map, about 24 seconds with a map.
  • --out defaults to ~/Videos/repo-film/<目录名>-<开始日期>, which contains the complete project, so you can directly edit scene.html or <out>/assets/film.js and then re-render with motion-stack's render.mjs .
  • Dependencies: motion-stack skill (installed next to this skill, or in ~/.claude/skills、~/.codex/skills、~/.agents/skills , or you can use MOTION_KIT to point to its kit/; the first time you need to kit/ in PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm install), python3, ffmpeg. Tone.js preferably reuses the motion-stack example's node_modules, and only if absent npm install。

Pipeline

  1. scripts/lanes.py: read-only git (--all, so local branches count too).--branch 's first-parent chain is the mainline (lane 0); the remaining commits are strung into branch segments by first-parent; each segment occupies an interval from the fork point to the merge point, and segments with overlapping intervals are assigned to different lanes (alternating up and down). Branch names are read from Merge branch 'x' into y , and are not labeled if they cannot be read. Beyond --max(default 400), only the latest are kept.
  2. scripts/capture.mjs: when there is a map, temporarily lay the map out in a single column (the blocking chain no longer scrolls horizontally and can be displayed in full), capture a 2x image, and record the positions of each block and the path of each connection line in the blocking chain. Only the style at screenshot time is changed, not the map file.
  3. make.mjs Generate subtitles and the ending card from the data, write them into <out>/assets/film.js, then overwrite with --config .
  4. Rendering: keyframe contact sheet → purity check (forward and reverse playback must match) → MP4. Loudness is automatically adjusted to -14 LUFS by the motion-stack renderer, and the value is in .manifest.json next to the finished film.

film.json (all optional)

{
  "captions": [["你离开了。", "You step away."], ["agent 们接着干。", "The agents keep going."],
               ["一夜,51 个提交,8 条分支。", "One night. 51 commits. 8 branches."], ["回来,打开一页。", "Come back. Open one page."]],
  "sub": "KEEPLINE · 11-01 20:01 → 11-02 04:34",
  "startLabel": "20:00 开工",
  "end": { "title": "you-are-here", "tagline": "…", "taglineEn": "…",
           "lines": ["/plugin marketplace add majiayu000/you-are-here"], "meta": "github.com/…" }
}

The four subtitle positions are 0.6 seconds, 3 seconds, 7.6 seconds (panorama) and 8.65 seconds (appears only when there is a map, introducing the map).end.lines The part starting with / or $ is colored, suitable for installation commands.

Pre-publication check

  • Commit messages appear on screen as-is(truncated to 40 characters). First git log to check whether that period contains project names, personal names, or internal links that should not be made public.
  • Map: preferably use .project-map/index.public.html(the version with local paths removed). The script detects that the map contains /Users/ These kinds of paths will trigger warnings; the repository name label in the upper right corner and the GitHub link will include the username.
  • The font is rendered using the local SF font; only copy it into the project directory, and do not make it public along with the project.

Videos made

Video Result
Keepline 11-01 20:00 → 11-02 04:34, with map (you-are-here promo video) 51 commits, 8 branches; reproduce the manual version with one command, and replace the ending with the you-are-here copy
Spellbook 10-01 → 10-08, no map 48 commits, 14 branches; produced a 13.5-second video without changing the scene code; exposed and fixed two issues: the video title used the worktree directory name (changed to read the origin address), and when there were many lanes, the upper and lower branches went out of frame (the camera was changed to follow vertically at the same time and zoom out according to the number of lanes)

Not yet verified

  • Vertical 9:16: the map shots and cards are too small in portrait orientation, so a separate layout is needed.
  • Very long time ranges (hundreds of commits, dozens of branches): only verified up to 51 commits and 14 branches. Cards will become very dense, and it may be necessary to change them to show only dots.
  • Maps with an empty blocking chain: the code falls back to landing on the lines of the one-sentence summary, but this has not actually been run.
  • The feel of continuous playback and the sound effects: only keyframes have been reviewed; acceptance depends on the user watching the video.