Awesome-omni-skill tiktok-motion-factory
Run the deterministic, non-AI Remotion TikTok motion graphics pipeline on a local audio file and produce a creative-direction spec.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/tools/tiktok-motion-factory" ~/.claude/skills/diegosouzapw-awesome-omni-skill-tiktok-motion-factory && rm -rf "$T"
skills/tools/tiktok-motion-factory/SKILL.mdTikTok Motion Factory Skill (Repo Root)
This repository is the skill directory. Invoking $tiktok-motion-factory must behave like a creative director + motion designer while keeping the pipeline deterministic. You may use AI for audio assessment and web inspiration research, but the final rendered graphics must be non-AI and strictly procedural.
Hard Constraints (Must Repeat and Enforce)
- AI usage is limited. You may use AI for audio assessment and web inspiration research only. The final product must not contain AI-generated graphics; visuals must be procedural and deterministic.
- Audio must be local. If a URL is provided, refuse and ask for a local file path.
- Only 1–2 optional preference questions (vibe:
vseditorial
; textclub
). If the user doesn’t answer, choose defaults.on/off - Tailored concept every time. The concept must reference measured audio features (tempo/energy/onset density/dynamics) and map them to design choices.
Agent Protocol (Step-by-Step)
-
Collect input (minimal questions):
- Ask for a local audio file path. If missing, state you will use the newest file in
.input/ - Ask at most two optional preference questions:
- Vibe:
oreditorial
(default:club
).editorial - Text:
oron
(default:off
).on
- Vibe:
- If the user provides a URL, refuse and ask for a local path.
- Ask for a local audio file path. If missing, state you will use the newest file in
-
Prepare audio (deterministic):
- Run:
on the chosen audio file to create a normalized WAV for analysis and rendering.tools/prep_audio.sh
- Run:
-
Analyze cues (deterministic):
- Run:
to generatetools/analyze_cues.py
.jobs/<job>/cues.json - Compute additional stats from cues (see “Audio Analysis Requirements”).
- Run:
-
Synthesize a creative concept:
- Use the “Creative Intelligence Protocol” and “Concept Synthesis” rules below to produce a tailored concept tied to audio metrics.
-
Write the creative spec:
- Save a machine-readable creative spec to
using the schema below.jobs/<job>/creative.json
- Save a machine-readable creative spec to
-
Generate props:
- Create
that includes the creative spec verbatim underjobs/<job>/props.json
.creative
- Create
-
Execute render:
- Run
with the audio and any user parameters (start/dur/title/slug) plus the creative spec inclusion../run.sh
- Run
-
Report output:
- Print the final render path and job folder path.
- Suggest next steps (upload, add caption, add hashtags).
Creative Intelligence Protocol (Mandatory)
You must not skip concept work. Complete all checklist items before rendering.
Checklist (all required):
- Compute audio metrics (density, avg strength, peaks, quiet sections, estimated BPM, section boundaries).
- Define scene structure (intro/build/drop/outro) aligned to energy and cues.
- Map cue types/tiers to motion responses.
- Define art direction (palette, contrast, background treatment, geometric primitives, motion language).
- Define typography system (font choice strategy, hierarchy, grid, kinetic behavior).
- Define transitions and loop strategy.
- Write
(schema below).jobs/<job>/creative.json - Ensure
embedsjobs/<job>/props.json
.creative.json - Ensure
includes commands, rationale, and audio metrics.jobs/<job>/notes.md
Audio Analysis Requirements (Deterministic)
You must run:
tools/prep_audio.shtools/analyze_cues.py
Then compute the following stats from
cues.json:
- cueDensity: cues per second.
- avgStrength: mean of cue strengths.
- peakStrength: max cue strength.
- quietSections: contiguous ranges where no cues appear for ≥ 0.6s (or ≥ 18 frames @30fps).
- estimatedBpm: rough BPM from median inter-onset interval (IOI), mapped to BPM in [60, 180].
- sectionBoundaries: infer segments by energy trend using a rolling window (e.g., 1.5s) and label as
,intro
,build
,drop
by relative energy and cue density.outro
Deterministic design rules (examples, must use):
- If
cues/sec → use micro-shake on impacts + higher contrast palette.cueDensity > 2.2 - If
→ reduce impact scale toavgStrength < 0.35
max and favor smoother easing.1.05 - If
→ allow a single flash accent on strongest hit in each section.peakStrength > 0.8 - If
→ increase motion speed (estimatedBpm >= 130
) and tighter grid spacing.motionTempo = fast - If
exist → add breathing background drift during quiet ranges.quietSections
Concept Synthesis (Required Outputs)
You must create the following and include it in
creative.json:
-
Narrative Concept (1 paragraph)
- Tie the concept directly to measured audio features (tempo, density, dynamics).
-
Motion Grammar (bullets)
- Primitives: circles, lines, ribbons, soft rects, dot field, etc.
- Behaviors: scale pop on cues, rotation tick, parallax drift, micro-shake, flash.
-
Palette (3–6 hex colors)
- Justify palette based on audio features (e.g., high BPM → higher contrast; low density → muted neutrals).
-
Typography System
- Use local/system fonts (e.g.,
,Inter
,Helvetica
,Arial
,SF Pro
).Roboto - Define hierarchy (title/subtitle), grid rules, and kinetic behavior tied to cues.
- Use local/system fonts (e.g.,
-
Scene Plan (exact frame ranges)
- Provide
/startFrame
for each scene (intro/build/drop/outro).endFrame - Align boundaries to section boundaries derived from cues.
- Provide
-
Loop Plan
- Define how the last frames return to the first (e.g., gradient phase, shape positions, opacity fade).
Files to Generate
jobs/<job>/creative.json
jobs/<job>/creative.jsonRequired schema (keys must exist):
{ "audio": { "source": "<path>", "durationSec": 10, "fps": 30, "metrics": { "cueDensity": 1.8, "avgStrength": 0.42, "peakStrength": 0.91, "estimatedBpm": 124, "quietSections": [{"startSec": 3.2, "endSec": 4.0}], "sectionBoundaries": [ {"name": "intro", "startSec": 0, "endSec": 2.5}, {"name": "build", "startSec": 2.5, "endSec": 5.0}, {"name": "drop", "startSec": 5.0, "endSec": 8.0}, {"name": "outro", "startSec": 8.0, "endSec": 10.0} ] } }, "concept": { "narrative": "<1 paragraph>", "motionGrammar": { "primitives": ["circles", "ribbons", "soft-rects"], "behaviors": ["scale-pop", "rotation-tick", "micro-shake", "flash"] }, "palette": ["#0B0F1A", "#1E2A44", "#F0E9D2", "#FF5C7C"], "typography": { "fonts": ["Inter", "Helvetica", "Arial"], "hierarchy": {"titleSize": 110, "subtitleSize": 48}, "grid": {"columns": 6, "margin": 80}, "kinetic": {"onCue": "scale-pop", "idle": "slow-drift"} }, "scenes": [ {"name": "intro", "startFrame": 0, "endFrame": 75, "energy": "low"}, {"name": "build", "startFrame": 75, "endFrame": 150, "energy": "mid"}, {"name": "drop", "startFrame": 150, "endFrame": 240, "energy": "high"}, {"name": "outro", "startFrame": 240, "endFrame": 300, "energy": "low"} ], "transitions": ["smear", "crossfade"], "loop": {"strategy": "phase-align", "lastFrames": 15} }, "cueMap": [ {"frame": 12, "strength": 0.71, "type": "kick"}, {"frame": 24, "strength": 0.36, "type": "hat"} ] }
jobs/<job>/props.json
jobs/<job>/props.jsonMust embed the creative spec exactly:
{ "audioSrc": "../assets/audio/<job>.wav", "fps": 30, "width": 1080, "height": 1920, "durationInFrames": 300, "cues": ["..."], "text": {"title": "...", "subtitle": "..."}, "style": {"vibe": "editorial", "accent": "#FF5C7C"}, "creative": {"...full creative.json content..."} }
jobs/<job>/notes.md
jobs/<job>/notes.mdMust include:
- Exact commands executed.
- Key creative rationale (1–3 bullets).
- Derived audio metrics (explicit numbers).
Execution (Run the Pipeline)
- Use the computed creative spec to generate
and embed increative.json
.props.json - Run
with user inputs (audio/start/dur/title/slug)../run.sh - Print:
(render output)DONE: <path>
(job folder)JOB: <path>
Remotion Template Support Requirement
If the current Remotion template does not yet support
creative.json fields, you must implement support in remotion/src:
- Parse
from props.creative - Apply palette, background style, primitives, and cue-driven animations deterministically according to the creative spec.
- Do not add any AI dependencies or AI-driven logic.