chat-motion-overlay
Generate configurable chat motion overlays from a transcript or screenshot, including plain bubble scenes, app-style chat containers, optional device frames, preset or uploaded avatars, nickname display rules, and transparent-video-ready Remotion bundles. Use when Codex needs to create reusable short-form chat clips for Douyin, demo videos, story reenactments, social-message proof scenes, or embeddable alpha overlays for Hyperframe and Remotion workflows.
Install
npx skills add https://github.com/nexu-io/openmotion --skill chat-motion-overlayTest Report
Date: 2026-07-01
Scope
Validated the new $chat-motion-overlay skill across:
- transcript -> spec generation
- config validation
- bundle preparation
- preset avatar asset copying
- uploaded avatar asset copying
- generated bundle sanitization for uploaded avatar paths
- collision-proof uploaded avatar asset names
- group chat participant-level avatar assignment
- bubble-only right-side alignment
- participant side consistency validation
- Remotion template type safety
- representative still rendering
- documented question strategy for incomplete requests
Matrix Result
- Total cases: 18
- Passed: 18
- Failed: 0
Covered Cases
default_wechat_phone_preset_hiddenplain_bubbles_no_frame_first_messagetelegram_no_frame_alwaysmessenger_phone_hiddenupload_phone_alwaysmixed_wechat_phone_first_messagejson_spec_onlygroup_multi_participant_distinct_presetsinvalid_upload_missing_sideinvalid_mixed_without_uploadinvalid_upload_missing_fileinvalid_participant_side_conflictupload_slug_collision_unique_assetsinvalid_transcript_avatar_keyinvalid_preset_mode_upload_pathconfig_preset_overrides_transcript_avatar_hintinvalid_force_dangerous_output_dirinvalid_bubble_only_phone_frame
Issues Found And Fixed
-
chatSpec.tsgenerated readonly arrays while template types expected mutable arrays.- Fix: changed template
ChatSpectypes to useReadonlyArray.
- Fix: changed template
-
Config validation for
avatarMode=uploadandavatarMode=mixedwas too loose.- Fix: added explicit validation in
build_chat_overlay_spec.py. - Update:
avatarMode=uploadnow requires uploaded avatar paths on participant configs.
- Fix: added explicit validation in
-
New skill needed bundled preset avatar assets available in generated Remotion bundles.
- Fix: added avatar library copying in
prepare_chat_overlay_bundle.py.
- Fix: added avatar library copying in
-
User-facing output choices were too technical.
- Fix: replaced direct
outputselection withdeliveryFormat, then mapped it internally to render targets and artifact modes.
- Fix: replaced direct
-
Incomplete user requests needed a consistent clarification strategy.
- Fix: added a documented question policy with defaults, question limits, and user-facing wording.
-
Missing uploaded avatar files could silently fall back to preset avatars during bundle preparation.
- Fix: made
prepare_chat_overlay_bundle.pyfail fast when a configured upload path does not exist, and added bundle-stage coverage for that case.
- Fix: made
-
Group chats needed participant-level avatars instead of only side-level avatars.
- Fix: replaced side-level avatar assignment with participant-level preset and upload assignment support.
-
One speaker could be interpreted on both sides if the transcript conflicted.
- Fix: added participant side consistency validation.
-
Distinct participant names could normalize to the same slug and overwrite uploaded avatar assets.
- Fix: generated stable unique participant ids and added a collision test with two uploaded avatars.
-
Bubble-only overlays needed explicit right-side row alignment.
- Fix: split row alignment from avatar/bubble ordering, and added a style assertion for the plain bubble case.
-
Transcript-provided avatar keys that are not in the preset library could silently fall back to a default avatar.
- Fix: validate transcript avatar hints against
PRESET_KEYSbefore storing the participant.
- Fix: validate transcript avatar hints against
-
avatarMode=presetconfigs with a participantuploadPathcould render uploaded files instead of preset avatars.- Fix: reject
uploadPathwhenavatarModeispreset, only carry upload paths foruploadandmixedmodes.
- Fix: reject
-
Transcript avatar hints took precedence over explicit participant config presets, so config could not override transcript-derived or OCR-derived hints.
- Fix: changed avatar selection order to config-first (
configured.get("preset") or message["avatar"] or auto...), consistent withreferences/input-format.md.
- Fix: changed avatar selection order to config-first (
-
--forcecould recursively delete arbitrary existing directories when--output-dirwas mistyped.- Fix: reject dangerous targets up front, and only allow
--forceoverwrites for previously generated bundle directories marked with.chat-motion-overlay-bundle.
- Fix: reject dangerous targets up front, and only allow
-
A failed uploaded-avatar copy could leave a partial bundle behind with
src/chatSpec.tsstill containing localuploadPathvalues.- Fix: validate upload sources before copying, delay
chatSpec.tswriting until sanitization succeeds, and remove the generated bundle if preparation fails mid-run.
- Fix: validate upload sources before copying, delay
-
The documented MOV/WebM export commands and shipped package scripts omitted
src/index.ts, so Remotion would treat the composition id as the entry file.- Fix: update both package scripts and
references/output-modes.mdto useremotion render src/index.ts ChatMotionOverlay ..., and keep that path checked in the matrix.
- Fix: update both package scripts and
-
container=nonecould still be combined withdeviceFrame=iphone-dynamic-island, which let a 1080x1920 bubble-only scene render into the smaller phone viewport and clip right-side content.- Fix: reject that unsupported combination during config validation, and document it in the config schema, visual rules, and matrix.
-
Bubble wrapping logic introduced
useMemocalls after a frame-based early return, which could change hook order when playback crossed a messageappearAtframe.- Fix: replace those
useMemocalls with plain local calculations, and extend render coverage to include frames on both sides of the first message boundary.
- Fix: replace those
Verification Notes
- Representative bundles were rendered to still images successfully.
- Invalid config cases failed with the expected validation errors.
- Invalid uploaded-avatar file paths failed during bundle preparation with a clear error.
- Generated
chatSpec.tsbundles kept only participantuploadAssetentries and did not leak localuploadPathvalues. - Uploaded avatar assets stayed unique when participant display names slugified to the same base id.
- Group chat participants resolved to distinct participant avatars instead of sharing side-level avatars.
- Bubble-only transparent overlays explicitly align right-side rows to the right edge.
- Side conflicts for a single participant failed with a clear validation error.
- Bundle type checking passed with
tsc --noEmit. - Config participant presets correctly override transcript avatar hints.
- Transcript avatar hints that are not valid preset keys fail with a clear validation error.
avatarMode=presetconfigs that includeuploadPathfail with a clear validation error.- Dangerous
--forceoutput targets are rejected before any recursive deletion occurs. - Failed uploaded-avatar copies do not leave a generated
chatSpec.tscontaining local upload paths. - Shipped Remotion render scripts keep
src/index.tsbefore the composition id. container=none + deviceFrame=iphone-dynamic-islandfails with a clear validation error before any bundle or render step.- Representative render coverage now crosses a message
appearAtframe boundary instead of checking only a later still.
References
- Test matrix:
references/test-matrix.md - Test runner:
scripts/run_test_matrix.py