animation-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAnimation Review
动画审核
Review animations and interactions by recording the browser and sending the video to Gemini for structured analysis.
通过录制浏览器并将视频发送至Gemini进行结构化分析,审核动画与交互效果。
Prerequisites
前置条件
- installed (
ffmpeg)brew install ffmpeg - Python package with Chromium (
playwright)pip install playwright && playwright install chromium - Python package (
google-genai)pip install google-genai - environment variable set
GEMINI_API_KEY - For manual recording only: macOS Screen Recording permission granted to terminal app
- 已安装(执行
ffmpeg安装)brew install ffmpeg - 已安装带Chromium的Python包(执行
playwright安装)pip install playwright && playwright install chromium - 已安装Python包(执行
google-genai安装)pip install google-genai - 已设置环境变量
GEMINI_API_KEY - 仅手动录制需要:已为终端应用授予macOS屏幕录制权限
How Gemini fits in
Gemini的作用
Gemini is the eyes — it watches the recording and describes what it sees with precision. You are the hands — you translate those observations into code changes with full codebase context.
Treat all Gemini analysis as observational evidence, not authoritative diagnosis. Gemini cannot see the code. When it suggests root causes or implementation fixes, treat these as hypotheses from an external observer who can see the symptoms but not the source. Its frame-level descriptions of what happens visually are reliable. Its theories about why are informed guesses that you should verify against the actual code.
This applies across all modes, but especially to (where Gemini hypothesizes about bugs) and (where Gemini decomposes effects without knowing your tech stack).
diagnoseinspireGemini 扮演着眼睛的角色——它会观看录制内容并精准描述所见画面。而你则是双手——结合完整的代码库上下文,将这些观察结果转化为代码修改。
请将Gemini的所有分析视为观测证据,而非权威诊断结果。 Gemini无法查看代码。当它提出根本原因或修复方案时,请将这些视为外部观察者基于症状而非源代码提出的假设。它对视觉上发生的内容的逐帧描述是可靠的,但关于原因的推测只是需要结合实际代码验证的猜想。
这一点适用于所有模式,尤其针对(诊断,Gemini会假设bug原因)和(启发,Gemini会在不了解技术栈的情况下分解效果)模式。
diagnoseinspireInterpreting timestamps and durations
解读时间戳与时长
Gemini can only observe what's in the sampled frames. Its temporal precision depends on the analysis FPS:
| Mode | FPS | Frame interval | What this means |
|---|---|---|---|
| check | 5 | 200ms | A "300ms animation" could be anywhere from 200-400ms (1-2 frames). Timestamps are ±200ms. Good enough for "does it happen" but not for timing accuracy. |
| review | 12 | 83ms | A "300ms animation" is ~3-4 frames. Easing character is visible. Durations are accurate within ~80ms — enough to judge "too fast" vs "too slow". |
| diagnose/inspire | 24 | 42ms | A "300ms animation" is ~7 frames. Easing curves, stagger offsets, and glitch moments are precisely observable. Durations are accurate within ~40ms. |
When Gemini reports a duration like "~400ms with ease-out", consider the mode's precision. At 5fps that could really be 200-600ms. At 24fps it's likely 360-440ms. The system prompt tells Gemini to report in frame counts alongside milliseconds so you can judge precision yourself.
If you're debugging a timing issue and Gemini's temporal precision isn't sufficient, re-run at a higher mode. A that reveals "something's off with the timing" can be followed up with a for frame-precise detail. You can also escalate just a specific time range — see "Escalating a region" below.
checkdiagnoseGemini只能观测到采样帧中的内容。其时间精度取决于分析的FPS:
| 模式 | 帧率(FPS) | 帧间隔 | 说明 |
|---|---|---|---|
| check(检查) | 5 | 200ms | 一个“300ms动画”实际时长可能在200-400ms之间(1-2帧)。时间戳误差±200ms。适用于确认“动画是否运行”,但无法保证计时精度。 |
| review(评审) | 12 | 83ms | 一个“300ms动画”对应约3-4帧。可观测到缓动特性。时长误差约80ms,足以判断“过快”或“过慢”。 |
| diagnose/inspire(诊断/启发) | 24 | 42ms | 一个“300ms动画”对应约7帧。可精准观测到缓动曲线、交错偏移和卡顿瞬间。时长误差约40ms。 |
当Gemini报告类似“约400ms,带ease-out缓动”的时长时,请结合对应模式的精度判断。在5fps模式下,实际时长可能是200-600ms;在24fps模式下,实际时长更可能是360-440ms。系统提示会要求Gemini同时报告帧数和毫秒数,以便你自行判断精度。
如果你在调试计时问题时发现Gemini的时间精度不足,可以切换到更高精度的模式重新运行。例如,先用模式发现“计时存在问题”,再用模式进行逐帧精准分析。你也可以只针对特定时间范围升级分析——详见下文“重点区域分析升级”。
checkdiagnoseWorkflow
工作流程
1. Determine source and mode
1. 确定来源与模式
There are two entry points — figure out which applies:
User provides a video file. The user has a screen recording (.mov, .mp4, .webm) — either of their own UI or a reference they want to recreate. Skip straight to step 3 (Analyze). No recording step needed. User-provided videos are typically 30-60fps, which is more than enough for any analysis mode — Gemini downsamples to the mode's FPS automatically.
Agent captures from the browser. The animation is running in a local dev server and needs to be recorded. Proceed to step 2 (Record), then step 3 (Analyze).
Choose the analysis mode based on what question you're trying to answer:
| Mode | FPS | Model | Question | When to use |
|---|---|---|---|---|
| check | 5 | Flash | "Does it work?" | First pass — verify the animation fires, completes, and doesn't visually break. Early development, after wiring up a new animation, smoke testing. |
| review | 12 | Flash | "How does it feel?" | Design and polish — evaluate easing, timing, choreography, and overall quality. Use when the animation works but needs refinement, or for design review before shipping. |
| diagnose | 24 | Pro | "What's going wrong?" | Bug investigation — the animation has a specific visual problem (jump, stutter, misalignment, timing glitch). Need frame-precise evidence to locate the root cause in code. |
| inspire | 24 | Pro | "What's happening here?" | Reference analysis — the user has a video showing a desired effect and wants a technical decomposition to guide implementation. |
Decision guide for agents:
- User says "check if this works" / "does the animation play" / just implemented something new → check
- User says "how does this look" / "review the animation" / "is the timing right" / design feedback → review
- User says "there's a bug" / "it jumps" / "something's wrong with" / describes a specific visual issue → diagnose
- User provides a video of someone else's UI / "I want it to look like this" / "recreate this effect" → inspire
- For inspire: if the user hasn't said which part of the video or which specific effect to focus on, ask them before running the analysis. A full-video decomposition without focus will be vague and unhelpful.
If the mode isn't clear from context, ask the user.
有两种启动方式,请根据情况选择:
用户提供视频文件:用户已拥有屏幕录制文件(.mov、.mp4、.webm格式),可能是自己的UI或想要复刻的参考效果。直接跳至步骤3(分析),无需录制。用户提供的视频通常为30-60fps,足以满足任何分析模式——Gemini会自动将其下采样至对应模式的帧率。
Agent从浏览器捕获:动画在本地开发服务器上运行,需要先录制。请执行步骤2(录制),再进行步骤3(分析)。
根据你要解决的问题选择分析模式:
| 模式 | 帧率(FPS) | 模型 | 适用问题 | 使用场景 |
|---|---|---|---|---|
| check(检查) | 5 | Flash | “动画能正常运行吗?” | 首次检查——验证动画是否触发、完成且无视觉错误。适用于开发初期、新动画接入后、冒烟测试。 |
| review(评审) | 12 | Flash | “动画效果如何?” | 设计与优化——评估缓动、计时、编排和整体品质。适用于动画可正常运行但需要优化,或上线前的设计评审。 |
| diagnose(诊断) | 24 | Pro | “哪里出问题了?” | Bug排查——动画存在特定视觉问题(跳跃、卡顿、错位、计时异常)。需要逐帧证据来定位代码中的根本原因。 |
| inspire(启发) | 24 | Pro | “这里实现了什么效果?” | 参考分析——用户提供了展示理想效果的视频,需要技术分解来指导实现。 |
Agent决策指南:
- 用户询问“检查是否可用”/“动画是否播放”/刚实现新动画 → 选择check模式
- 用户询问“效果如何”/“评审动画”/“计时是否正确”/提供设计反馈 → 选择review模式
- 用户提到“存在bug”/“有跳跃”/“出问题了”/描述特定视觉异常 → 选择diagnose模式
- 用户提供其他产品UI的视频/“我想要这种效果”/“复刻这个效果” → 选择inspire模式
- 对于inspire模式:如果用户未指定视频中的重点部分或具体效果,请在运行分析前先询问用户。无重点的全视频分解会模糊且无用。
如果从上下文无法明确模式,请询问用户。
2. Record (skip if user provided a video)
2. 录制(若用户已提供视频则跳过)
The recording step captures browser interactions as video. Record generously, analyze precisely — Playwright's video always includes the full session (page load through close), so capture more than you need. The recorder always records at 24fps (the Gemini analysis maximum) so that any analysis mode can sample at full resolution, including escalation of a specific time range to . The recorder logs a timeline showing when each action executed relative to the video start — use these timestamps with / on to focus Gemini on the relevant window.
diagnose--start--endanalyze.py录制步骤会将浏览器交互捕获为视频。尽量多录制,精准分析——Playwright的视频始终包含完整会话(从页面加载到关闭),所以请录制比实际需要更多的内容。录制器始终以24fps(Gemini分析的最高帧率)录制,这样任何分析模式都能以全分辨率采样,包括将特定时间范围升级为模式分析。录制器会记录时间线,显示每个操作相对于视频开始的执行时间——请将这些时间戳与的/参数配合使用,让Gemini聚焦于相关时间段。
diagnoseanalyze.py--start--endAutomated (preferred) — Claude drives the browser
自动化录制(推荐)——由Claude控制浏览器
Use when Claude is performing the interactions. Playwright records the page internally, then transcodes to mp4. No screen recording permissions needed.
record_browser.pybash
undefined当Claude执行交互时,请使用。Playwright会在内部录制页面,然后转码为mp4格式。无需屏幕录制权限。
record_browser.pybash
undefinedRecord a page load animation
录制页面加载动画
python3 ~/.claude/skills/animation-review/scripts/record_browser.py http://localhost:3000
python3 ~/.claude/skills/animation-review/scripts/record_browser.py http://localhost:3000
Click a button, wait for animation, record everything
点击按钮,等待动画完成,录制全部内容
python3 ~/.claude/skills/animation-review/scripts/record_browser.py http://localhost:3000
-a 'click:.play-btn' -a 'wait:2000'
-a 'click:.play-btn' -a 'wait:2000'
python3 ~/.claude/skills/animation-review/scripts/record_browser.py http://localhost:3000
-a 'click:.play-btn' -a 'wait:2000'
-a 'click:.play-btn' -a 'wait:2000'
Carousel: click through slides
轮播图:点击切换幻灯片
python3 ~/.claude/skills/animation-review/scripts/record_browser.py http://localhost:5173/carousel
-a 'wait:1000' -a 'click:.next' -a 'wait:800' -a 'click:.next' -a 'wait:800'
-a 'wait:1000' -a 'click:.next' -a 'wait:800' -a 'click:.next' -a 'wait:800'
python3 ~/.claude/skills/animation-review/scripts/record_browser.py http://localhost:5173/carousel
-a 'wait:1000' -a 'click:.next' -a 'wait:800' -a 'click:.next' -a 'wait:800'
-a 'wait:1000' -a 'click:.next' -a 'wait:800' -a 'click:.next' -a 'wait:800'
Scroll-triggered animation
滚动触发动画
python3 ~/.claude/skills/animation-review/scripts/record_browser.py http://localhost:3000
-a 'scroll:500' -a 'wait:1000' -a 'scroll:500' -a 'wait:1000'
-a 'scroll:500' -a 'wait:1000' -a 'scroll:500' -a 'wait:1000'
python3 ~/.claude/skills/animation-review/scripts/record_browser.py http://localhost:3000
-a 'scroll:500' -a 'wait:1000' -a 'scroll:500' -a 'wait:1000'
-a 'scroll:500' -a 'wait:1000' -a 'scroll:500' -a 'wait:1000'
Custom viewport size
自定义视口大小
python3 ~/.claude/skills/animation-review/scripts/record_browser.py http://localhost:3000
-W 1920 -H 1080 -a 'click:.hero-cta' -a 'wait:3000'
-W 1920 -H 1080 -a 'click:.hero-cta' -a 'wait:3000'
Action format for `-a`:
- `wait:MS` — wait N milliseconds
- `click:SELECTOR` — click an element
- `scroll:PIXELS` — scroll down (negative for up)
- `hover:SELECTOR` — hover over an element
- `press:KEY` — press a key (Enter, Tab, ArrowRight, etc.)
- `type:SELECTOR|TEXT` — type into an element (pipe separates selector from text)
Construct actions from what you know about the animation trigger. For page-load animations, no actions are needed — the recording captures from navigation onward.
Use `--wait-before` to adjust the pause after page load (default 500ms) and `--wait-after` to adjust the pause after the last action (default 1000ms).
The recorder prints a timeline to stderr showing when each action ran:→ click:.play-btn (at 1.8s)
→ wait:2000 (at 1.9s)
Timeline: actions 1.8s–3.9s, total 4.9s
These timestamps are measured Python-side (wall clock), not from the video encoder, so they're approximate — **always add ~1s buffer on each side** when using `--start`/`--end`. For the example above, use `--start 1s --end 5s`.python3 ~/.claude/skills/animation-review/scripts/record_browser.py http://localhost:3000
-W 1920 -H 1080 -a 'click:.hero-cta' -a 'wait:3000'
-W 1920 -H 1080 -a 'click:.hero-cta' -a 'wait:3000'
`-a`参数的动作格式:
- `wait:MS` — 等待N毫秒
- `click:SELECTOR` — 点击元素
- `scroll:PIXELS` — 向下滚动(负值表示向上滚动)
- `hover:SELECTOR` — 悬停在元素上
- `press:KEY` — 按下按键(如Enter、Tab、ArrowRight等)
- `type:SELECTOR|TEXT` — 向元素中输入文本(竖线分隔选择器与文本)
根据动画触发方式构建动作序列。对于页面加载动画,无需添加动作——录制会从导航开始自动捕获。
使用`--wait-before`调整页面加载后的暂停时间(默认500ms),使用`--wait-after`调整最后一个动作后的暂停时间(默认1000ms)。
录制器会在stderr中打印时间线,显示每个动作的执行时间:→ click:.play-btn (at 1.8s)
→ wait:2000 (at 1.9s)
Timeline: actions 1.8s–3.9s, total 4.9s
这些时间戳是Python端测量的(挂钟时间),而非视频编码器的时间,因此是近似值——使用`--start`/`--end`时**请始终在两侧各添加约1s的缓冲**。例如,对于上述示例,请使用`--start 1s --end 5s`。After recording: notify the user
录制完成后:通知用户
Once the recording finishes, immediately move it to and tell the user before starting analysis. This lets them verify the capture while Gemini runs. The flow:
.animation-review/-
Move the video fromto
/tmp/.animation-review/<timestamp>_<mode>.mp4 -
Message the user with something like:Recorded 4.9s of the carousel interaction. You can preview the recording here:
.animation-review/2026-02-09_153042_diagnose.mp4Running diagnose analysis at 24fps with gemini-2.5-pro — focusing on 1s–5s where the actions occurred. -
Runpointing at the video's new path. Do not wait for user input — continue straight to analysis.
analyze.py
This way the user can scrub through the video while analysis runs and flag if it missed the right interaction.
录制完成后,请立即将视频移动到目录,并在开始分析前通知用户。这样用户可以在Gemini运行分析时验证捕获内容。流程如下:
.animation-review/-
将视频从移动到
/tmp/.animation-review/<timestamp>_<mode>.mp4 -
向用户发送类似消息:已录制4.9秒的轮播图交互内容。你可以在此预览录制文件:
.animation-review/2026-02-09_153042_diagnose.mp4正在以24fps帧率使用gemini-2.5-pro运行diagnose分析——聚焦于动作发生的1s–5s时间段。 -
运行并指向视频的新路径。无需等待用户输入,直接继续分析。
analyze.py
这样用户可以在分析运行时浏览视频,如果发现未捕获到正确的交互,可以及时标记。
Manual — User triggers the interaction
手动录制——由用户触发交互
Use when the user needs to interact with a real browser window manually. Requires macOS Screen Recording permission.
record.shbash
bash ~/.claude/skills/animation-review/scripts/record.sh -d 10 -f 15
bash ~/.claude/skills/animation-review/scripts/record.sh -d 8 -f 15 -r "1280x720+0+0"当用户需要手动与真实浏览器窗口交互时,请使用。需要macOS屏幕录制权限。
record.shbash
bash ~/.claude/skills/animation-review/scripts/record.sh -d 10 -f 15
bash ~/.claude/skills/animation-review/scripts/record.sh -d 8 -f 15 -r "1280x720+0+0"3. Analyze
3. 分析
Run the analysis script with the appropriate mode. The mode sets FPS, model, and system prompt automatically. If you moved the video to in the previous step, pass that path with .
.animation-review/-vbash
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t <mode> \
-v <video_path> -p "<context>"You can override defaults with (FPS), (model), (force text), (force structured), and / to clip to a time range.
-f-m--raw--json--start--end使用对应模式运行分析脚本。模式会自动设置帧率、模型和系统提示。如果在上一步已将视频移动到目录,请使用参数指定该路径。
.animation-review/-vbash
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t <mode> \
-v <video_path> -p "<context>"你可以使用(帧率)、(模型)、(强制文本输出)、(强制结构化输出)和/(裁剪时间范围)来覆盖默认设置。
-f-m--raw--json--start--endWhat context to supply (-p
)
-p需提供的上下文(-p
参数)
-pThe context prompt is critical — it tells Gemini what to look for. What you include depends on the mode:
check — Minimal. What the animation is supposed to do.
bash
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t check \
-p "Cards should fade in on page load with staggered timing"review — What it should do + what "good" looks like. Include design intent, desired feel, or reference points.
bash
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t review \
-p "Modal slides up from bottom with spring easing. Should feel snappy but not aggressive. Backdrop fades in simultaneously."diagnose — What it should do + what's going wrong + any specific observations from the user. The richer the context, the better the hypothesis.
bash
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t diagnose \
-v /path/to/bug-recording.mov \
-p "Circular carousel: clicking an item clones it and animates into a detail view. Closing should animate back to the original position. BUG: the closing animation doesn't return to the correct position — there's a visible jump at the end. The carousel may have rotated while the detail view was open."inspire — Which element or effect in the video is relevant + what the user wants to achieve. If the user hasn't specified which part of the video to focus on, ask them before running the analysis.
bash
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t inspire \
-v /path/to/reference.mov \
-p "Focus on the card flip transition at 0:03-0:05. The card rotates on its vertical axis while the back face content fades in. I want to recreate this for our product cards."上下文提示至关重要——它告诉Gemini需要关注什么。根据模式不同,上下文内容也有所区别:
check(检查) — 内容极简,只需说明动画应实现的效果。
bash
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t check \
-p "卡片应在页面加载时以交错计时淡入"review(评审) — 说明动画应实现的效果+“理想效果”的定义。包含设计意图、预期感受或参考标准。
bash
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t review \
-p "模态框应从底部向上滑入,带弹簧缓动效果。应感觉灵敏但不突兀。背景需同时淡入。"diagnose(诊断) — 说明动画应实现的效果+当前问题+用户的任何具体观察。上下文越丰富,假设越准确。
bash
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t diagnose \
-v /path/to/bug-recording.mov \
-p "圆形轮播图:点击项目会克隆该元素并动画过渡到详情视图。关闭时应动画返回原位置。BUG:关闭动画未回到正确位置——结尾有明显跳跃。轮播图可能在详情视图打开期间发生了旋转。"inspire(启发) — 说明视频中相关的元素或效果+用户的目标。如果用户未指定视频中的重点部分,请在运行分析前询问用户。
bash
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t inspire \
-v /path/to/reference.mov \
-p "聚焦于0:03-0:05的卡片翻转过渡效果。卡片绕垂直轴旋转的同时,背面内容淡入。我想为我们的产品卡片复刻这个效果。"Escalating a region
重点区域分析升级
When a lower-FPS analysis (check or review) reveals something that needs closer inspection, you can re-analyze just that time range at higher FPS — no need to re-analyze the whole video. Use and to clip, and switch to a higher mode:
--start--endbash
undefined当低帧率分析(check或review)发现需要更细致检查的问题时,你可以仅针对该时间范围以更高帧率重新分析——无需重新分析整个视频。使用和参数裁剪范围,并切换到更高精度的模式:
--start--endbash
undefinedInitial review spotted a glitch around 3-5 seconds
初始review模式分析发现3-5秒左右存在卡顿
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t review
-v /path/to/recording.mov
-p "Page transition with staggered card animations"
-v /path/to/recording.mov
-p "Page transition with staggered card animations"
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t review
-v /path/to/recording.mov
-p "带交错卡片动画的页面过渡"
-v /path/to/recording.mov
-p "带交错卡片动画的页面过渡"
Escalate just that region to diagnose at 24fps
仅针对该区域升级为diagnose模式,以24fps分析
python3 ~/.claude/skills/animation-review/scripts/analyze.py -t diagnose
-v /path/to/recording.mov
--start 2s --end 6s
-p "Cards appear to overlap briefly around 3-4s. One card seems to jump position."
-v /path/to/recording.mov
--start 2s --end 6s
-p "Cards appear to overlap briefly around 3-4s. One card seems to jump position."
This sends the same video file to Gemini but tells it to only sample frames within the specified range, at the new mode's FPS. No ffmpeg trimming needed — the API handles the clipping server-side. This is cheaper and faster than re-analyzing the full video at 24fps with Pro.
The offsets use seconds (e.g. `3s`, `1.5s`, `90s`). Add a small buffer around the moment of interest — if the glitch is at ~4s, use `--start 3s --end 6s` to capture context on either side.python3 ~/.claude/skills/animation-review/scripts/analyze.py -t diagnose
-v /path/to/recording.mov
--start 2s --end 6s
-p "卡片在3-4秒左右似乎短暂重叠。其中一张卡片位置发生跳跃。"
-v /path/to/recording.mov
--start 2s --end 6s
-p "卡片在3-4秒左右似乎短暂重叠。其中一张卡片位置发生跳跃。"
这会将同一个视频文件发送给Gemini,但要求它仅在指定范围内采样帧,并使用新模式的帧率。无需使用ffmpeg裁剪——API会在服务器端处理裁剪。这比以24fps用Pro模型重新分析整个视频更便宜、更快。
时间偏移以秒为单位(如`3s`、`1.5s`、`90s`)。在感兴趣的时刻周围添加少量缓冲——如果卡顿发生在约4s,请使用`--start 3s --end 6s`来捕获前后的上下文。4. Present findings
4. 展示结果
Show the results to the user. How you present depends on the mode:
- check: Brief pass/fail summary. Flag anything broken.
- review: Score, key observations about feel and polish, and any recommendations.
- diagnose: The visual evidence first (what happens frame by frame), then hypotheses about root cause, then suggested debugging steps. Be clear about what's observed fact vs what's Gemini's theory.
- inspire: The effect decomposition as a spec — properties, timing, choreography. This becomes the reference for implementation.
向用户展示分析结果。展示方式取决于模式:
- check(检查):简洁的通过/失败总结。标记任何异常。
- review(评审):评分、关于感受和优化的关键观察,以及建议。
- diagnose(诊断):先展示视觉证据(逐帧发生的内容),再给出关于根本原因的假设,最后建议调试步骤。请明确区分观测事实与Gemini的推测。
- inspire(启发):将效果分解为规范——属性、计时、编排。这将成为实现的参考标准。
5. Fix and re-verify
5. 修复与重新验证
Use the analysis feedback to modify code. For non-trivial fixes, record and analyze again to verify the improvement.
根据分析反馈修改代码。对于非 trivial 的修复,请重新录制并分析以验证改进效果。
Output formats
输出格式
Each mode defaults to the output format that works best for it. Use or to override.
--raw--jsoncheck, review default to structured JSON:
json
{
"summary": "Brief overall assessment",
"animations": [
{
"element": "What's animating",
"type": "slide | fade | scale | rotate | color | morph | scroll | other",
"timestamp": "MM:SS",
"duration_ms": 300,
"easing": "ease-out, spring, linear, etc.",
"quality": "smooth | acceptable | janky | broken"
}
],
"issues": [
{
"timestamp": "MM:SS",
"severity": "low | medium | high",
"description": "What's wrong",
"suggestion": "How to fix it"
}
],
"score": 8,
"recommendations": ["Actionable improvements"]
}diagnose defaults to raw text (narrative detail matters). Structured output via uses:
--jsonjson
{
"summary": "Brief overall assessment",
"observations": [
{
"timestamp": "MM:SS",
"description": "What happens at this moment",
"expected": "What should happen",
"actual": "What actually happens"
}
],
"hypotheses": [
{
"cause": "Possible root cause",
"evidence": "What visual evidence supports this",
"debugging_steps": ["Step to confirm or rule out this hypothesis"]
}
]
}inspire defaults to raw text. Structured output via uses a decomposition schema:
--jsonjson
{
"summary": "Brief description of the overall effect",
"effects": [
{
"element": "What's animating",
"trigger": "click | scroll | hover | load | etc.",
"properties": ["opacity", "transform", "clip-path"],
"from_state": "Starting visual state",
"to_state": "Ending visual state",
"duration_ms": 400,
"delay_ms": 0,
"easing": "Description of the timing curve feel",
"timestamp": "MM:SS"
}
],
"choreography": "How the effects relate to each other in time",
"notable_details": ["Subtle touches that make it feel polished"]
}Use on any mode for narrative output, or to force structured output on modes that default to raw.
--raw--json每种模式默认使用最适合的输出格式。你可以使用或覆盖默认设置。
--raw--jsoncheck、review模式默认输出结构化JSON:
json
{
"summary": "简短的整体评估",
"animations": [
{
"element": "动画元素",
"type": "slide(滑动) | fade(淡入淡出) | scale(缩放) | rotate(旋转) | color(颜色) | morph(变形) | scroll(滚动) | other(其他)",
"timestamp": "MM:SS",
"duration_ms": 300,
"easing": "ease-out, spring, linear等",
"quality": "smooth(流畅) | acceptable(可接受) | janky(卡顿) | broken(失效)"
}
],
"issues": [
{
"timestamp": "MM:SS",
"severity": "low(低) | medium(中) | high(高)",
"description": "问题描述",
"suggestion": "修复建议"
}
],
"score": 8,
"recommendations": ["可操作的改进建议"]
}diagnose模式默认输出原始文本(叙事细节很重要)。使用可输出结构化内容:
--jsonjson
{
"summary": "简短的整体评估",
"observations": [
{
"timestamp": "MM:SS",
"description": "该时刻发生的内容",
"expected": "预期内容",
"actual": "实际发生内容"
}
],
"hypotheses": [
{
"cause": "可能的根本原因",
"evidence": "支持该假设的视觉证据",
"debugging_steps": ["确认或排除该假设的步骤"]
}
]
}inspire模式默认输出原始文本。使用可输出结构化内容,采用分解 schema:
--jsonjson
{
"summary": "整体效果的简短描述",
"effects": [
{
"element": "动画元素",
"trigger": "click(点击) | scroll(滚动) | hover(悬停) | load(加载) | 其他",
"properties": ["opacity(透明度)", "transform(变换)", "clip-path(裁剪路径)"],
"from_state": "初始视觉状态",
"to_state": "结束视觉状态",
"duration_ms": 400,
"delay_ms": 0,
"easing": "计时曲线感受描述",
"timestamp": "MM:SS"
}
],
"choreography": "各效果在时间上的关联方式",
"notable_details": ["提升质感的细微处理"]
}对diagnose和inspire模式使用参数可获得Gemini的详细叙事解释(这是这些模式的默认设置)。
--raw对check和review模式使用参数可获得机器可解析的结果(这是这些模式的默认设置)。
--jsonSaved results
保存的结果
By default, the analysis script saves both the video and the analysis output to a directory in the current working directory:
.animation-review/.animation-review/
2026-02-09_153042_diagnose.mov # video
2026-02-09_153042_diagnose.md # analysis (raw modes → .md, structured → .json)
2026-02-08_091200_review.mp4
2026-02-08_091200_review.jsonThis means previous analyses can be referenced later without keeping them in context or re-running the analysis. To refer back to a previous result, check for recent files.
.animation-review/Automatic cleanup: On each run, files older than 14 days are deleted. No manual cleanup needed.
Git: If the project is a git repo, the script automatically adds to on first run.
.animation-review/.gitignoreOpt out: Pass to skip saving (output still goes to stdout as usual).
--no-saveFor user-provided videos, the file is copied into the results directory. For Playwright recordings from , the file is moved (no reason to keep the temp copy).
/tmp默认情况下,分析脚本会将视频和分析输出保存到当前工作目录下的目录:
.animation-review/.animation-review/
2026-02-09_153042_diagnose.mov # 视频文件
2026-02-09_153042_diagnose.md # 分析结果(原始模式→.md,结构化模式→.json)
2026-02-08_091200_review.mp4
2026-02-08_091200_review.json这意味着之前的分析结果可在后续参考,无需保留上下文或重新运行分析。如需参考之前的结果,请查看目录下的近期文件。
.animation-review/自动清理:每次运行时,会删除14天以上的文件。无需手动清理。
Git集成:如果项目是Git仓库,脚本会在首次运行时自动将添加到。
.animation-review/.gitignore退出保存:使用参数可跳过保存(输出仍会正常打印到stdout)。
--no-save对于用户提供的视频,文件会被复制到结果目录;对于从目录获取的Playwright录制文件,会被移动到结果目录(无需保留临时副本)。
/tmpTips
小贴士
- FPS must be specified via mode or — without it, Gemini defaults to 1fps which is useless for animation review.
-f - Max FPS is 24 (Gemini API limit). The script caps automatically if you go over.
- Accepted video formats: ,
.mp4,.mov. QuickTime screen recordings (h264 .mov) work directly..webm - Use for diagnose and inspire when you want Gemini to give detailed narrative explanations (this is the default for those modes).
--raw - Use for check and review when you want machine-parseable results (this is the default for those modes).
--json - For automated recording, prefer short focused clips over long recordings. Capture just the interaction.
- Use on
--headedto watch the browser while it records (useful for debugging the action sequence itself).record_browser.py
- 必须通过模式或参数指定帧率——如果未指定,Gemini会默认使用1fps,这对动画审核毫无用处。
-f - 最高帧率为24(Gemini API限制)。如果设置超过该值,脚本会自动限制。
- 支持的视频格式:、
.mp4、.mov。QuickTime屏幕录制文件(h264 .mov格式)可直接使用。.webm - 对diagnose和inspire模式使用参数可获得Gemini的详细叙事解释(这是这些模式的默认设置)。
--raw - 对check和review模式使用参数可获得机器可解析的结果(这是这些模式的默认设置)。
--json - 自动化录制时,优先选择短小的聚焦片段而非长录制内容。仅捕获所需的交互。
- 在中使用
record_browser.py参数可在录制时查看浏览器(有助于调试动作序列本身)。--headed