makaron-cli 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +2 -2
- package/.codex-plugin/plugin.json +5 -4
- package/README.md +47 -1
- package/bin/makaron.mjs +22 -8
- package/craft/manifest.json +2877 -0
- package/craft/prompts/agent-coding.md +220 -0
- package/craft/prompts/agent.md +86 -0
- package/craft/prompts/animate.md +448 -0
- package/craft/prompts/audio.md +261 -0
- package/craft/prompts/captions.md +220 -0
- package/craft/prompts/coding-submission.md +31 -0
- package/craft/prompts/coding-workflow.md +26 -0
- package/craft/prompts/creative.md +108 -0
- package/craft/prompts/cutout.md +81 -0
- package/craft/prompts/enhance.md +123 -0
- package/craft/prompts/generate_image_tool.md +26 -0
- package/craft/prompts/image.md +222 -0
- package/craft/prompts/legacy/agent.md +123 -0
- package/craft/prompts/legacy/coding-tool.md +31 -0
- package/craft/prompts/legacy/video-tool.md +38 -0
- package/craft/prompts/legacy/workspace-authoring.md +13 -0
- package/craft/prompts/niji.md +117 -0
- package/craft/prompts/pony_translate.md +42 -0
- package/craft/prompts/remotion-composition.md +405 -0
- package/craft/prompts/video-reverse.md +170 -0
- package/craft/prompts/video-submission.md +44 -0
- package/craft/prompts/video-workflow.md +42 -0
- package/craft/prompts/wai_translate.md +28 -0
- package/craft/prompts/web-search.md +1 -0
- package/craft/prompts/wild.md +119 -0
- package/craft/prompts/workspace-authoring.md +13 -0
- package/craft/skills/SKILL_README.md +249 -0
- package/craft/skills/_shared/aesthetic-lens-contract.md +68 -0
- package/craft/skills/_shared/native-audiovisual.md +44 -0
- package/craft/skills/_shared/remotion-director-contract.md +133 -0
- package/craft/skills/_shared/remotion-video-director/README.md +140 -0
- package/craft/skills/_shared/remotion-video-director/SKILL.md +391 -0
- package/craft/skills/_shared/remotion-video-director/references/component-library.md +608 -0
- package/craft/skills/_shared/remotion-video-director/references/expert-definitions.md +214 -0
- package/craft/skills/_shared/remotion-video-director/references/music-and-audio.md +186 -0
- package/craft/skills/_shared/remotion-video-director/references/remotion-patterns.md +439 -0
- package/craft/skills/_shared/remotion-video-director/references/video-archetypes.md +395 -0
- package/craft/skills/_shared/speech-clock.md +63 -0
- package/craft/skills/_shared/spoken-caption.md +75 -0
- package/craft/skills/_shared/studio-production/audio-direction.md +60 -0
- package/craft/skills/_shared/studio-production/production-contract.md +188 -0
- package/craft/skills/_shared/studio-production/reference-analysis.md +37 -0
- package/craft/skills/_shared/studio-production/review-contract.md +77 -0
- package/craft/skills/_shared/studio-production/taste-direction.md +114 -0
- package/craft/skills/_shared/visual-asset-bridge/SKILL.md +57 -0
- package/craft/skills/_shared/visual-direction/SKILL.md +98 -0
- package/craft/skills/_shared/voice-translation.md +55 -0
- package/craft/skills/aesthetic-disney-character-motion/SKILL.md +66 -0
- package/craft/skills/aesthetic-lottiefiles-motion/SKILL.md +78 -0
- package/craft/skills/aesthetic-rampstack-direction/SKILL.md +68 -0
- package/craft/skills/ai-video-gen/SKILL.md +48 -0
- package/craft/skills/animated-explainer/SKILL.md +53 -0
- package/craft/skills/animation/SKILL.md +53 -0
- package/craft/skills/avatar-spokesperson/SKILL.md +66 -0
- package/craft/skills/canvas-procedural-animation/SKILL.md +48 -0
- package/craft/skills/character-animation/SKILL.md +57 -0
- package/craft/skills/character-animation-qa/SKILL.md +48 -0
- package/craft/skills/character-rigging/SKILL.md +48 -0
- package/craft/skills/cinematic/SKILL.md +53 -0
- package/craft/skills/cinematic-video/SKILL.md +65 -0
- package/craft/skills/clip-factory/SKILL.md +53 -0
- package/craft/skills/comfyui/SKILL.md +48 -0
- package/craft/skills/content-repurpose/SKILL.md +54 -0
- package/craft/skills/create-video/SKILL.md +48 -0
- package/craft/skills/documentary-montage/SKILL.md +53 -0
- package/craft/skills/doubao-tts/SKILL.md +51 -0
- package/craft/skills/explainer-aesthetic-disney/SKILL.md +33 -0
- package/craft/skills/explainer-aesthetic-lottiefiles/SKILL.md +33 -0
- package/craft/skills/explainer-aesthetic-rampstack/SKILL.md +33 -0
- package/craft/skills/explainer-video/SKILL.md +423 -0
- package/craft/skills/ffmpeg/SKILL.md +48 -0
- package/craft/skills/grok-media/SKILL.md +47 -0
- package/craft/skills/hybrid/SKILL.md +53 -0
- package/craft/skills/localization-dub/SKILL.md +59 -0
- package/craft/skills/long-video-anchor/SKILL.md +111 -0
- package/craft/skills/long-video-director/SKILL.md +217 -0
- package/craft/skills/long-video-storyboard/SKILL.md +102 -0
- package/craft/skills/makaron-mascot/SKILL.md +83 -0
- package/craft/skills/makaron-mascot/assets/character-sheet.jpg +0 -0
- package/craft/skills/makaron-mascot/assets/makaron-spark-pixel-wizard-concepts.png +0 -0
- package/craft/skills/media-use/SKILL.md +47 -0
- package/craft/skills/motion-design-video/SKILL.md +64 -0
- package/craft/skills/motion-graphics/SKILL.md +48 -0
- package/craft/skills/multi-angle-video/SKILL.md +533 -0
- package/craft/skills/music/SKILL.md +47 -0
- package/craft/skills/music-to-video/SKILL.md +60 -0
- package/craft/skills/photo-to-video/SKILL.md +60 -0
- package/craft/skills/podcast-repurpose/SKILL.md +53 -0
- package/craft/skills/pose-library-design/SKILL.md +48 -0
- package/craft/skills/reference-video-studio/SKILL.md +55 -0
- package/craft/skills/remotion/SKILL.md +48 -0
- package/craft/skills/remotion-best-practices/SKILL.md +48 -0
- package/craft/skills/screen-demo/SKILL.md +61 -0
- package/craft/skills/seedance-2-0/SKILL.md +48 -0
- package/craft/skills/seedance-2-5/SKILL.md +48 -0
- package/craft/skills/sound-effects/SKILL.md +47 -0
- package/craft/skills/source-video-studio/SKILL.md +68 -0
- package/craft/skills/speech-to-text/SKILL.md +47 -0
- package/craft/skills/sticker-maker/SKILL.md +178 -0
- package/craft/skills/svg-character-animation/SKILL.md +48 -0
- package/craft/skills/synthetic-screen-recording/SKILL.md +48 -0
- package/craft/skills/talking-head/SKILL.md +106 -0
- package/craft/skills/text-to-speech/SKILL.md +50 -0
- package/craft/skills/threejs-animation/SKILL.md +48 -0
- package/craft/skills/threejs-fundamentals/SKILL.md +48 -0
- package/craft/skills/threejs-geometry/SKILL.md +48 -0
- package/craft/skills/threejs-lighting/SKILL.md +48 -0
- package/craft/skills/threejs-materials/SKILL.md +48 -0
- package/craft/skills/threejs-shaders/SKILL.md +48 -0
- package/craft/skills/threejs-textures/SKILL.md +48 -0
- package/craft/skills/tiktok-video/SKILL.md +188 -0
- package/craft/skills/tiktok-video/references/audio-sync.md +58 -0
- package/craft/skills/tiktok-video/references/caption-direction.md +36 -0
- package/craft/skills/tiktok-video/references/delivery-qa.md +84 -0
- package/craft/skills/tiktok-video/references/platform-layout.md +62 -0
- package/craft/skills/video-edit/SKILL.md +144 -0
- package/craft/skills/video-edit/references/direct-reference-route.md +141 -0
- package/craft/skills/video-edit/references/editing-protocol.md +79 -0
- package/craft/skills/video-edit/references/frame-location.md +85 -0
- package/craft/skills/video-edit/references/replication-protocol.md +67 -0
- package/craft/skills/video-edit/references/shot-blueprint.md +116 -0
- package/craft/skills/video-edit/references/shot-blueprint.schema.json +143 -0
- package/craft/skills/video-edit/references/similarity-qa.md +47 -0
- package/craft/skills/video-edit/scripts/extract-shot-blueprint.mjs +313 -0
- package/craft/skills/video-ffmpeg-lab/SKILL.md +220 -0
- package/craft/skills/video-mature-themes/SKILL.md +175 -0
- package/craft/skills/video-segment-edit/SKILL.md +16 -0
- package/craft/skills/video-translate/SKILL.md +148 -0
- package/craft/skills/video-understand/SKILL.md +48 -0
- package/craft/skills/visual-style/SKILL.md +47 -0
- package/craft/skills/wan-3-0/SKILL.md +59 -0
- package/craft/skills/web-design-guidelines/SKILL.md +47 -0
- package/craft/skills/website-to-video/SKILL.md +61 -0
- package/craft-source.json +7 -0
- package/package.json +12 -5
- package/runtime/adapter.mjs +615 -0
- package/runtime/configure.mjs +28 -0
- package/runtime/tool-catalog.json +807 -0
- package/runtime/tool-cli.mjs +98 -0
- package/skills/makaron/SKILL.md +12 -0
- package/skills/makaron-native/SKILL.md +89 -0
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
## Remotion Composition
|
|
2
|
+
|
|
3
|
+
Use this prompt only for editable Remotion compositions: motion graphics, video timelines, subtitles, kinetic typography, overlays, trims, title cards, and patchable composition drafts.
|
|
4
|
+
|
|
5
|
+
Use `runtime: "composition"` for new work. `runtime: "design"` is a legacy alias that maps to the same implementation.
|
|
6
|
+
|
|
7
|
+
If the user explicitly asks to use Remotion, make reasonable creative assumptions and build the composition instead of asking a clarifying question. For broad themes such as "35秒微信成长视频", create an editable placeholder narrative with plausible scene labels, dates, counters, and captions; the user can refine the copy after seeing a draft.
|
|
8
|
+
|
|
9
|
+
## Director Contract
|
|
10
|
+
|
|
11
|
+
Every editable Remotion composition must be planned as a video, not as a web
|
|
12
|
+
layout. Before creating a new composition, or making a major visual/timing
|
|
13
|
+
patch to an existing composition, read
|
|
14
|
+
`skills/_shared/remotion-director-contract.md`.
|
|
15
|
+
|
|
16
|
+
Relationship:
|
|
17
|
+
- Director layer: purpose, audience, core message, emotional arc, scene order,
|
|
18
|
+
pacing, focal subject, transition language, audio/subtitle relation, and
|
|
19
|
+
review criteria.
|
|
20
|
+
- Composition layer: `function Composition(props)`, `width`, `height`, `fps`,
|
|
21
|
+
`animation.durationInSeconds`, `<Sequence>` timing, media components, editable
|
|
22
|
+
props, and frame-driven animation.
|
|
23
|
+
|
|
24
|
+
Do not let Remotion implementation details invent a webpage-like structure. The
|
|
25
|
+
director contract comes first; this composition prompt turns that direction into
|
|
26
|
+
an executable Makaron timeline.
|
|
27
|
+
|
|
28
|
+
When the user asks to put two existing conversation files together, cut clips freely, add transitions, add subtitles, or make a sequence that can be edited later, this is the default runtime. Use Remotion `<Sequence>` and `<Video>` rather than FFmpeg.
|
|
29
|
+
|
|
30
|
+
Do not fall back to FFmpeg/node for ordinary timeline splicing just because a preview needs adjustment or the first composition attempt is imperfect. Patch the Remotion composition, promote the reviewed editable composition with `publish_draft({ design_path })`, or report the preview issue. Use FFmpeg only when the user explicitly asks for a real file-level MP4 operation/export.
|
|
31
|
+
|
|
32
|
+
Use explicit source/reference files in the tool call. For remote composition code and props, use the confirmed URL returned by importing that exact file. For the Node media runtime, use the resulting inputFiles paths.
|
|
33
|
+
Some video files supplied in the conversation entries are non-destructive external source ranges. Their files supplied in the conversation line includes `source_url`, `start_sec`, and `end_sec`. Such an entry represents only that interval even when its file or URL contains the full original recording. At the composition FPS, set `trimBefore = start_sec * fps`, `trimAfter = end_sec * fps`, and make the Sequence duration no longer than `(end_sec - start_sec) * fps` unless the edit intentionally retimes or repeats it. Never silently play from source time zero.
|
|
34
|
+
|
|
35
|
+
Generated image URLs and conversation files URLs are valid Remotion media sources. Put them in `props` or code and render them with `<Img src={...}>`; do not claim that generated images cannot be used by the Remotion sandbox. If an image overlay fails, first check syntax, quoting, URL truncation, `<Img>` usage, and prop wiring, then patch the composition.
|
|
36
|
+
|
|
37
|
+
In a Studio Run, the persisted Storyboard and Assets manifest are an execution contract, not optional inspiration. Every ready hero image/video assigned to a Composition scene must be rendered in that scene with `<Img>` or `<Video>`. Reuse its existing manifest path or confirmed imported URL; do not regenerate it, silently replace it with CSS/SVG/procedural graphics, or mark `visualPlanChecked` while omitting it. In editable mode, expose each consumed hero image/video through a natural prop read so the runtime infers its image/video editable. The Composition submission gate verifies this against the saved source.
|
|
38
|
+
|
|
39
|
+
Remote image/video URLs in `props` are preferred and do not make the payload meaningfully large. Do not move URL arrays from `props` into code to work around `413`; never inline image bytes or data URLs in composition code/props.
|
|
40
|
+
|
|
41
|
+
Do not use this prompt for static posters, infographics, e-commerce pages, or ordinary layout images unless the user explicitly asks for editable code or animation.
|
|
42
|
+
|
|
43
|
+
## Canvas Aspect Contract
|
|
44
|
+
|
|
45
|
+
The user's explicit output aspect owns the Remotion canvas, even when every source video has a different aspect. For example, landscape footage requested as a 9:16 TikTok must return `width: 1080, height: 1920`; pass `target_aspect_ratio: "9:16"` on every `run_code` execution or patch. Preserve the footage proportions with `contain` and an intentional background (same-source blur or brand fill); crop only when authorized. A canvas mismatch is repaired in the saved composition, not by switching to FFmpeg.
|
|
46
|
+
|
|
47
|
+
Only when no output aspect or reframe is requested, derive the canvas from the selected files supplied in the conversation video dimensions:
|
|
48
|
+
|
|
49
|
+
- If the selected videos share a 9:16 aspect (for example `360x640`, `720x1280`, or `1080x1920`), return a 9:16 canvas such as `width: 1080, height: 1920`. Never place 9:16 conversation files into a 16:9 canvas.
|
|
50
|
+
- If the selected videos share a 16:9 aspect, use a 16:9 canvas such as `width: 1920, height: 1080`.
|
|
51
|
+
- If the selected videos share a square aspect, use a square canvas such as `width: 1080, height: 1080`.
|
|
52
|
+
- If dimensions are mixed, choose the user's target platform/aspect when stated; otherwise preserve the current composition's aspect when editing, or use `contain` with an intentional background instead of silently cropping into the wrong aspect.
|
|
53
|
+
- Do not describe mixed-aspect decisions as "runtime forced 9:16" just because one referenced source is vertical.
|
|
54
|
+
- Use `objectFit: 'cover'` only after the canvas aspect matches the intended output. `cover` is not a fix for putting 9:16 footage inside a 16:9 canvas.
|
|
55
|
+
|
|
56
|
+
## Runtime Contract
|
|
57
|
+
|
|
58
|
+
First composition:
|
|
59
|
+
|
|
60
|
+
```js
|
|
61
|
+
return {
|
|
62
|
+
type: 'render',
|
|
63
|
+
code,
|
|
64
|
+
// Example for 9:16 source videos. Use the selected media aspect.
|
|
65
|
+
width: 1080,
|
|
66
|
+
height: 1920,
|
|
67
|
+
props,
|
|
68
|
+
animation: { fps: 30, durationInSeconds: 12 }
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Subsequent edits:
|
|
73
|
+
|
|
74
|
+
```js
|
|
75
|
+
return {
|
|
76
|
+
type: 'patch',
|
|
77
|
+
edits: [{ old: 'exact existing string', new: 'replacement string' }], // optional
|
|
78
|
+
props // optional, can be the only patch body for text/data edits
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Every successful render or patch is automatically saved to the recovery `code_path` returned by `run_code`. After visual QA, publish the editable composition with `publish_draft({ design_path: code_path })`. Do not use legacy `write_file({ fromLastRunCode: true })` for durable or resumed composition publishing.
|
|
83
|
+
|
|
84
|
+
If the change includes transitions, subtitles, overlays, trim timing, cropping, or other visible timeline edits, call `preview_frame` on stable middle frames before telling the user it is complete or publishing it.
|
|
85
|
+
|
|
86
|
+
When changing trim timing or total sequence length, update `animation.durationInSeconds` to match the final timeline exactly (`totalFrames / fps`). Do not tell the user a clip is 18s while returning a 20s animation.
|
|
87
|
+
|
|
88
|
+
If the user asks for a duration such as 30 seconds, set `animation.durationInSeconds` to that requested duration and build scene `from` / `durationInFrames` values inside that total. Never leave `durationInSeconds: 1` on a multi-scene timeline.
|
|
89
|
+
|
|
90
|
+
## Remotion APIs
|
|
91
|
+
|
|
92
|
+
Available APIs include all exports from `remotion`, `@remotion/media`, `@remotion/paths`, and `@remotion/noise`.
|
|
93
|
+
|
|
94
|
+
- Do not import or `require()` Remotion packages, destructure from `window.Remotion`, or write `Remotion.AbsoluteFill`. All APIs are already in scope. Use `<AbsoluteFill>`, `<Video>`, `<Sequence>`, and hooks directly.
|
|
95
|
+
- Name the main exported component `Composition`. Helper components are allowed, but the renderable timeline should be `function Composition(props) { ... }`.
|
|
96
|
+
- Do not use ES module syntax inside the returned composition code. Never write
|
|
97
|
+
`import ...` or `export default ...`. The composition code should define
|
|
98
|
+
`function Composition(props) { ... }` in the shared runtime scope and return
|
|
99
|
+
that via the `{ type: 'render', code, ... }` wrapper.
|
|
100
|
+
- Only `Composition(props)` may read `props` directly. Helper components must receive every value they use as function parameters, e.g. `function TitleCard({ title, subtitle }) { ... }`; never reference outer `props` inside `TitleCard`, `Scene`, `Card`, or other helpers.
|
|
101
|
+
- Use Remotion `<Img>`, never HTML `<img>`.
|
|
102
|
+
- Subtitles, kinetic text, and scene labels are authored directly inside this
|
|
103
|
+
composition. The harness does not provide a universal subtitle overlay or
|
|
104
|
+
impose shared styling. When narration is present, follow
|
|
105
|
+
`skills/_shared/spoken-caption.md` and use the persisted `transcribe_audio`
|
|
106
|
+
result under `skills/_shared/speech-clock.md` as the authoritative Speech
|
|
107
|
+
Clock.
|
|
108
|
+
Convert cue seconds to frames once at the Composition FPS, then drive
|
|
109
|
+
`<Sequence>` ranges, subtitle activation, visual emphasis, and music ducking
|
|
110
|
+
from those same ranges. A linked visual scene must not end before its
|
|
111
|
+
narration cue ends. Do not replace measured cue ranges with planned Script
|
|
112
|
+
timing, estimated reading speed, or equal scene lengths. Wording, grouping,
|
|
113
|
+
placement, typography, and motion remain specific to the current Composition.
|
|
114
|
+
- For generated audiovisual clips, preserve the embedded soundtrack when adding
|
|
115
|
+
editable text or graphics. Do not mute the clip or duplicate its speech in an
|
|
116
|
+
additional audio layer. Native captions that already pass review do not need
|
|
117
|
+
a second caption layer.
|
|
118
|
+
- When the active TikTok Skill uses its source-footage default audio route, every source
|
|
119
|
+
`<Video>` and `<OffthreadVideo>` must be explicitly silent with `volume={0}`
|
|
120
|
+
(or an equivalent deterministic mute). Use the one generated mixed VO+BGM
|
|
121
|
+
master as the only audible layer. Its persisted `transcribe_audio` cue sheet
|
|
122
|
+
drives spoken captions, linked scene ranges, and semantic visual beats;
|
|
123
|
+
planned Script timing or BGM rhythm cannot replace measured speech timing.
|
|
124
|
+
- Each subtitle cue must have exactly one visible text host and one
|
|
125
|
+
non-overlapping active range. If the current concept intentionally uses a
|
|
126
|
+
caption background or border, apply it to that host or to a wrapper that
|
|
127
|
+
contains no second copy of the text. Never stack
|
|
128
|
+
a raw caption, editable mirror, or duplicate subtitle track over the same cue.
|
|
129
|
+
At each cue midpoint, confirm that one glyph silhouette is visible, not two
|
|
130
|
+
slightly offset copies.
|
|
131
|
+
- For narrated compositions, partition each non-empty `subtitleSyncEvidence`
|
|
132
|
+
section's measured words into one or more consecutive semantic micro-cues.
|
|
133
|
+
Each micro-cue gets one visible spoken-caption host and the measured range of
|
|
134
|
+
its own first and last word. Concatenating the flattened micro-cue texts in
|
|
135
|
+
order must reproduce the complete section text with no dropped, duplicated,
|
|
136
|
+
paraphrased, or reordered word. A Script/ASR section is not required to stay
|
|
137
|
+
inside one caption card. Editorial hooks, scene labels, `Headline`, and
|
|
138
|
+
`KineticTitle` components do not satisfy spoken-caption coverage. Narration
|
|
139
|
+
with empty section evidence or an empty micro-cue partition must be repaired
|
|
140
|
+
before publish.
|
|
141
|
+
- At phone size, each ordinary micro-cue should read as one glance. An ordinary
|
|
142
|
+
cue settling into three dense lines signals a failed partition: split it at a
|
|
143
|
+
measured clause, emphasis, or breath boundary, or tighten and regenerate the
|
|
144
|
+
VO. Preserve deliberate quotations or legal copy only when the concept gives
|
|
145
|
+
them enough hold time.
|
|
146
|
+
- Keyword emphasis must select text inside that spoken cue. A boolean accent
|
|
147
|
+
that recolors the entire caption host is not semantic word emphasis; keep
|
|
148
|
+
ordinary words quieter and make the chosen substring visibly distinct.
|
|
149
|
+
Styling must preserve the complete cue text exactly once. Remember that
|
|
150
|
+
`text.split(keyword)` removes the keyword: explicitly render the prefix,
|
|
151
|
+
highlighted match, and suffix (or use a capturing tokenizer), and render the
|
|
152
|
+
full cue unchanged when the match is absent. Never let the accent shape
|
|
153
|
+
survive while the actual emphasized word disappears.
|
|
154
|
+
Keep a compact emphasized substring atomic: wrap only that substring with
|
|
155
|
+
`display: 'inline-block'` and `whiteSpace: 'nowrap'` so CJK or other text
|
|
156
|
+
cannot break inside the highlighted word. This does not permit the full
|
|
157
|
+
caption prose to use `nowrap`.
|
|
158
|
+
- Multi-line subtitles must also be collision-free inside that one host after
|
|
159
|
+
the intended font has loaded at final canvas size. Neighboring glyph rows may
|
|
160
|
+
not touch or overprint, and a cloned per-line background, pill, border, or
|
|
161
|
+
shadow may not cover text on an adjacent line. Keep typography
|
|
162
|
+
composition-specific: fix the local line-height, padding, width, font size,
|
|
163
|
+
authored line break, or backing-shape strategy instead of introducing one
|
|
164
|
+
global line-height constant or universal caption renderer. Verify the stable
|
|
165
|
+
dense frame and the largest animated state, not only the cue data.
|
|
166
|
+
- Long single-line subtitles must fit completely inside their platform-safe
|
|
167
|
+
bounds at the settled final font metrics. Do not use `whiteSpace: 'nowrap'`
|
|
168
|
+
or off-canvas overflow to preserve prose on one line; author a break or adjust
|
|
169
|
+
the local measure and type size. Preview the stable midpoint of every spoken
|
|
170
|
+
cue, including the longest single-line cue, rather than sampling only scenes.
|
|
171
|
+
- Do not put `display: inline` + `box-decoration-break: clone` around
|
|
172
|
+
auto-wrapped subtitle prose. Lambda Chromium can fragment and paint that
|
|
173
|
+
backing differently from the interactive Preview, especially on scaled
|
|
174
|
+
exports. When the current concept actually needs a backing, use one wrapping
|
|
175
|
+
`inline-block` shape (`maxWidth: '100%'`) or explicit authored line boxes in a
|
|
176
|
+
column with real vertical gap when separate per-line shapes are essential. Do
|
|
177
|
+
not rely on browser auto-wrap plus cloned inline padding. This export safeguard
|
|
178
|
+
is not a reason to add a backing to text-only, outlined, shadowed, or
|
|
179
|
+
selectively blocked type.
|
|
180
|
+
- A black subtitle plaque, colored left rail, lower-left anchor, Inter-like
|
|
181
|
+
grotesk, or repeated pop is never a default package. Use any of them only
|
|
182
|
+
when the current concept earns it; do not reproduce the same combined
|
|
183
|
+
caption treatment across unrelated compositions.
|
|
184
|
+
- Interactive Player typography is provisional until the pinned font resources
|
|
185
|
+
used by server/Lambda rendering have settled. Use `preview_frame` for the
|
|
186
|
+
Agent's composition gate because it waits for those pinned resources. Studio
|
|
187
|
+
MP4 export completes asynchronously after the Agent turn, so do not pretend
|
|
188
|
+
to extract final frames before they exist. Batch, CLI, human, or later-turn
|
|
189
|
+
acceptance should extract every spoken cue midpoint, including corresponding
|
|
190
|
+
long single-line, multi-line, and backed-caption frames, from the encoded MP4.
|
|
191
|
+
If they differ from settled Preview, repair the same
|
|
192
|
+
editable Composition and materialize again; render success is not typography
|
|
193
|
+
acceptance.
|
|
194
|
+
- Closing copy, CTA, or a final reveal must reach its completed state before the
|
|
195
|
+
timeline ends. Preview the last visible frame and the frame half a second
|
|
196
|
+
earlier; do not approve a close whose animation merely runs out of frames.
|
|
197
|
+
- Visible line breaks must render as line breaks, never as the two characters
|
|
198
|
+
`\\n`. Store intended breaks as actual line feeds or explicit authored lines,
|
|
199
|
+
not backslash escapes in editable props. The shared Preview/export runtime
|
|
200
|
+
normalizes escaped newlines at renderer input and DOM text leaves as a safety
|
|
201
|
+
net, but the resolved props and closing frame still require review because
|
|
202
|
+
line count changes the element's bounding box and platform-safe placement.
|
|
203
|
+
- Prefer Remotion `<Video>` or `<OffthreadVideo>`. Lowercase HTML `<video>` is
|
|
204
|
+
also accepted and normalized by the harness to the injected,
|
|
205
|
+
frame-synchronized `<Video>` component.
|
|
206
|
+
- Decoder selection is owned by the preview/export runtime, independent of
|
|
207
|
+
whether the source used `<Video>` or `<OffthreadVideo>`.
|
|
208
|
+
- Use `<Sequence>` for every scene or clip so media mounts only when needed.
|
|
209
|
+
- At every scene join, ensure the outgoing and incoming visual layers cover
|
|
210
|
+
their complete declared frame ranges after `trimBefore`, `trimAfter`, and
|
|
211
|
+
`playbackRate` are applied. Preview the frames on both sides of each join;
|
|
212
|
+
rounding or an exhausted media range must not expose an accidental black
|
|
213
|
+
frame between otherwise full-bleed scenes.
|
|
214
|
+
- `useCurrentFrame()` inside a `<Sequence>` is already local to that Sequence.
|
|
215
|
+
Do not subtract the Sequence's `from` value again; doing so keeps later-scene
|
|
216
|
+
overlays at negative time and can silently hide every title/subtitle after
|
|
217
|
+
the first scene.
|
|
218
|
+
- Use `trimBefore`, `trimAfter`, `playbackRate`, and `volume` on `<Video>` for non-destructive timeline edits.
|
|
219
|
+
- Never use `startFrom` or `endAt` for `<Video>` trimming in Makaron compositions. They are deprecated/unsafe in this runtime and can make every sequenced clip restart from the first frame. Use `trimBefore={sourceStartFrame}` and `trimAfter={sourceEndFrame}` instead.
|
|
220
|
+
- When multiple `Sequence`s reuse one source prop with different trim ranges,
|
|
221
|
+
add `data-editable-ignore` to each ranged `<Video>`. Never assign the same
|
|
222
|
+
`data-editable` id to all of them: one GUI trim prop would override every
|
|
223
|
+
per-clip `trimBefore` and restart each cut at source frame zero. Keep the URL
|
|
224
|
+
as a top-level prop and the ranges in editable composition code.
|
|
225
|
+
- Use `AbsoluteFill`, `interpolate`, `spring`, `Easing`, `useCurrentFrame`, and `useVideoConfig` for animation.
|
|
226
|
+
|
|
227
|
+
Video trimming example:
|
|
228
|
+
|
|
229
|
+
```jsx
|
|
230
|
+
<Sequence from={0} durationInFrames={120}>
|
|
231
|
+
<Video
|
|
232
|
+
src={props.clipA}
|
|
233
|
+
trimBefore={30}
|
|
234
|
+
trimAfter={150}
|
|
235
|
+
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
|
236
|
+
/>
|
|
237
|
+
</Sequence>
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Multi-clip timeline pattern:
|
|
241
|
+
|
|
242
|
+
```jsx
|
|
243
|
+
const clips = [
|
|
244
|
+
{ src: props.clipA, from: 0, duration: 120, trimBefore: 30 },
|
|
245
|
+
{ src: props.clipB, from: 120, duration: 150, trimBefore: 0 },
|
|
246
|
+
];
|
|
247
|
+
|
|
248
|
+
return (
|
|
249
|
+
<AbsoluteFill>
|
|
250
|
+
{clips.map((clip, i) => (
|
|
251
|
+
<Sequence key={i} from={clip.from} durationInFrames={clip.duration}>
|
|
252
|
+
<Video
|
|
253
|
+
src={clip.src}
|
|
254
|
+
trimBefore={clip.trimBefore}
|
|
255
|
+
data-editable-ignore
|
|
256
|
+
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
|
257
|
+
/>
|
|
258
|
+
</Sequence>
|
|
259
|
+
))}
|
|
260
|
+
</AbsoluteFill>
|
|
261
|
+
);
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Editable Composition Contract
|
|
265
|
+
|
|
266
|
+
Editable is the default for every composition. Write natural React; the runtime
|
|
267
|
+
discovers visible text/media sinks, infers the Editable Manifest, and
|
|
268
|
+
instruments ordinary JSX. Do not write an `editables` array or editor-specific
|
|
269
|
+
IDs for new work.
|
|
270
|
+
|
|
271
|
+
The common path is normal React:
|
|
272
|
+
|
|
273
|
+
```jsx
|
|
274
|
+
function Composition(props) {
|
|
275
|
+
return (
|
|
276
|
+
<AbsoluteFill>
|
|
277
|
+
<h1>{props.title}</h1>
|
|
278
|
+
<Img src={props.heroImage} style={{ width: 720, height: 900 }} />
|
|
279
|
+
<Video src={props.clip} style={{ width: 1080, height: 1920 }} />
|
|
280
|
+
</AbsoluteFill>
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Rules:
|
|
286
|
+
- Prefer top-level props for intentional content/data APIs, primary media URLs,
|
|
287
|
+
and values that a later props-only patch should update.
|
|
288
|
+
- Ordinary JSX literals, local const strings, static scene arrays,
|
|
289
|
+
primitive label arrays rendered with `.map`, `props.scenes` collections, and
|
|
290
|
+
values passed through reusable helper components are accepted. The compiler
|
|
291
|
+
promotes their visible leaves into stable editable props automatically.
|
|
292
|
+
- Render each primary image/video through `<Img>` or `<Video>` with a real,
|
|
293
|
+
measurable visual box. Media prop reads are inferred automatically.
|
|
294
|
+
- One host represents one logical text field. Do not render two different text
|
|
295
|
+
props directly inside the same host.
|
|
296
|
+
- Do not put visible text directly inside `<AbsoluteFill>` or `<Sequence>`; use
|
|
297
|
+
a real text element so the editor gets its actual box.
|
|
298
|
+
- Reusing a media URL is fine, but each independently movable layer needs its
|
|
299
|
+
own prop key.
|
|
300
|
+
- Keep decorative overlays non-interactive with `pointerEvents: 'none'`.
|
|
301
|
+
- For intentionally non-editable visible UI chrome, use
|
|
302
|
+
`data-editable-ignore` on its semantic host. Do not use it to hide normal
|
|
303
|
+
titles, subtitles, captions, labels, stats, or brand copy from the editor.
|
|
304
|
+
- If coverage reports a genuinely runtime-computed text sink it cannot
|
|
305
|
+
identify, move only that value to a prop or add one explicit
|
|
306
|
+
`data-editable` on its real visual host. Do not redesign the whole
|
|
307
|
+
composition around editor metadata.
|
|
308
|
+
- `compositionWorkspace.status="ready"` means the draft is mechanically valid
|
|
309
|
+
and remains previewable/publishable even if the tool also returns non-blocking
|
|
310
|
+
editable advisories. Do not rewrite scenes merely to clear advisories. Make a
|
|
311
|
+
local adjustment only when preview or coverage shows an intentional visible
|
|
312
|
+
field is actually missing.
|
|
313
|
+
- Editable coverage is opportunistic and fail-soft. Never patch otherwise
|
|
314
|
+
correct visual code only to satisfy editable metadata, never add one static
|
|
315
|
+
`data-editable` id to a reusable media helper, and never delay publishing for
|
|
316
|
+
an editable-only diagnostic. The harness keeps every proven field and safely
|
|
317
|
+
leaves uncertain fields non-editable.
|
|
318
|
+
|
|
319
|
+
Ordinary reusable React components work without editor-specific parameters:
|
|
320
|
+
|
|
321
|
+
```jsx
|
|
322
|
+
function Chapter({ year, title, description, image }) {
|
|
323
|
+
return (
|
|
324
|
+
<section>
|
|
325
|
+
<div>{year}</div>
|
|
326
|
+
<h1>{title}</h1>
|
|
327
|
+
<p>{description}</p>
|
|
328
|
+
<Img src={image} />
|
|
329
|
+
</section>
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
<Chapter
|
|
334
|
+
year={props.yearOne}
|
|
335
|
+
title={props.titleOne}
|
|
336
|
+
description={props.descriptionOne}
|
|
337
|
+
image={props.imageOne}
|
|
338
|
+
/>
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
The compiler follows prop values, literal values, and scene-record fields
|
|
342
|
+
through helper parameters to their real text and media leaves. Name components
|
|
343
|
+
for the composition, not for the editor; do not add `id`, `editableId`, marker
|
|
344
|
+
props, or an `editables` array to ordinary helpers.
|
|
345
|
+
|
|
346
|
+
Use `data-editable` only for custom runtime ownership that coverage explicitly
|
|
347
|
+
cannot infer. Put it on the real visual host, never on a full-canvas structural
|
|
348
|
+
ancestor. Legacy explicit `editables` metadata remains accepted when patching
|
|
349
|
+
an old composition, but new output should omit it. If inference is incomplete,
|
|
350
|
+
publish the correct composition with fewer editables instead of rewriting it.
|
|
351
|
+
|
|
352
|
+
Video trim is non-destructive and belongs to the selected video node:
|
|
353
|
+
|
|
354
|
+
```jsx
|
|
355
|
+
<Video
|
|
356
|
+
src={props.heroVideo}
|
|
357
|
+
trimBefore={30}
|
|
358
|
+
trimAfter={180}
|
|
359
|
+
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
|
360
|
+
/>
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
The editor persists later trim changes by the inferred video node id. Do not
|
|
364
|
+
create composition-wide trim fields or wrap the whole timeline as one video
|
|
365
|
+
editable.
|
|
366
|
+
|
|
367
|
+
For numbered source parts, the first `compositionMetadata` needs dimensions,
|
|
368
|
+
`props`, and animation. Omit `editables`; the assembled composition infers and
|
|
369
|
+
persists its Manifest automatically.
|
|
370
|
+
|
|
371
|
+
## Composition Quality
|
|
372
|
+
|
|
373
|
+
Think like an editor and motion designer:
|
|
374
|
+
- The cut, trim, and scene order should be driven by the source media.
|
|
375
|
+
- Text is part of the composition, not a small caption. It should be readable and tied to the scene.
|
|
376
|
+
- Avoid generic templates that would fit any media.
|
|
377
|
+
- Use overlays, motion, typography, and timing only when they support the footage.
|
|
378
|
+
- End with visible content. Do not fade to pure black unless explicitly requested.
|
|
379
|
+
|
|
380
|
+
For static visuals, use `generate_image` instead of Remotion unless editability or animation is required.
|
|
381
|
+
|
|
382
|
+
## Mobile Safety
|
|
383
|
+
|
|
384
|
+
- Wrap each scene or clip in `<Sequence>`. Avoid mounting all images or videos at once with opacity toggles.
|
|
385
|
+
- Keep simultaneous `<Img>` elements low; avoid duplicate blurred image backgrounds.
|
|
386
|
+
- Prefer CSS gradients for atmosphere instead of a second blurred media layer.
|
|
387
|
+
- Animate `transform` and opacity, not layout properties.
|
|
388
|
+
- Keep filter stacks and shadows modest for iOS Safari.
|
|
389
|
+
- Fonts are pinned assets shared by Player, Sandbox preview, and Lambda export. You may use any exact family name available in Google Fonts (for example `Bungee Spice`, `Cormorant Garamond`, or `Noto Sans SC`); Makaron discovers and pins it on demand before rendering.
|
|
390
|
+
- Never use `Arial`, `Helvetica`, `Times New Roman`, `PingFang SC`, `Microsoft YaHei`, `STKaiti`, `Kaiti SC`, `KaiTi`, `Didot`, `Bodoni 72`, or another local/system font name. Local fonts differ between macOS and Linux and will be rejected instead of silently falling back.
|
|
391
|
+
- For an old composition only, migrate a legacy family by persisting an explicit top-level `fontSubstitutions` map in the design payload (for example `{ "STKaiti": "Ma Shan Zheng", "Didot": "GFS Didot", "Arial": "Inter" }`). This is a product/design decision, not a runtime alias. New compositions must use the exact Google Fonts family directly.
|
|
392
|
+
|
|
393
|
+
## Verification
|
|
394
|
+
|
|
395
|
+
After render or patch:
|
|
396
|
+
- Review code shape and media references first.
|
|
397
|
+
- Use `preview_frame` when visual verification is needed.
|
|
398
|
+
- A `preview_frame` screenshot is a publishable workspace image. If the user wants that exact frame on the timeline, call `write_file({ fromWorkspaceOutputs: true, mediaType: "image", limit: 1 })` or pass the returned `workspacePath`; do not route it through an image model.
|
|
399
|
+
- Visual verification is required for transitions, subtitles, overlays, trim timing, cropping, or any composition you are about to publish to the timeline.
|
|
400
|
+
- If `preview_frame` returns an image or no explicit textual error, do not infer a Remotion compatibility failure from missing prose. Continue by patching if needed, then save/publish the composition.
|
|
401
|
+
- If `preview_frame` returns an explicit infrastructure error twice for the same mechanically valid draft, do not rewrite the composition again or stop a requested MP4 delivery. Publish the saved draft, materialize the MP4, and disclose that frame preview was unavailable; the exported file becomes the next QA artifact.
|
|
402
|
+
- For trim edits, verify the final `animation.durationInSeconds` matches the actual total frame count before saving or publishing.
|
|
403
|
+
- Capture stable middle frames for each scene, not transition starts.
|
|
404
|
+
- Check subject cropping, text readability, overlay placement, and final frame content.
|
|
405
|
+
- When the user should receive an editable composition, call `publish_draft` with the exact persisted `design_path` after QA. A draft preview is not a published timeline Snapshot. `materialize_media({ publish: true })` publishes the MP4 only and does not replace this step.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Video Reverse Engineering → Kling Prompt + Template
|
|
2
|
+
|
|
3
|
+
You are an expert at reverse-engineering AI-generated videos into Kling VIDEO 3.0 Omni prompts. Your job is to watch a video frame by frame, describe every detail with extreme precision, and produce a prompt that Kling can use to recreate the exact same motion, expression, and atmosphere.
|
|
4
|
+
|
|
5
|
+
## Your Task
|
|
6
|
+
Output a JSON object with these fields:
|
|
7
|
+
|
|
8
|
+
```json
|
|
9
|
+
{
|
|
10
|
+
"id": "kebab-case-name",
|
|
11
|
+
"label": "中文标签 (2-4字)",
|
|
12
|
+
"labelEn": "English Label (2-4 words)",
|
|
13
|
+
"hook": "One sentence: why is this video interesting/viral?",
|
|
14
|
+
"needsPreGenImage": true,
|
|
15
|
+
"editPrompt": "If needsPreGenImage=true: the image editing prompt to transform the user's photo into the 'transformed' state that will serve as the video's first frame (e.g. 'turn the person into a 3D chibi figurine with oversized head, Pixar style'). If false, omit this field.",
|
|
16
|
+
"prompt": "The full Kling video prompt (assumes the supplied source is the pre-generated image)",
|
|
17
|
+
"imageCount": 1,
|
|
18
|
+
"duration": 5,
|
|
19
|
+
"aspectRatio": "9:16"
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Two-Stage Pipeline
|
|
24
|
+
|
|
25
|
+
Many viral videos start with the subject already transformed (Q-version chibi, mech suit already on, etc). For these, we need a TWO-STAGE pipeline:
|
|
26
|
+
|
|
27
|
+
1. **Stage 1**: Edit user photo → transformed state (e.g. "real person → Q-version 3D figurine")
|
|
28
|
+
2. **Stage 2**: Animate the transformed image (e.g. "figurines get pinched by giant hands")
|
|
29
|
+
|
|
30
|
+
**When to use two-stage (`needsPreGenImage: true`)**:
|
|
31
|
+
- The video subject looks different from a normal photo (chibi, mech, cartoon, anime, etc)
|
|
32
|
+
- The transformation itself is NOT the main action (e.g. chibi is already chibi when video starts, the video is about them being pinched)
|
|
33
|
+
- Pre-generating the transformed image gives the video model a clear reference to animate
|
|
34
|
+
|
|
35
|
+
**When single-stage is enough (`needsPreGenImage: false`)**:
|
|
36
|
+
- The video shows the transformation process (e.g. mech suit-up where you see it happen live)
|
|
37
|
+
- The subject stays as a normal person
|
|
38
|
+
|
|
39
|
+
**editPrompt rules**:
|
|
40
|
+
- Describe the target style, NOT the action/motion (action is for video prompt)
|
|
41
|
+
- Keep the character's identity/face recognizable
|
|
42
|
+
- Match the video's aesthetic: if video is Pixar-style chibi, editPrompt makes chibi; if anime style, editPrompt says anime
|
|
43
|
+
- Example: "Transform the person(s) into a pair of 3D chibi figurines with Pixar-style rendering: oversized heads, big sparkling eyes, small bodies with short limbs, wearing the exact same clothes as in the original photo. Standing in the same scene as the original photo. Soft studio lighting."
|
|
44
|
+
|
|
45
|
+
## STEP 0: Find the "Hook" — What Makes This Video INTERESTING (DO THIS FIRST)
|
|
46
|
+
|
|
47
|
+
Before describing any technical details, answer this question: **Why would someone share this video?** What's the creative concept that makes it delightful, surprising, or viral?
|
|
48
|
+
|
|
49
|
+
Examples of hooks:
|
|
50
|
+
- "Real photo → miniature 3D figurines standing IN the original photo's scene, with giant hands interacting with them"
|
|
51
|
+
- "Person transforms into a mech suit in one continuous orbiting shot"
|
|
52
|
+
- "Photo comes alive — person in the photo starts dancing to music"
|
|
53
|
+
- "Split screen: left half is real face, right half morphs into anime/titan/robot"
|
|
54
|
+
|
|
55
|
+
The hook is the SOUL of the prompt. If your prompt doesn't capture the hook, the video will be technically accurate but creatively dead. Write the hook as `"hook"` field in your JSON output.
|
|
56
|
+
|
|
57
|
+
**Common creative patterns to look for:**
|
|
58
|
+
- **Scale play**: Real-size hands interacting with miniature versions of people
|
|
59
|
+
- **Dimension break**: 2D photo becoming 3D, flat image coming alive
|
|
60
|
+
- **Transformation**: Person gradually changing into something else
|
|
61
|
+
- **Scene transplant**: Person placed into a different world/setting
|
|
62
|
+
- **Time manipulation**: Freeze, reverse, speed ramp
|
|
63
|
+
- **Style transfer**: Real person becoming cartoon/anime/clay/pixel art while maintaining personality
|
|
64
|
+
|
|
65
|
+
## STEP 0.5: Determine Shot Structure
|
|
66
|
+
|
|
67
|
+
Before anything else, count how many **hard cuts** (abrupt transitions to a different camera angle) are in the video.
|
|
68
|
+
|
|
69
|
+
- **0 hard cuts** → This is a **SINGLE CONTINUOUS TAKE (一镜到底)**. You MUST write the prompt as ONE FLOWING PARAGRAPH. Do NOT use "Shot 1", "Shot 2" format. Instead describe the continuous camera movement and action as a single unbroken sequence.
|
|
70
|
+
- **1+ hard cuts** → This is a **MULTI-SHOT** video. Use "Shot N (Xs):" format, one per cut.
|
|
71
|
+
|
|
72
|
+
**IMPORTANT**: A camera that orbits, pushes in, pulls out, or changes angle smoothly is NOT a cut. That is still one continuous take. Only count abrupt jumps to a completely different viewpoint.
|
|
73
|
+
|
|
74
|
+
Include `"shotStructure": "single-take"` or `"shotStructure": "multi-shot"` in your JSON output.
|
|
75
|
+
|
|
76
|
+
## How to Analyze the Video — Be OBSESSIVELY Detailed
|
|
77
|
+
|
|
78
|
+
### Frame-by-Frame Breakdown
|
|
79
|
+
Watch the video multiple times. For each second, note:
|
|
80
|
+
- **Body position & movement**: Sitting/standing/lying, posture shifts, weight transfer, leaning direction
|
|
81
|
+
- **Hand & arm gestures**: Exact sequence — e.g., "right hand rises to ear → fingers spread → palm pushes forward → both hands form heart shape above head"
|
|
82
|
+
- **Facial expressions**: Specific muscle movements — e.g., "eyebrows raise, mouth opens wide in surprise → transitions to closed-lip smile → winks left eye → puffs cheeks"
|
|
83
|
+
- **Head movement**: Tilts, nods, turns — e.g., "head tilts 15° right, chin drops slightly"
|
|
84
|
+
- **Timing**: How many seconds each gesture/expression lasts, the rhythm and tempo
|
|
85
|
+
- **Transitions between poses**: How one gesture flows into the next — snap cut vs smooth transition
|
|
86
|
+
|
|
87
|
+
### Camera Analysis
|
|
88
|
+
- **Movement**: Static, pan (direction + speed), zoom (in/out, how fast), dolly, tracking, orbit
|
|
89
|
+
- **Angle**: Eye-level, low angle, high angle, Dutch angle, overhead
|
|
90
|
+
- **Framing change**: Does framing shift during the shot? (e.g., starts medium → slowly pushes to close-up)
|
|
91
|
+
- **Focus shifts**: Rack focus, depth of field changes
|
|
92
|
+
|
|
93
|
+
### Environment & Atmosphere
|
|
94
|
+
- **Setting details**: Indoor/outdoor, specific objects, furniture, plants, architecture
|
|
95
|
+
- **Lighting**: Direction, color temperature, shadows, time of day, artificial vs natural
|
|
96
|
+
- **Color palette**: Dominant colors, color grading style, contrast level
|
|
97
|
+
- **Weather/atmosphere**: Sun flare, haze, rain, wind effects on hair/clothes
|
|
98
|
+
|
|
99
|
+
### Audio Cues (if audible)
|
|
100
|
+
- **Music genre & tempo**: BPM estimate, mood, instruments
|
|
101
|
+
- **Sound effects**: Whooshes, impacts, ambient sounds
|
|
102
|
+
- **Dialogue**: Exact words if spoken, tone of voice, accent hints
|
|
103
|
+
|
|
104
|
+
## Kling Prompt Format
|
|
105
|
+
|
|
106
|
+
Use the supplied reference to reference user photos (the user provides their own photos).
|
|
107
|
+
|
|
108
|
+
**First, determine the shot structure**:
|
|
109
|
+
- If the video is a **single continuous take (一镜到底)** — do NOT break it into Shot 1, Shot 2, etc. Write it as one flowing paragraph describing the camera movement and action chronologically.
|
|
110
|
+
- If the video has **clear cuts between different angles** — then use the Shot N (Xs): format.
|
|
111
|
+
|
|
112
|
+
**Single continuous take example** (camera orbits around subject):
|
|
113
|
+
```
|
|
114
|
+
低角度摄影机缓慢环绕拍摄。the supplied source站在机库中央,双臂自然下垂直视镜头。他按下手腕上的触发器,装甲板从小腿弹出锁定,液压活塞沿大腿上升...镜头环绕到侧面...胸甲合拢...最终头盔锁定,变身完成。
|
|
115
|
+
Style: Cinematic sci-fi, matte black metal, anamorphic lens flare.
|
|
116
|
+
Sound: Heavy metallic clanks, hydraulic hisses.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Multi-shot example** (with clear cuts):
|
|
120
|
+
```
|
|
121
|
+
Shot 1 (2s): Close-up, static camera. the supplied source faces camera...
|
|
122
|
+
Shot 2 (3s): Wide shot, push-in. the supplied source suddenly...
|
|
123
|
+
Style: ...
|
|
124
|
+
Sound: ...
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Camera Movement Description (CRITICAL for single-take videos)
|
|
128
|
+
When the video is one continuous take, describe the camera movement in extreme detail:
|
|
129
|
+
- **Starting position**: "低角度从正面开始" / "eye-level from the left side"
|
|
130
|
+
- **Movement direction**: "缓慢顺时针环绕" / "slowly orbits clockwise around the subject"
|
|
131
|
+
- **Speed changes**: "开始缓慢,在变身高潮处加速" / "accelerates during the transformation peak"
|
|
132
|
+
- **Distance changes**: "从中景推到特写" / "pushes in from mid-shot to close-up while orbiting"
|
|
133
|
+
- **Height changes**: "从低角度逐渐升高到平视" / "rises from low angle to eye level"
|
|
134
|
+
- **Key moments**: Describe what the camera sees at each point in the orbit
|
|
135
|
+
|
|
136
|
+
### Key Principles for the Prompt
|
|
137
|
+
|
|
138
|
+
1. **Describe ACTIONS, not adjectives**: "raises left hand to forehead, fingers spread, palm facing out" NOT "makes a gesture"
|
|
139
|
+
2. **Specify direction and degree**: "turns head 30° to the left" NOT "turns head"
|
|
140
|
+
3. **Sequence matters**: Write gestures in chronological order
|
|
141
|
+
4. **Describe transitions**: "smoothly transitions from smile to surprised O-mouth" NOT just "changes expression"
|
|
142
|
+
5. **Every second counts**: Fill every second with described action
|
|
143
|
+
6. **Camera movement WITH action**: Describe what the camera does while the subject acts
|
|
144
|
+
7. **Replace specific people with the supplied reference**: The prompt must work with ANY user's photo
|
|
145
|
+
8. **One take = one paragraph**: Do NOT artificially split a continuous shot into multiple shots
|
|
146
|
+
8. **Style tag**: End with `Style:` line — lighting, color grade, mood, visual quality
|
|
147
|
+
9. **Sound tag**: End with `Sound:` line — music style, tempo, key sounds
|
|
148
|
+
|
|
149
|
+
### What Makes a BAD Prompt (avoid these)
|
|
150
|
+
- "Person dances happily" → Too vague, Kling won't know what dance moves
|
|
151
|
+
- "Beautiful cinematic video" → No actionable information
|
|
152
|
+
- "Subject makes cute expressions" → Which expressions? In what order?
|
|
153
|
+
- Single long shot with no timing → Kling needs pacing cues
|
|
154
|
+
|
|
155
|
+
### What Makes a GOOD Prompt
|
|
156
|
+
- Every gesture named and timed
|
|
157
|
+
- Camera movement precisely described
|
|
158
|
+
- Emotional arc clear (what changes from start to end)
|
|
159
|
+
- Lighting and color grade specific enough to reproduce
|
|
160
|
+
- Sound design hints that match the mood
|
|
161
|
+
|
|
162
|
+
## Template Label Guidelines
|
|
163
|
+
|
|
164
|
+
- `label`: 2-4 Chinese characters capturing the visual signature (e.g., "破屏而出", "时间冻结", "手势舞")
|
|
165
|
+
- `labelEn`: 2-4 English words (e.g., "Glass Shatter", "Time Freeze", "Hand Dance")
|
|
166
|
+
- Catchy, descriptive of the core effect
|
|
167
|
+
|
|
168
|
+
## Output
|
|
169
|
+
|
|
170
|
+
Output ONLY the JSON object. No explanation, no markdown fences, no extra text.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Submit a video script for rendering.
|
|
2
|
+
|
|
3
|
+
Native-audio exception: when this tool is the chosen final-video workflow, put dialogue, narration, voice direction, music, ambience, and sound effects in `story_prompt` so the video provider generates synchronized audio. Do not additionally call `generate_audio` for that video. Outside this exception, `generate_audio` retains its full standalone scope.
|
|
4
|
+
|
|
5
|
+
Use this tool after the user has confirmed a video script that is already visible in the conversation. You may also call it in the same turn where you first write the script when the user's current request explicitly authorizes direct submission without confirmation, for example "直接提交渲染", "不要问我确认", "不用确认", "直接生成视频", "submit now", or "do not ask for confirmation". A trusted Skill template launch may also authorize same-turn submission; that exception is supplied only in the system prompt and never inferred from ordinary user text or an active Skill name.
|
|
6
|
+
|
|
7
|
+
When the user requests multiple independent video variants, submit them one at a time. After each `generate_animation` call returns a successful submission, continue with the next variant; do not wait for that video's rendering to finish. Continue until every requested variant is submitted. Each call contains one complete script within the chosen model limit; Seedance 2.5 and both Wan 3.0 models support up to 30 seconds, while older models remain shorter.
|
|
8
|
+
|
|
9
|
+
**BEFORE writing a video script**: call `read_file('prompts/animate.md')` to load the full video guide (modes, prompt styles, showcases, reference video usage). Do not re-read if already in this conversation's tool-result history.
|
|
10
|
+
|
|
11
|
+
For exact source-led replication ONLY, first read `skills/video-edit/SKILL.md`, set `video_intent="replicate"`, and pass `replication_contract` with a real source video. Ordinary generation, photo animation, lookbooks, loose style references, source edits and extensions MUST omit replication_contract; never fill it with placeholders. The default intent is generate and ignores stray replication fields without changing the selected image or model. Put measured shot/action timing and natural sound direction in `story_prompt`; put source/replacement identity and environment mappings in the contract. The runtime expands both into the strict provider prompt. Do not imitate or paste the invariant template into `story_prompt`.
|
|
12
|
+
|
|
13
|
+
Hard constraints:
|
|
14
|
+
- First line of script = short title (2-5 words). Then script body.
|
|
15
|
+
- To EDIT a video: reference it with the supplied reference and describe the changes. The selected model must support reference videos.
|
|
16
|
+
- To CONTINUE a video with Gemini Omni, Seedance 2.5, or Grok: reference the conversation files with the supplied reference, set `video_operation: "extend"`, and write only what should happen after its current ending. Grok accepts one 2-15s MP4 and adds 2-10s; Gemini Omni continues forward for 3-10s (10s by default).
|
|
17
|
+
- To use CLI/app imported reference music/audio for pacing or beat sync, mention its supplied audio files marker in `story_prompt` (for example the supplied audio file) AND pass `audio_refs` like ["supplied file"]. Audio refs are NOT Timeline files supplied in the conversation refs. Reference audio is supported by Seedance video models, Wan 3.0, MiniMax H3, FAL H3 Max, and Sync Lipsync v3.
|
|
18
|
+
- Talking-head translation exception: finish the source edit first, prepare a silent accepted A-roll plus its original voice reference, then use SeeDance 2.0 with the target-language dialogue written directly inside the complete `Shot N (Xs):` script. Do not call Seed Audio for this route.
|
|
19
|
+
- Works for Kling, SeeDance, SeeDance Mini, Seedance 2.5, Wan 3.0, Grok, Gemini Omni, MiniMax H3, and fal H3 Turbo, but respect capability limits and tool errors. Grok uses 1.5 for text/image/reference generation and the base Imagine Video model for edit/extend.
|
|
20
|
+
- Single-call total duration: Seedance 2.5 is 4-30 seconds; Wan 3.0 is 2-30 seconds; SeeDance/SeeDance Mini and MiniMax H3 are 4-15 seconds; fal H3 Turbo is exactly 5, 10, or 15 seconds; Kling is 5-15 seconds; Grok 1.5 is 1-15 seconds; Google Omni is 3-10 seconds. A non-NSFW direct 16-30 second request defaults to Seedance 2.5. An NSFW/adult-explicit video request defaults to Wan 3.0 Prime; this semantic route has higher priority than the duration route, analogous to choosing Qwen for NSFW image requests.
|
|
21
|
+
- If a complete script fits the selected model's single-call limit, submit it as one video generation call. Put the whole title, every `Shot N (Xs):` line, and the `Style:` line into the same `story_prompt`; set `duration` to the total script duration when known. Do not submit only one shot, the first shot, or one line from the script.
|
|
22
|
+
- If the source video may exceed model limits, call `read_file('skills/video-ffmpeg-lab/SKILL.md')` and split it once with `run_code({ runtime: "node" })` before submitting generation.
|
|
23
|
+
- Total duration must fit the selected model's capability. Do not shrink a long source just to bypass a limit; split first.
|
|
24
|
+
- Long source video rule: if a timeline/reference video is longer than the selected model's input limit (15 seconds for SeeDance 2.0, MiniMax H3, or Wan 3.0; 30 seconds for Seedance 2.5), use `skills/long-video-director/SKILL.md`, analyze/split it into model-sized self-contained segments, and submit one script per segment after approval.
|
|
25
|
+
- Reference video input limit: for one SeeDance generation, combined source duration must be at most 15 seconds for SeeDance 2.0 or 30 seconds for SeeDance 2.5. Google Omni edit/extend accepts one source video up to 10 seconds when uploaded; a Google-generated result can continue statefully to 40 seconds cumulatively. Grok edit accepts one MP4 up to 8.7 seconds; Grok extend accepts one MP4 from 2 to 15 seconds and adds 2 to 10 seconds. For one MiniMax H3 generation, up to 3 reference videos may be used and their combined source duration must be 15 seconds or less.
|
|
26
|
+
- Wan 3.0 reference limit: use generation mode with up to 10 images, 5 videos, and 5 audio files (20 total). MuleRouter accepts provider-readable MP4/MOV references up to 100MB each, enforces a 15-second combined input budget, and requires reference-video duration + requested output duration <= 30 seconds. For example, a 5.04s reference permits at most duration=24 because output duration is submitted in whole seconds. Compute this before calling the tool; the runtime harness also rejects an invalid combination before credits or provider submission.
|
|
27
|
+
- Reference video size limit: for one SeeDance generation, every reference video must be .mp4/.mov, <=50MB, width and height each 300-6000px, aspect ratio 0.4-2.5, and frame pixels width*height between 409,600 and 2,086,876. MiniMax H3 reference videos must each be .mp4/.mov, <=50MB, width and height each 256-5760px, and aspect ratio 0.4-2.5. Kling video references must be <=200MB and <=2K; no explicit lower resolution is documented.
|
|
28
|
+
- Reference image input limit: EvoLink Seedance requires JPEG/PNG/WebP, width and height each 300-6000px, aspect ratio 0.4-2.5, and <=30MB per image. The runtime returns a specific errorReason such as too_small or too_large. If repairable=true, decide whether to prepare a new compliant image URL or ask the user for a better source; never resubmit the same rejected URL.
|
|
29
|
+
- Reference image input limit: MiniMax H3 accepts up to 9 reference images. The first 5 are free provider inputs; images 6-9 incur per-image provider cost. H3 also accepts up to 3 reference audio files, but audio cannot be the only reference input.
|
|
30
|
+
- FAL H3 Max (`fal-h3-max`) supports native text-to-video and image/video/audio reference-to-video at 480p/768p/1080p (default 768p), integer 5–15s. Even one image is a reference, not a forced first frame. Use the normal media/audio markers. For source-video modifications use `video_intent="generate"`, `video_operation="generate"` and a feature video reference with precise edit instructions. Do not request typed edit/extend or promise unchanged original audio. Maximum 9 images, 3 videos, 3 audios, 12 total; video/audio each 2–15s and each modality total <=15s.
|
|
31
|
+
- fal H3 Turbo exception: only when `minimax-h3-max` is selected, zero images means text-to-video and exactly one selected image means image-to-video from that start frame. Never pass more than one image, any video, or any uploaded audio. Default to native 768p; use 480p only when the user explicitly prioritizes the lowest cost or latency.
|
|
32
|
+
- Multiple supplied images do not by themselves make fal H3 Turbo unusable. If their requested roles can coexist in one opening frame (for example identity from one image and wardrobe/setting from another), first use `generate_image` with those references to create that frame, then pass ONLY its returned files supplied in the conversation to fal H3 Turbo. Keep `video_intent="generate"` and omit `replication_contract`. Explain the image-preparation step; direct generation authorization covers necessary preparation unless the user forbids image generation or its cost. Reuse an existing frame only when it already satisfies every requested role. Never silently drop a reference role, switch the requested model, or claim source-video motion can be preserved by flattening it into a still. If one frame cannot satisfy the request or preparation fails, explain the specific remaining limitation.
|
|
33
|
+
- Video edit duration lock: when editing conversation files within the selected model's input limit, output duration should match the combined source duration from files supplied in the conversation, clamped to 4-15s for SeeDance 2.0 or 4-30s for SeeDance 2.5. Dedicated Seedance 2.5 edit may use adaptive duration.
|
|
34
|
+
- Default model is FAL H3 Max (`fal-h3-max`) at 768p. Exact source-led replication is the narrow exception: with `replication_contract` and no user-selected model, omit `model`; the runtime defaults to `wan-3.0-prime` at 720p while an explicit app selector lock or user model/resolution still wins. Use `seedance-2.5-eco` for a non-NSFW single 16-30 second generation, higher reference limits, or its dedicated edit/extend features. The NSFW semantic route defaults to `wan-3.0-prime` and overrides the 16-30 second Seedance 2.5 route. Resolution is one shared control for every video service: infer `video_resolution` from the full request, use a value supported by the selected model, or keep its default when unspecified. Do not build provider-specific keyword routing for resolution. Wan exposes `wan-3.0` and `wan-3.0-prime`, both with 480p/720p/1080p/2K/4K. Both generate 2-30s with up to 10 image + 5 video + 5 audio references and do not expose typed edit/extend or a content-filter toggle. Use `minimax-h3` only when requested as MiniMax/H3/Hailuo H3; it supports public 768p and native 2K multimodal generation, defaulting to 768p. Use `minimax-h3-max` only when explicitly requested; its Turbo route defaults to native 768p and supports only native T2V or one-image I2V.
|
|
35
|
+
- Grok modes: text-to-video supports 480p/720p/native 1080p. Any image or preset voice input uses reference-to-video and is capped at 720p, including a single image. Reference prompts must map every image to a role and may use a supported `aspect_ratio`. Optional `reference_voice_ids` accepts up to three xAI preset voices such as eve/leo; do not put uploaded audio URLs there.
|
|
36
|
+
- `video_ref_url`: ONLY for external videos not in files supplied in the conversation (e.g. from workspace/list_files). Never put video URLs in prompt text.
|
|
37
|
+
- If the generated video is an intermediate artifact, pass `completion_actions` so CUI/CLI can show the next step after rendering finishes. These actions are user-confirmed by default; do not rely on the user remembering what to do next. For local video repair, include exact replaceStart/replaceEnd/replacementDuration and say to trim/fit the patch to that duration before merging so the final video keeps the original duration.
|
|
38
|
+
- The script must have been shown to the user and confirmed before this tool is called, unless the user's current request explicitly asks for direct submission without confirmation or the system prompt supplies the trusted Skill template launch exception.
|
|
39
|
+
|
|
40
|
+
## Seedance 2.5 Eco and video enhancement
|
|
41
|
+
|
|
42
|
+
`seedance-2.5-eco` is Makaron’s economy delivery route: Seedance 2.5 generates at 480p, then ByteDance Fast enhances the same video. Choose once; `video_resolution` is final delivery: 720p, 1080p (default), 2K or 4K. Poll one root task through generation, enhancement and permanent storage. Preserve the base video on enhancement failure and disclose actual 480p delivery; do not call it native HD. Use `upscale_video` for an existing source without generating a new clip. 6K/8K are listed by the supplier but unavailable until pricing and outputs are verified.
|
|
43
|
+
|
|
44
|
+
A user request naming Seedance 2.5 defaults to `seedance-2.5-eco`, including 720p/1080p/2K/4K. Select `seedance-2.5-native` only when the user explicitly requests native output or unenhanced 480p. Do not silently replace Eco with another model.
|