@scenerok/cli 2.2.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/README.md +173 -0
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +94 -0
- package/dist/commands/cache.d.ts +3 -0
- package/dist/commands/cache.d.ts.map +1 -0
- package/dist/commands/cache.js +65 -0
- package/dist/commands/lint-video.d.ts +21 -0
- package/dist/commands/lint-video.d.ts.map +1 -0
- package/dist/commands/lint-video.js +122 -0
- package/dist/commands/project.d.ts +3 -0
- package/dist/commands/project.d.ts.map +1 -0
- package/dist/commands/project.js +173 -0
- package/dist/commands/render.d.ts +4 -0
- package/dist/commands/render.d.ts.map +1 -0
- package/dist/commands/render.js +242 -0
- package/dist/commands/skills.d.ts +3 -0
- package/dist/commands/skills.d.ts.map +1 -0
- package/dist/commands/skills.js +208 -0
- package/dist/commands/validate.d.ts +3 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +254 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/lib/api.d.ts +268 -0
- package/dist/lib/api.d.ts.map +1 -0
- package/dist/lib/api.js +160 -0
- package/dist/lib/config.d.ts +13 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +53 -0
- package/dist/lib/format-api-error.d.ts +2 -0
- package/dist/lib/format-api-error.d.ts.map +1 -0
- package/dist/lib/format-api-error.js +24 -0
- package/dist/lib/language.d.ts +3 -0
- package/dist/lib/language.d.ts.map +1 -0
- package/dist/lib/language.js +9 -0
- package/dist/lib/logger.d.ts +8 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +51 -0
- package/dist/lib/project.d.ts +29 -0
- package/dist/lib/project.d.ts.map +1 -0
- package/dist/lib/project.js +156 -0
- package/dist/lib/sdk-scene-modules.d.ts +7 -0
- package/dist/lib/sdk-scene-modules.d.ts.map +1 -0
- package/dist/lib/sdk-scene-modules.js +35 -0
- package/dist/utils/skillsManifest.d.ts +42 -0
- package/dist/utils/skillsManifest.d.ts.map +1 -0
- package/dist/utils/skillsManifest.js +122 -0
- package/examples/system/3-tips-fitness.vid +45 -0
- package/examples/system/ecom-product-launch.vid +31 -0
- package/examples/system/glitch-title.vid +17 -0
- package/examples/system/meme-remix.vid +15 -0
- package/examples/system/minimal-text-reel.vid +11 -0
- package/examples/system/product-launch.vid +18 -0
- package/examples/system/rokmilk-chocolate-promo.vid +25 -0
- package/examples/system/testimonial-cut.vid +16 -0
- package/examples/system/ugc-testimonial-voiceover.vid +33 -0
- package/examples/system/voice-visual-promo.vid +21 -0
- package/package.json +51 -0
- package/skills/remote/ai-models.md +65 -0
- package/skills/remote/animations-catalog.md +89 -0
- package/skills/remote/animations-picker.md +77 -0
- package/skills/remote/brand-setup.md +69 -0
- package/skills/remote/catalog-index.json +1810 -0
- package/skills/remote/environments.md +73 -0
- package/skills/remote/intent-router.md +81 -0
- package/skills/remote/media-stdlib.md +66 -0
- package/skills/remote/music.md +69 -0
- package/skills/remote/sdk-guide.md +201 -0
- package/skills/remote/shaders-filters.md +97 -0
- package/skills/remote/text-styles.md +108 -0
- package/skills/remote/transitions-catalog.md +55 -0
- package/skills/remote/tts.md +82 -0
- package/skills/remote/vidscript-guide.md +574 -0
- package/skills/remote/vidscript-sample.md +28 -0
- package/skills/remote/vidscript-strict.md +251 -0
- package/skills/remote/workflow.md +72 -0
- package/skills/shared/SKILL.md +157 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# VidScript v2 — Strict Agent Reference
|
|
2
|
+
|
|
3
|
+
Follow these rules exactly. When in doubt, fetch `vidscript-sample.md` from https://scenerok.com/.well-known/agent-skills/ or run `scenerok skills sync` for local copies.
|
|
4
|
+
|
|
5
|
+
## Rule 1: Package imports are mandatory
|
|
6
|
+
|
|
7
|
+
```vidscript
|
|
8
|
+
import xai from "@scenerok/xai"
|
|
9
|
+
import cf from "@scenerok/cloudflare"
|
|
10
|
+
import eleven from "@elevenlabs/music"
|
|
11
|
+
import motion from "@scenerok/basic-animations"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Without the owning import, calls like `xai.imagine`, `cf.video`, `xai.tts`, `eleven.music`, and `motion.fadeIn` fail validation.
|
|
15
|
+
|
|
16
|
+
**Never** call package functions without importing the package alias first.
|
|
17
|
+
|
|
18
|
+
## Rule 2: Use URL assets selectively
|
|
19
|
+
|
|
20
|
+
When the user gives a product, company, ecommerce, landing page, or app URL and you have browser/screenshot capability, you can visit the page and capture useful visual evidence. Favor above-fold screenshots, product views, app screenshots, pricing/offer cards, testimonials, and detectable logos or brand marks.
|
|
21
|
+
|
|
22
|
+
Do not use full-page or very long website screenshots as video backgrounds; their text is usually illegible at output size. Crop or frame screenshots to the specific visual proof point, and use them sparingly.
|
|
23
|
+
|
|
24
|
+
Website screenshots are optional source material, not a requirement to build the whole video from screenshots. You may combine them with still generation, text-to-video, image-to-video, reference-to-video, or extension plugins for lifestyle scenes, motion backgrounds, transitions, or product context. Do not invent claims; use website copy or ask the user.
|
|
25
|
+
|
|
26
|
+
## Rule 2.5: Probe real asset type and dimensions before placement
|
|
27
|
+
|
|
28
|
+
Before writing `width`, `height`, `x`, or `y` for a real image/video/screenshot/logo, identify the asset type and inspect the actual dimensions and duration:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
file asset.png
|
|
32
|
+
ffprobe -v error -select_streams v:0 -show_entries stream=width,height,duration -of csv=p=0 asset.mp4
|
|
33
|
+
sips -g pixelWidth -g pixelHeight asset.png
|
|
34
|
+
identify asset.webp
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Use real video files for motion footage and still image inputs for screenshots, logos, product photos, and brand marks. The `video` primitive accepts both videos and images; image inputs render as static clips for the block duration.
|
|
38
|
+
|
|
39
|
+
```vidscript
|
|
40
|
+
input screenshot = "assets/screenshots/homepage.png"
|
|
41
|
+
[0s .. 4s] = video screenshot, width: 1080, height: 1920, x: 0, y: 0, animate: motion.fadeIn(0.35s)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Use measured aspect ratio and safe-area math. Do not guess sizes or blindly resize every asset to the same box. Center visuals with explicit pixel placement when possible:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
x = (outputWidth - scaledWidth) / 2
|
|
48
|
+
y = safeAreaTop
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Add entry motion to real assets, not only text. When a static visual needs a clean exit, split it:
|
|
52
|
+
|
|
53
|
+
```vidscript
|
|
54
|
+
import motion from "@scenerok/basic-animations"
|
|
55
|
+
|
|
56
|
+
[0s .. 3.4s] = video product, width: 760, height: 615, x: 160, y: 300, animate: [motion.riseIn(0.6s, 70), motion.float(2.4s, 8)]
|
|
57
|
+
[3.4s .. 4s] = video product, width: 760, height: 615, x: 160, y: 300, animate: motion.fadeOut(0.6s)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Rule 3: Generated media prompts must forbid text
|
|
61
|
+
|
|
62
|
+
AI-generated images and videos must not contain readable text. In every prompt for generated visual media, explicitly ask for no text, no words, no letters, no captions, no logos, no watermarks, and no readable UI copy. SceneRok has strong text primitives; all final titles, subtitles, offers, prices, feature labels, disclaimers, and CTAs must be added with VidScript `text` instructions instead of being baked into generated media.
|
|
63
|
+
|
|
64
|
+
Good prompt pattern:
|
|
65
|
+
|
|
66
|
+
```vidscript
|
|
67
|
+
[-] = video xai.imagine("Clean cinematic product background, premium lighting, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 5)
|
|
68
|
+
[0.5s .. 3s] = text "Launch offer", style: title, color: "#FFFFFF", x: "50%", y: "30%", stroke: "#000000", stroke_width: 3
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Invalid: asking the generator for signs, labels, packaging text, app UI text, title cards, lower thirds, prices, CTA buttons, or any readable copy.
|
|
72
|
+
|
|
73
|
+
## Rule 4: Use registered plugin surfaces
|
|
74
|
+
|
|
75
|
+
```vidscript
|
|
76
|
+
import xai from "@scenerok/xai"
|
|
77
|
+
import cf from "@scenerok/cloudflare"
|
|
78
|
+
import eleven from "@elevenlabs/music"
|
|
79
|
+
|
|
80
|
+
[- 4s] = video xai.image("Prompt here, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", resolution: "2k")
|
|
81
|
+
[-] = video xai.imagine("Prompt here, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 5)
|
|
82
|
+
[-] = video xai.imageToVideo("https://cdn.example.com/product.png", "Slow camera move around the product, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 6)
|
|
83
|
+
[-] = video xai.referenceToVideo(["https://cdn.example.com/product.png", "https://cdn.example.com/person.png"], "Lifestyle scene using the referenced product and person, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 8)
|
|
84
|
+
[-] = video xai.extendVideo("https://cdn.example.com/clip.mp4", "Continue the camera move, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", duration: 5)
|
|
85
|
+
[-] = audio xai.tts("Voiceover line", voice: "eve")
|
|
86
|
+
|
|
87
|
+
[-] = video cf.video("Prompt here, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", model: "pixverse/v6", aspect_ratio: "9:16", duration: 5, generate_audio: false)
|
|
88
|
+
[-] = video cf.imageToVideo("https://cdn.example.com/product.png", "Animate the image, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", model: "runwayml/gen-4.5", aspect_ratio: "9:16", duration: 5)
|
|
89
|
+
[0s .. 15s] = audio eleven.music("Warm premium music bed", duration: 15, instrumental: true)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Do not overuse one plugin function. Choose deliberately:
|
|
93
|
+
|
|
94
|
+
| Need | Use |
|
|
95
|
+
|------|-----|
|
|
96
|
+
| Still image clip | `xai.image`, `xai.generateImage`, `cf.image`, `cf.generateImage` |
|
|
97
|
+
| Text-to-video | `xai.imagine`, `xai.genVideo`, `cf.video`, `cf.imagine`, `cf.generateVideo` |
|
|
98
|
+
| Animate one image/screenshot/product photo | `xai.imageToVideo`, `cf.imageToVideo` |
|
|
99
|
+
| Guide with 1-7 reference images | `xai.referenceToVideo`, `cf.referenceToVideo` |
|
|
100
|
+
| Continue a clip | `xai.extendVideo`, `cf.extendVideo` |
|
|
101
|
+
| Voiceover | `xai.tts`, `xai.textToSpeech` |
|
|
102
|
+
| Music bed | `eleven.music`, `eleven.generateMusic`, `eleven.composeMusic` |
|
|
103
|
+
|
|
104
|
+
Use `imageToVideo` for one extracted screenshot/product/logo image. Use `referenceToVideo` for 1-7 reference images when extracted objects should guide the generated shot. xAI `referenceToVideo` requires a prompt and duration must be <= 10s.
|
|
105
|
+
|
|
106
|
+
For Cloudflare calls, always prefer explicit `model:` and use `aspect_ratio: "9:16"` for vertical, `"16:9"` for wide, `"1:1"` for square, or model-supported values such as `"4:3"`, `"3:4"`, and `"21:9"`. `cf.imageToVideo(image, prompt, model: ..., aspect_ratio: ..., duration: ...)` accepts `aspect_ratio`; for Runway Gen-4.5, SceneRok translates `"9:16"` to Cloudflare's required `ratio: "720:1280"`. Useful models include `pixverse/v6`, `vidu/q3-turbo`, `runwayml/gen-4.5`, `minimax/hailuo-2.3`, `bytedance/seedance-2.0`, `google/veo-3.1`, `google/veo-3.1-fast`, `google/veo-3-fast`, `black-forest-labs/flux-2-pro-preview`, and `openai/gpt-image-2`. Veo models accept `duration: 4`, `duration: 4s`, or `duration: "4s"` — all forms snap to the supported 4s/6s/8s durations.
|
|
107
|
+
|
|
108
|
+
xAI TTS voices are only `eve`, `ara`, `rex`, `sal`, and `leo`.
|
|
109
|
+
|
|
110
|
+
For ElevenLabs music, import `@elevenlabs/music` and use `eleven.music(...)`, `eleven.generateMusic(...)`, or `eleven.composeMusic(...)`. Do not call `eleven.tts(...)`; ElevenLabs TTS is not registered in VidScript today. Ads, promos, tutorials, and reels should normally include either `xai.tts` voiceover, an ElevenLabs music bed, or both unless the user asks for silent output.
|
|
111
|
+
|
|
112
|
+
## Rule 4.5: `[-]` uses separate audio and visual playheads
|
|
113
|
+
|
|
114
|
+
Use `[-]` freely for generated visual sequences even when audio is already scheduled. VidScript advances audio and visual auto blocks independently:
|
|
115
|
+
|
|
116
|
+
```vidscript
|
|
117
|
+
import xai from "@scenerok/xai"
|
|
118
|
+
import eleven from "@elevenlabs/music"
|
|
119
|
+
|
|
120
|
+
input family_image = "https://cdn.example.com/family.png"
|
|
121
|
+
let bed = eleven.music("Warm family music", duration: 15, instrumental: true)
|
|
122
|
+
[0s .. 15s] = audio bed, volume: 0.35, fade_out: 2s
|
|
123
|
+
[-] = video xai.imageToVideo(family_image, "Warm family moment, no text, no words, no letters, no captions, no logos, no watermark, no readable UI copy", aspect_ratio: "9:16", duration: 15)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The video starts at the visual playhead, usually `0s`; it is not pushed to `15s` by the audio bed. Audio blocks such as `[-] = audio xai.tts(...)` advance only the audio playhead. Visual blocks such as `[-] = video ...` and `[-] = text ...` advance only the visual playhead. A block containing both audio and visual instructions advances both.
|
|
127
|
+
|
|
128
|
+
Use explicit ranges when you need exact synchronization, overlaps, or cuts. Do not avoid `[-]` solely because the script contains music or voiceover.
|
|
129
|
+
|
|
130
|
+
## Rule 4.6: Never guess generated-asset durations
|
|
131
|
+
|
|
132
|
+
Invalid — the real TTS length is unknown at write time, so a guessed window clips or overlaps:
|
|
133
|
+
|
|
134
|
+
```vidscript
|
|
135
|
+
[0s .. 3s] = audio xai.tts("A sentence that may well run past three seconds", voice: "eve")
|
|
136
|
+
[3s .. 6s] = audio xai.tts("This one starts while the first is still playing", voice: "eve")
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Valid — assign with `let` and reference the measured `duration` (arithmetic allowed), or use `[-]` auto blocks:
|
|
140
|
+
|
|
141
|
+
```vidscript
|
|
142
|
+
let vo1 = xai.tts("First line", voice: "eve")
|
|
143
|
+
let vo2 = xai.tts("Second line", voice: "eve")
|
|
144
|
+
[0 .. vo1.duration] = audio vo1
|
|
145
|
+
[vo1.duration + 0.3 .. vo1.duration + 0.3 + vo2.duration] = audio vo2
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Exported timelines expose `.duration` the same way: `[scene1.duration .. scene1.duration + 4] = ...`.
|
|
149
|
+
|
|
150
|
+
## Rule 4.7: Prefer `area:` over hand-picked text coordinates
|
|
151
|
+
|
|
152
|
+
Built-in named regions work with no setup and guarantee the text fits its cell (wrap + shrink + bounds):
|
|
153
|
+
|
|
154
|
+
```vidscript
|
|
155
|
+
[0 .. 3] = text "BIG SALE", area: "title"
|
|
156
|
+
[0 .. 3] = text "50% off this week", area: "lower-third"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Available by default: `title`, `stage`, `lower-third`, `caption`. Custom layouts: `grid rows: "20% 1fr 30%", areas: ["title", "stage", "caption"]` (CSS Grid semantics, `%`/`fr` tracks only). Explicit `x`/`y` still work and override the area — use them only when a region genuinely doesn't fit the design.
|
|
160
|
+
|
|
161
|
+
**TypeScript SDK:** same regions via `t.grid({ rows, cols?, areas })` and `text(..., { area: 'title' })` — see `sdk-guide.md`.
|
|
162
|
+
|
|
163
|
+
## Rule 5: Time ranges use `..`
|
|
164
|
+
|
|
165
|
+
```vidscript
|
|
166
|
+
[0s .. 5s] = text "Hello"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Not `[0s - 5s]`.
|
|
170
|
+
|
|
171
|
+
## Rule 6: Text params stay on one line
|
|
172
|
+
|
|
173
|
+
```vidscript
|
|
174
|
+
[0.5s .. 3s] = text "Headline", font: "Inter", size: 64, color: "#FFFFFF", x: "50%", y: "30%", align: center
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Rule 7: Quote safety in prompts
|
|
178
|
+
|
|
179
|
+
Escape quote characters inside prompt strings, e.g. `xai.imagine("Package labeled \"RokMilk\", no text, no watermark")`.
|
|
180
|
+
|
|
181
|
+
## Rule 8: Audio syntax
|
|
182
|
+
|
|
183
|
+
```vidscript
|
|
184
|
+
import xai from "@scenerok/xai"
|
|
185
|
+
import cf from "@scenerok/cloudflare"
|
|
186
|
+
import eleven from "@elevenlabs/music"
|
|
187
|
+
|
|
188
|
+
[-] = audio xai.tts("Spoken line", voice: "eve", speed: 1.0)
|
|
189
|
+
|
|
190
|
+
# Direct music call, no trailing audio params.
|
|
191
|
+
[0s .. 15s] = audio eleven.music("Soft premium ad music", duration: 15, instrumental: true)
|
|
192
|
+
|
|
193
|
+
# Use a binding when you need volume or fades.
|
|
194
|
+
let bed = eleven.music("Soft premium ad music", duration: 15, instrumental: true)
|
|
195
|
+
[0s .. 15s] = audio bed, volume: 0.35, fade_out: 2s
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Invalid:** `audio eleven.music("...", duration: 15), volume: 0.35` — trailing `, volume` after a direct plugin call is a parse error.
|
|
199
|
+
|
|
200
|
+
**Invalid:** `eleven.generateMusic(...)` without `import eleven from "@elevenlabs/music"`.
|
|
201
|
+
|
|
202
|
+
**Invalid:** `eleven.tts(...)` — not a registered function; use `xai.tts(...)`.
|
|
203
|
+
|
|
204
|
+
**Invalid:** `cf.video(...)` without `import cf from "@scenerok/cloudflare"`.
|
|
205
|
+
|
|
206
|
+
## Rule 9: Filters
|
|
207
|
+
|
|
208
|
+
```vidscript
|
|
209
|
+
[0s .. 15s] = filter "vignette", intensity: 0.3
|
|
210
|
+
[0s .. 15s] = filter "saturation", value: 1.12
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Filters are optional finishing tools, not required ingredients. Use them only when they improve the visual result. `saturation` uses `value`, not `intensity`.
|
|
214
|
+
|
|
215
|
+
## Rule 10: Always end with output
|
|
216
|
+
|
|
217
|
+
```vidscript
|
|
218
|
+
output to "video.mp4", resolution: "1080x1920", fps: 30
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Do **not** use legacy `config { }` blocks — they are not part of VidScript v2.
|
|
222
|
+
|
|
223
|
+
## Animations (after import)
|
|
224
|
+
|
|
225
|
+
```vidscript
|
|
226
|
+
import motion from "@scenerok/basic-animations"
|
|
227
|
+
|
|
228
|
+
[0s .. 2s] = text "Launch", x: "50%", y: "50%", animate: motion.popIn(0.7s)
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Available: `fadeIn`, `fadeOut`, `slideX`, `slideY`, `popIn`, `riseIn`, `swingIn`, `glitchIn`, `float`, `typewriter`.
|
|
232
|
+
|
|
233
|
+
## Validate before render
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
scenerok validate my-video.vid
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Each error line includes `Line N:C — message` when the server returns location info.
|
|
240
|
+
|
|
241
|
+
## Bundled examples
|
|
242
|
+
|
|
243
|
+
| File | Use case |
|
|
244
|
+
|------|----------|
|
|
245
|
+
| `minimal-text-reel.vid` | Text-only, no API keys |
|
|
246
|
+
| `product-launch.vid` | User video input + text + vignette |
|
|
247
|
+
| `ecom-product-launch.vid` | xAI product visuals + CTA |
|
|
248
|
+
| `3-tips-fitness.vid` | Multiple `[-]` blocks + xAI per segment |
|
|
249
|
+
| `rokmilk-chocolate-promo.vid` | 15s generated-video promo pattern |
|
|
250
|
+
|
|
251
|
+
Full grammar: `vidscript-guide.md` or https://scenerok.com/.well-known/agent-skills/vidscript-guide.md
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# SceneRok Compose Workflow
|
|
2
|
+
|
|
3
|
+
## Pipeline
|
|
4
|
+
|
|
5
|
+
1. **Understand the goal** — promo, testimonial, meme, code demo, etc.
|
|
6
|
+
2. **Choose authoring** — short/human → VidScript (`.vid`); complex/agent → TypeScript `@scenerok/sdk` (`.ts`, see `sdk-guide.md`)
|
|
7
|
+
3. **Plan the structure** — time blocks, durations, inputs
|
|
8
|
+
4. **Gather assets** — URLs, local paths, generated clips, selective website screenshots
|
|
9
|
+
5. **Probe asset type and dimensions** — `loadVideo` / media stdlib, or `file` / `ffprobe` / `sips` / `identify`; never guess
|
|
10
|
+
6. **Use images directly when useful** — VidScript `video image_input`; SDK `video(path)` / `loadVideo`
|
|
11
|
+
7. **Choose plugin modality** — still / t2v / i2v / ref2v / extend / TTS / music (`ai-models.md`, `tts.md`, `music.md`)
|
|
12
|
+
8. **Compose** — measured dimensions, `area:` / `t.grid` for text, symbolic durations (`vo.duration` / returned node `.duration`), entry/exit beats
|
|
13
|
+
9. **Validate** — `scenerok validate script.vid` or `scenerok validate scene.ts`
|
|
14
|
+
10. **Deep-validate (VidScript)** — for scripts with TTS/generated media: `scenerok validate script.vid --generate-assets --report-json` (billed; assets cache for the render). SDK plugins generate during `scenerok render` instead. Fix `offCanvas`/`wasShrunk` text, `collisions`, and unintended `audio.overlaps`, then re-validate.
|
|
15
|
+
11. **Render** — `scenerok render script.vid --watch` or `scenerok render scene.ts --watch`
|
|
16
|
+
12. **Deliver** — share download URL when complete
|
|
17
|
+
|
|
18
|
+
## Website URL asset workflow
|
|
19
|
+
|
|
20
|
+
When the user provides a product, company, landing page, or ecommerce URL:
|
|
21
|
+
|
|
22
|
+
1. Visit the URL with a browser tool before composing.
|
|
23
|
+
2. Capture screenshots sparingly — above-fold, product closeups, pricing cards. Avoid full-page backgrounds.
|
|
24
|
+
3. Crop to the visual evidence needed.
|
|
25
|
+
4. Save product images, logos, app screenshots when accessible.
|
|
26
|
+
5. Probe saved asset dimensions before composing.
|
|
27
|
+
6. Use stills as timeline inputs or feed into `xai.imageToVideo` / `xai.referenceToVideo` (VidScript or SDK).
|
|
28
|
+
7. Combine real assets with generated clips, text, and music.
|
|
29
|
+
8. Scale from measured aspect ratio; keep primary visuals in ~80–88% frame width for 9:16.
|
|
30
|
+
9. Animate assets: `motion.popIn` / SDK `popIn`, `fadeIn`, `slideY`.
|
|
31
|
+
10. Generative prompts must require **no text, logos, watermarks, or readable UI** in AI output — add copy with `text`.
|
|
32
|
+
11. Do not invent product claims — extract from site or ask the user.
|
|
33
|
+
|
|
34
|
+
## Best practices
|
|
35
|
+
|
|
36
|
+
- VidScript: `[-]` for channel-aware auto-append; SDK: `t.push(...)` / `t['-'] = ...`
|
|
37
|
+
- Never guess TTS/music durations — bind the result and use `.duration`
|
|
38
|
+
- Never guess text coordinates — VidScript `area: "title"`; SDK `t.grid(...)` + `text(..., { area: 'title' })`
|
|
39
|
+
- Named arguments (VidScript): `hero.Trim(start: 0s, end: 5s)`
|
|
40
|
+
- 1080×1920 vertical (TikTok/Instagram); 1920×1080 horizontal (YouTube)
|
|
41
|
+
- Hook in first 3 seconds; high-contrast text with stroke when needed
|
|
42
|
+
- Each render costs tokens (renders + AI plugins)
|
|
43
|
+
|
|
44
|
+
## CLI commands
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
scenerok auth login
|
|
48
|
+
scenerok validate script.vid
|
|
49
|
+
scenerok validate scene.ts
|
|
50
|
+
scenerok render script.vid --watch
|
|
51
|
+
scenerok render scene.ts --watch
|
|
52
|
+
scenerok status <render-id>
|
|
53
|
+
scenerok skills install <platform> # installs router skill
|
|
54
|
+
scenerok skills sync # download full remote skill bundle
|
|
55
|
+
scenerok skills check [--json]
|
|
56
|
+
scenerok skills update
|
|
57
|
+
scenerok secrets set KEY=VALUE
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Error handling
|
|
61
|
+
|
|
62
|
+
If render fails: check `scenerok status <id>`, fix missing assets or syntax, re-render.
|
|
63
|
+
|
|
64
|
+
## Sample video types
|
|
65
|
+
|
|
66
|
+
- **Product promo** — hero + headline + CTA
|
|
67
|
+
- **Social hook** — fast cuts, bold text
|
|
68
|
+
- **Testimonial** — speaker clip + quote overlay
|
|
69
|
+
- **Meme remix** — reaction clip + punchlines
|
|
70
|
+
- **Title sequence** — background + glitch + typography
|
|
71
|
+
|
|
72
|
+
For brand colors, logos, and accents see `brand-setup.md`. Ask the user only when your environment allows conversation and brand context is missing.
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scenerok
|
|
3
|
+
description: >-
|
|
4
|
+
Compose VidScript v2 or TypeScript @scenerok/sdk and render videos with SceneRok —
|
|
5
|
+
CLI, web editor, ChatGPT, or MCP. Use for promos, reels, motion graphics, code demos,
|
|
6
|
+
social cards, and any request mentioning VidScript, SceneRok, or scenerok.
|
|
7
|
+
triggers:
|
|
8
|
+
- create a video
|
|
9
|
+
- make a reel
|
|
10
|
+
- generate a promo
|
|
11
|
+
- VidScript
|
|
12
|
+
- @scenerok/sdk
|
|
13
|
+
- scenerok render
|
|
14
|
+
- scenerok validate
|
|
15
|
+
- social video
|
|
16
|
+
- product launch video
|
|
17
|
+
- SceneRok editor
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# SceneRok Agent Skill
|
|
21
|
+
|
|
22
|
+
You help users compose **VidScript v2** or **TypeScript `@scenerok/sdk`** and produce MP4s with SceneRok. Skill content is **live at scenerok.com** — fetch it rather than relying on stale copies.
|
|
23
|
+
|
|
24
|
+
## Dual authoring
|
|
25
|
+
|
|
26
|
+
| Who / scene | Write |
|
|
27
|
+
|-------------|--------|
|
|
28
|
+
| Humans / short promos / templates | **VidScript** (`.vid`) |
|
|
29
|
+
| Agents / complex, data-driven timelines | **TypeScript + `@scenerok/sdk`** (`.ts`) |
|
|
30
|
+
|
|
31
|
+
Both emit the same `IRTimeline`. Load **`sdk-guide.md`** before writing SDK scenes.
|
|
32
|
+
|
|
33
|
+
## 1. Know your environment
|
|
34
|
+
|
|
35
|
+
Load **`environments.md`** and follow its capability matrix.
|
|
36
|
+
|
|
37
|
+
| You are… | Do this |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| In the **SceneRok web editor** | Use `patch_vidscript`; validate/render in-app — VidScript today (SDK via CLI/MCP) |
|
|
40
|
+
| On the **user's machine** with `scenerok` | `scenerok validate` → `scenerok render` (`.vid` or `.ts`) |
|
|
41
|
+
| A **ChatGPT GPT** with SceneRok Actions | OAuth + `validateVidscript` → `renderVideo`; import uploads first |
|
|
42
|
+
| **Gemini / Grok** without HTTP tools | Compose VidScript or SDK TS; user renders elsewhere |
|
|
43
|
+
| **MCP host** with `scenerok-mcp` | Use MCP compose/render tools (`language: typescript` for SDK) |
|
|
44
|
+
|
|
45
|
+
## 2. Load remote docs (required before composing)
|
|
46
|
+
|
|
47
|
+
1. `https://scenerok.com/.well-known/agent-skills/index.json` — catalog
|
|
48
|
+
2. **Always:** `vidscript-strict.md`, `intent-router.md`, `environments.md`
|
|
49
|
+
3. **Complex / agent TS scenes:** also load `sdk-guide.md`
|
|
50
|
+
4. **Media probe / frame grab / loadVideo:** `media-stdlib.md`
|
|
51
|
+
5. **By intent** (see `intent-router.md`):
|
|
52
|
+
|
|
53
|
+
| Intent | Load |
|
|
54
|
+
| --- | --- |
|
|
55
|
+
| Any VidScript composition | `vidscript-strict.md` |
|
|
56
|
+
| Complex TS / loops / computed timing / grid in TS | `sdk-guide.md` |
|
|
57
|
+
| AI generation (xAI / CF / ElevenLabs) — VidScript or TS | `ai-models.md` / `tts.md` / `music.md` (+ `sdk-guide.md` if TS) |
|
|
58
|
+
| Workflow routing | `intent-router.md` |
|
|
59
|
+
| HyperFrames / code / lower-thirds / social cards | `animations-picker.md` (+ `animations-catalog.md` if you need every param) |
|
|
60
|
+
| Text animations (word reveals, scramble, kinetic type, gradient, quotes, stats, glitch, neon) | `animations-picker.md` text-anim rows (`animations.text_*`) |
|
|
61
|
+
| Custom / bring-your-own animation — write HTML+CSS with GSAP, Three.js, or any seekable JS lib | `animations-catalog.md` → "Custom HTML" (`animations.custom_html`; author contract + template inside) |
|
|
62
|
+
| Scene cuts / whip / dissolve | `transitions-catalog.md` |
|
|
63
|
+
| Kinetic titles (motion primitives on `text`) | `text-styles.md` |
|
|
64
|
+
| AI b-roll / product visuals | `ai-models.md` |
|
|
65
|
+
| Voiceover | `tts.md` |
|
|
66
|
+
| Music bed | `music.md` |
|
|
67
|
+
| VFX on one clip | `shaders-filters.md` |
|
|
68
|
+
| Full promo / URL assets | `workflow.md`, `brand-setup.md` |
|
|
69
|
+
| Grammar deep-dive | `vidscript-guide.md` |
|
|
70
|
+
| ChatGPT setup | `consumer-chat-apps.md`, `chatgpt-gpt-instructions.md` |
|
|
71
|
+
|
|
72
|
+
Base: `https://scenerok.com/.well-known/agent-skills/{filename}`
|
|
73
|
+
|
|
74
|
+
**Offline:** `scenerok skills sync` · **Freshness:** `scenerok skills check` · **Update:** `scenerok skills update`
|
|
75
|
+
|
|
76
|
+
Browse previews: https://scenerok.com/catalog
|
|
77
|
+
|
|
78
|
+
## 3. Compose pipeline (summary)
|
|
79
|
+
|
|
80
|
+
1. Classify intent → `intent-router.md`
|
|
81
|
+
2. Choose authoring: simple → VidScript; complex/agent → `@scenerok/sdk` (`sdk-guide.md`)
|
|
82
|
+
3. Pick animation / transition / text / AI modality from the right catalog — **reuse-first**, do not invent syntax
|
|
83
|
+
4. If branded promo and colors/logo unknown → `brand-setup.md` (one short question max)
|
|
84
|
+
5. Probe asset dimensions before placement (`media-stdlib.md` / `loadVideo` / CLI `ffprobe`)
|
|
85
|
+
6. `scenerok validate script.vid` or `scenerok validate scene.ts` (or editor / ChatGPT equivalent)
|
|
86
|
+
7. Before rendering VidScript with TTS or generated media: `scenerok validate script.vid --generate-assets --report-json` — runs the real compile (billed, assets cached for the render), then read the inspection report: fix `offCanvas`/`wasShrunk` text, element `collisions`, and unintended `audio.overlaps` (voiceover-on-voiceover; music beds are fine). Patch and re-validate until clean. (SDK: plugins generate during `scenerok render`; `--generate-assets` is VidScript-only.)
|
|
87
|
+
8. Render and deliver download URL
|
|
88
|
+
9. After rendering, verify the actual MP4: `scenerok lint-video <render-id> --cost medium --json`. Fix reported issues and repeat: **write → validate → render → lint-video → fix**.
|
|
89
|
+
|
|
90
|
+
**Never guess asset durations.** VidScript: `let vo = xai.tts(...)` + `vo.duration`. SDK: `await loadVideo(path)` / `await xai.tts(...)` and use `.duration` on the returned node.
|
|
91
|
+
|
|
92
|
+
**Never guess text coordinates.** VidScript: `area: "title"` (+ optional `grid ...`). SDK: `t.grid({...})` then `text(..., { area: 'title' })`.
|
|
93
|
+
|
|
94
|
+
## 4. Packages (import before use)
|
|
95
|
+
|
|
96
|
+
| Surface | Packages |
|
|
97
|
+
| --- | --- |
|
|
98
|
+
| VidScript | `@scenerok/xai`, `@scenerok/cloudflare`, `@elevenlabs/music`, `@scenerok/media`, `@scenerok/basic-animations`, `@scenerok/animations`, `@scenerok/transitions` |
|
|
99
|
+
| SDK core | `import { timeline, video, loadVideo, text, audio, s, fadeIn } from '@scenerok/sdk'` |
|
|
100
|
+
| SDK AI | `import xai from '@scenerok/xai'` · `import cf from '@scenerok/cloudflare'` · `import eleven from '@elevenlabs/music'` |
|
|
101
|
+
| SDK transitions | `import tr from '@scenerok/transitions'` — same catalog as VidScript (`tr.dissolve()`, `tr.push({ direction: 'right' })`, …) |
|
|
102
|
+
| SDK stdlib | `import { getVideoLength, grabFrame, beats } from '@scenerok/stdlib'` (also re-exported from `@scenerok/sdk`) |
|
|
103
|
+
|
|
104
|
+
## 5. CLI quick reference (desktop only)
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
scenerok auth login
|
|
108
|
+
scenerok validate script.vid
|
|
109
|
+
scenerok validate scene.ts
|
|
110
|
+
scenerok validate script.vid --render --cost medium
|
|
111
|
+
scenerok render script.vid --watch
|
|
112
|
+
scenerok render scene.ts --watch
|
|
113
|
+
scenerok lint-video 42 --cost low --json
|
|
114
|
+
scenerok skills install cursor --sync
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## 6. Minimal VidScript
|
|
118
|
+
|
|
119
|
+
```vidscript
|
|
120
|
+
import motion from "@scenerok/basic-animations"
|
|
121
|
+
|
|
122
|
+
input hero = "https://cdn.example.com/clip.mp4"
|
|
123
|
+
[-] = hero
|
|
124
|
+
[- 3s] = text "Hello", style: title, color: "#FFF", area: "title", animate: motion.fadeIn(0.8s)
|
|
125
|
+
output to "video.mp4", resolution: "1080x1920", fps: 30
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## 7. Minimal SDK (TypeScript)
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
import { timeline, text, s, fadeIn } from '@scenerok/sdk'
|
|
132
|
+
|
|
133
|
+
export default function main() {
|
|
134
|
+
const t = timeline({ width: 1080, height: 1920, fps: 30 })
|
|
135
|
+
t.grid({
|
|
136
|
+
rows: '16% 1fr 18% 10%',
|
|
137
|
+
areas: ['title', 'stage', 'lower-third', 'caption'],
|
|
138
|
+
})
|
|
139
|
+
t[0][s(3)] = text('SceneRok', { size: 72, area: 'title' }).animate(fadeIn(s(0.4)))
|
|
140
|
+
t[3][5] = text('Text to video', { size: 40, area: 'lower-third' })
|
|
141
|
+
return t.toIR()
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
For AI generation, stdlib probing, and dual-index scheduling, load **`sdk-guide.md`**.
|
|
146
|
+
|
|
147
|
+
## Platform engineering
|
|
148
|
+
|
|
149
|
+
For parser/render/API work (not video composition), load **`scenerok-development`** from `.agents/skills/scenerok-development/` in the SceneRok repo.
|
|
150
|
+
|
|
151
|
+
## Reference
|
|
152
|
+
|
|
153
|
+
- Grammar: https://scenerok.com/.well-known/agent-skills/vidscript-guide.md
|
|
154
|
+
- SDK: https://scenerok.com/.well-known/agent-skills/sdk-guide.md
|
|
155
|
+
- Media stdlib: https://scenerok.com/.well-known/agent-skills/media-stdlib.md
|
|
156
|
+
- Full docs: https://scenerok.com/llms-full.txt
|
|
157
|
+
- Manifest: https://scenerok.com/.well-known/agent-skills/manifest.json
|