cinematic-scroll-skill 2.1.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.
Files changed (61) hide show
  1. package/COMPATIBILITY.md +244 -0
  2. package/LICENSE +21 -0
  3. package/MODELS.md +92 -0
  4. package/README.md +250 -0
  5. package/SKILL.md +1003 -0
  6. package/audit-mode.md +497 -0
  7. package/bin/install.mjs +91 -0
  8. package/compile-choreography.mjs +296 -0
  9. package/decision-log.md +241 -0
  10. package/examples/GETTING_STARTED.md +279 -0
  11. package/examples/KNOWN_ISSUES.md +50 -0
  12. package/examples/PROMPTS.md +166 -0
  13. package/examples/luxe/README.md +88 -0
  14. package/examples/luxe/index.html +662 -0
  15. package/examples/noir/README.md +72 -0
  16. package/examples/noir/index.html +634 -0
  17. package/examples/pop/README.md +81 -0
  18. package/examples/pop/index.html +711 -0
  19. package/examples/renaissance/README.md +39 -0
  20. package/examples/renaissance/index.html +648 -0
  21. package/examples/studio/README.md +77 -0
  22. package/examples/studio/chapters.js +105 -0
  23. package/examples/studio/index.html +520 -0
  24. package/manifest.json +92 -0
  25. package/manifest.md +136 -0
  26. package/package.json +56 -0
  27. package/references/film-archetypes.md +211 -0
  28. package/references/performance-budget.md +499 -0
  29. package/references/scroll-patterns.md +693 -0
  30. package/scroll-choreography-compilation.md +543 -0
  31. package/scroll-choreography.json +1512 -0
  32. package/taste-guardrails.md +164 -0
  33. package/templates/nextjs/.env.example +41 -0
  34. package/templates/nextjs/app/api/fal/proxy/route.ts +33 -0
  35. package/templates/nextjs/app/api/fal/webhook/route.ts +132 -0
  36. package/templates/nextjs/app/api/generate-edition-asset/route.ts +66 -0
  37. package/templates/nextjs/app/globals.css +80 -0
  38. package/templates/nextjs/app/layout.tsx +21 -0
  39. package/templates/nextjs/app/page.tsx +10 -0
  40. package/templates/nextjs/components/ChapterDemoVisual.tsx +212 -0
  41. package/templates/nextjs/components/ChapterScene.tsx +373 -0
  42. package/templates/nextjs/components/EditionsPage.tsx +116 -0
  43. package/templates/nextjs/components/SmoothScrollProvider.tsx +8 -0
  44. package/templates/nextjs/lib/api-guard.ts +110 -0
  45. package/templates/nextjs/lib/editions-manifest.ts +224 -0
  46. package/templates/nextjs/lib/fal-client.ts +12 -0
  47. package/templates/nextjs/lib/fal-generate.ts +86 -0
  48. package/templates/nextjs/lib/fal-models.ts +213 -0
  49. package/templates/nextjs/lib/prompt-contract.ts +97 -0
  50. package/templates/nextjs/lib/use-device.ts +42 -0
  51. package/templates/nextjs/lib/use-lenis.ts +35 -0
  52. package/templates/nextjs/next.config.ts +29 -0
  53. package/templates/nextjs/package-lock.json +6455 -0
  54. package/templates/nextjs/package.json +41 -0
  55. package/templates/nextjs/package.patch.json +28 -0
  56. package/templates/nextjs/postcss.config.js +6 -0
  57. package/templates/nextjs/scripts/generate-chapter-assets.mjs +243 -0
  58. package/templates/nextjs/scripts/setup.mjs +170 -0
  59. package/templates/nextjs/tailwind.config.ts +37 -0
  60. package/templates/nextjs/tsconfig.json +23 -0
  61. package/troubleshooting.md +1284 -0
@@ -0,0 +1,279 @@
1
+ # Getting started — fal.ai image generation (beginner guide)
2
+
3
+ The full-release-site mode of this skill generates chapter hero images through **fal.ai**. You bring your own API key. The skill does **not** ship with keys, credits, or a shared account — and you can skip fal.ai entirely (the page renders stunning CSS-only chapter visuals at $0).
4
+
5
+ ---
6
+
7
+ ## Quick answers
8
+
9
+ | Question | Answer |
10
+ |---|---|
11
+ | Do I get a fal.ai key with the skill? | **No.** You create a free fal.ai account and add your own key. |
12
+ | Who pays for image generation? | **You**, directly to fal.ai (pay-as-you-go credits). |
13
+ | Is my key exposed in the browser? | **No.** Keys stay server-side via a Next.js proxy route. |
14
+ | Can I skip fal.ai and use my own images? | **Yes.** Replace manifest asset URLs with your own files in `public/`. |
15
+
16
+ ---
17
+
18
+ ## What you need before you start
19
+
20
+ 1. **Node.js 18+** and **npm**
21
+ 2. A **Next.js App Router** project (or let the skill scaffold one for you)
22
+ 3. A **fal.ai account** — sign up at [https://fal.ai](https://fal.ai)
23
+ 4. About **5 minutes** for first-time key setup
24
+
25
+ Estimated cost for a typical 8-chapter release page: **~$0.50–$2.00** in fal.ai credits (model-dependent). Check current pricing on fal.ai before generating large batches.
26
+
27
+ ---
28
+
29
+ ## Step 1 — Create a fal.ai account and API key
30
+
31
+ 1. Go to [https://fal.ai](https://fal.ai) and sign up (email or GitHub).
32
+ 2. Open **Dashboard → API Keys** (or **Settings → Keys**).
33
+ 3. Click **Create API Key**.
34
+ 4. Copy the key immediately — it looks like:
35
+
36
+ ```
37
+ abc123def456:9876543210abcdef9876543210abcdef
38
+ ```
39
+
40
+ Format is always `key_id:key_secret` (two parts separated by a colon).
41
+
42
+ 5. Add billing/credits if fal.ai prompts you. Most accounts need a small credit balance before generation works.
43
+
44
+ > **Security:** Treat this key like a password. Never commit it to Git, never paste it into client-side React components, and never share it in screenshots.
45
+
46
+ ---
47
+
48
+ ## Step 2 — Add the key to your project
49
+
50
+ In your Next.js project root (same folder as `package.json`):
51
+
52
+ 1. Copy the example env file:
53
+
54
+ ```bash
55
+ cp .env.example .env.local
56
+ ```
57
+
58
+ 2. Open `.env.local` and set your key:
59
+
60
+ ```bash
61
+ FAL_KEY="your_key_id:your_key_secret"
62
+ FAL_IMAGE_MODEL="fal-ai/flux-2-pro"
63
+ NEXT_PUBLIC_SITE_NAME="My Release Page"
64
+ ```
65
+
66
+ 3. Confirm `.env.local` is in `.gitignore` (Next.js adds this by default).
67
+
68
+ ### Environment variables explained
69
+
70
+ | Variable | Required? | What it does |
71
+ |---|---|---|
72
+ | `FAL_KEY` | **Yes** | Your fal.ai API key. Read only on the **server** (API routes). |
73
+ | `FAL_IMAGE_MODEL` | No | Image model id. Default: `fal-ai/flux-2-pro` (see tier table below). |
74
+ | `FAL_VIDEO_MODEL` | No | Optional video model for motion loops. Leave empty until you need video. |
75
+ | `NEXT_PUBLIC_SITE_NAME` | No | Site title shown in the browser tab. Safe to expose (no secret). |
76
+
77
+ ### Image model tiers
78
+
79
+ Change `FAL_IMAGE_MODEL` to switch — no code change needed.
80
+
81
+ **FLUX family — best photorealism, material texture, editorial depth**
82
+
83
+ | Model ID | Cost/img | Speed | When to use |
84
+ |---|---|---|---|
85
+ | `fal-ai/flux-2-pro` | ~$0.06 | ~4s | **Default — SOTA editorial, portraits, materials** |
86
+ | `fal-ai/flux-2-max` | ~$0.08 | ~5s | Final hero renders, absolute max quality |
87
+ | `fal-ai/flux-2/turbo` | ~$0.02 | ~2s | Draft rounds, fast iteration |
88
+ | `fal-ai/flux-pro/v1.1/ultra` | ~$0.06 | ~10s | Prev-gen 4MP alternative |
89
+ | `fal-ai/flux-pro/v1.1` | ~$0.05 | ~4.5s | High-volume cost-sensitive batches |
90
+ | `fal-ai/flux/dev` | Free | Slow | **NON-COMMERCIAL ONLY — local prototyping, never production** |
91
+
92
+ **Google "Nano Banana" family — best for text-in-image, conversational editing, complex scene direction**
93
+
94
+ (Yes, "Nano Banana" is the real Google/fal.ai nickname — not a joke.)
95
+
96
+ | Model ID | Nickname | Cost/img | Speed | When to use |
97
+ |---|---|---|---|---|
98
+ | `fal-ai/gemini-3-pro-image-preview` | Nano Banana Pro | ~$0.15 | ~8s | Complex prompts, typography, web-search grounding |
99
+ | `fal-ai/gemini-3.1-flash-image-preview` | Nano Banana 2 | ~$0.07 | ~2s | Newest Flash — fast + accurate text in image |
100
+ | `fal-ai/gemini-2.5-flash-image` | Nano Banana | ~$0.04 | ~2s | Cheapest Google option |
101
+ | `fal-ai/imagen3` | Imagen 3 | ~$0.04 | ~3s | Strong photorealism at low cost |
102
+
103
+ **When to use Nano Banana instead of FLUX:**
104
+ - Your chapter heroes need legible text baked into the image (labels, signs, editorial title cards)
105
+ - You're doing iterative editing ("darken the background, add fog")
106
+ - You need web-search-grounded imagery (real-world references)
107
+
108
+ **FLUX.2 Pro wins for:** editorial depth, skin/fabric/material texture, atmospheric still-life — the core use case of this skill.
109
+
110
+ **Typical 8-chapter release page cost:**
111
+ - FLUX.2 Pro default: 8 × $0.06 = **~$0.48**
112
+ - Nano Banana 2 alternative: 8 × $0.07 = **~$0.56**
113
+ - Mixed (6 FLUX + 2 Nano Banana for text-heavy chapters): **~$0.50**
114
+
115
+ ---
116
+
117
+ ## Step 3 — Install dependencies
118
+
119
+ From your project root, run **one command at a time** (do not paste multi-line blocks with `#` comments — zsh will error):
120
+
121
+ ```bash
122
+ npm install
123
+ ```
124
+
125
+ If install fails with `No matching version found for @studio-freight/lenis`:
126
+
127
+ - The project has the **wrong Lenis package**. Replace dependencies with the bundled `templates/nextjs/package.json`.
128
+ - Use `lenis` (^1.3.23), **not** `@studio-freight/lenis`.
129
+
130
+ Required packages (from bundled template):
131
+
132
+ ```bash
133
+ npm install choreo-3d framer-motion gsap lenis @fal-ai/client @fal-ai/server-proxy next react react-dom
134
+ ```
135
+
136
+ If the skill copied templates from `templates/nextjs/`, use the bundled `package.json` instead of merging manually.
137
+
138
+ ---
139
+
140
+ ## Step 4 — How the key is used (safe pattern)
141
+
142
+ The bundled templates use a **server-side proxy**. Your browser never sees `FAL_KEY`.
143
+
144
+ ```
145
+ Browser → /api/fal/proxy → fal.ai API
146
+
147
+ FAL_KEY injected here (server only)
148
+ ```
149
+
150
+ | File | Role |
151
+ |---|---|
152
+ | `app/api/fal/proxy/route.ts` | Proxies browser fal requests; key stays on server |
153
+ | `app/api/generate-edition-asset/route.ts` | Server route for chapter image generation |
154
+ | `lib/fal-client.ts` | Client config — sets `proxyUrl: '/api/fal/proxy'` only |
155
+ | `lib/fal-generate.ts` | Builds prompts and calls fal on the server |
156
+ | `lib/prompt-contract.ts` | Structured prompt schema per chapter |
157
+
158
+ **Rule:** If you see `FAL_KEY` or `process.env.FAL_KEY` inside a `'use client'` component, that is a bug — move the call to an API route.
159
+
160
+ ---
161
+
162
+ ## Step 5 — Run locally and test one image
163
+
164
+ 1. Start the dev server:
165
+
166
+ ```bash
167
+ npm run dev
168
+ ```
169
+
170
+ 2. Test the generation route (replace values with your chapter):
171
+
172
+ ```bash
173
+ curl -X POST http://localhost:3000/api/generate-edition-asset \
174
+ -H "Content-Type: application/json" \
175
+ -d '{
176
+ "chapterId": "prologue",
177
+ "subject": "classical marble bust beside a glowing laptop",
178
+ "productTruth": "AI release notes as editorial artifact",
179
+ "historicalLayer": "renaissance",
180
+ "modernLayer": "glass UI panel, monospace code overlay",
181
+ "palette": ["#0a0a0a", "#f5f0e8", "#c9a227"],
182
+ "camera": "medium",
183
+ "outputRole": "hero"
184
+ }'
185
+ ```
186
+
187
+ 3. A successful response includes an image `url` you can open in the browser.
188
+
189
+ 4. If you get `{ "error": "Missing FAL_KEY" }`, your `.env.local` is missing, misnamed, or the dev server was started before you added the key — **restart `npm run dev`**.
190
+
191
+ ---
192
+
193
+ ## Step 6 — Generate assets for all chapters
194
+
195
+ Use the bundled batch script — it reads `lib/editions-manifest.ts`, calls fal once per chapter, and writes both the URL and the binary to `public/generated/`.
196
+
197
+ ```bash
198
+ # Dry run: print prompts only, no fal calls, no credit cost
199
+ node scripts/generate-chapter-assets.mjs --dry-run
200
+
201
+ # Generate all chapters with the default model (FLUX.2 Pro)
202
+ node scripts/generate-chapter-assets.mjs
203
+
204
+ # Only regenerate two chapters
205
+ node scripts/generate-chapter-assets.mjs --only prologue,studio
206
+
207
+ # Use a different model just for this run
208
+ node scripts/generate-chapter-assets.mjs --model fal-ai/gemini-3-pro-image-preview
209
+ ```
210
+
211
+ Output:
212
+
213
+ ```
214
+ public/generated/
215
+ prologue.jpg
216
+ agentic.jpg
217
+ studio.jpg
218
+
219
+ manifest.json ← {chapterId → {url, local, seed, model}}
220
+ ```
221
+
222
+ Set `manifest.assets[id].local` paths on your chapter `background` fields in `editions-manifest.ts` for production — Next/Image will serve them from the static folder.
223
+
224
+ ### Queue mode (batches > 5 images, video, slow models)
225
+
226
+ ```bash
227
+ curl -X POST http://localhost:3000/api/generate-edition-asset \
228
+ -H "Content-Type: application/json" \
229
+ -d '{"mode":"queue","chapterId":"prologue", ... }'
230
+ # → { "status":"queued", "requestId":"...", "modelId":"fal-ai/flux-2-pro" }
231
+ ```
232
+
233
+ The result is POSTed to `/api/fal/webhook?chapter=prologue` when fal finishes. Wire that route to your DB / KV to persist the URL — see `app/api/fal/webhook/route.ts`.
234
+
235
+ ---
236
+
237
+ ## Deploying to Vercel (production)
238
+
239
+ 1. Push code **without** `.env.local` (never commit secrets).
240
+ 2. In Vercel: **Project → Settings → Environment Variables**.
241
+ 3. Add `FAL_KEY` with your key value (Production + Preview).
242
+ 4. Optionally add `FAL_IMAGE_MODEL` and `NEXT_PUBLIC_SITE_NAME`.
243
+ 5. Redeploy.
244
+
245
+ The same server proxy pattern works on Vercel — no code changes needed.
246
+
247
+ ---
248
+
249
+ ## Troubleshooting
250
+
251
+ | Symptom | Likely cause | Fix |
252
+ |---|---|---|
253
+ | `Missing FAL_KEY` | Env file not loaded | Create `.env.local`, set `FAL_KEY`, restart dev server |
254
+ | `401` / `403` from fal | Invalid or expired key | Regenerate key in fal.ai dashboard |
255
+ | `402` / insufficient credits | No fal.ai balance | Add credits in fal.ai billing |
256
+ | Images generate but page is blank | Unrelated to fal — scroll/sandbox issue | Apply the Mode A sandbox fallback rules in `SKILL.md` (§ MODE A) |
257
+ | Key visible in browser DevTools | Key used in client code | Move generation to `/api/generate-edition-asset` only |
258
+
259
+ ---
260
+
261
+ ## Working without fal.ai (static images)
262
+
263
+ You do not need fal.ai to use the scroll page:
264
+
265
+ 1. Add your own images to `public/assets/…`
266
+ 2. Set chapter `asset.src` in `editions-manifest.ts` to those paths
267
+ 3. Skip `/api/generate-edition-asset` entirely
268
+
269
+ The motion system (`choreo-3d`, parallax, pinning) works the same with static assets.
270
+
271
+ ---
272
+
273
+ ## Need help?
274
+
275
+ When using this skill in Claude or Cursor, try:
276
+
277
+ > I'm new to fal.ai. Walk me through creating an API key, setting `.env.local`, and generating one test hero image for my release page. Use the bundled templates — do not expose FAL_KEY in client code.
278
+
279
+ See also `examples/PROMPTS.md` for full build prompts once setup is complete.
@@ -0,0 +1,50 @@
1
+ # Known issues (QA log)
2
+
3
+ ## 2026-05-23 — Prompt #1: `npm install` fails with ETARGET on Lenis
4
+
5
+ **Symptom:** `No matching version found for @studio-freight/lenis@^1.0.45`
6
+
7
+ **Cause:** Claude regenerated `package.json` from memory instead of copying `templates/nextjs/package.json`. The old `@studio-freight/lenis` scope is deprecated (max 1.0.42). Version `^1.0.45` does not exist.
8
+
9
+ **Fix in skill v1.1.1:**
10
+ - Bundled `templates/nextjs/package.json` with `"lenis": "^1.3.23"`
11
+ - SKILL.md forbids `@studio-freight/lenis` and invented versions
12
+ - Added `lib/use-lenis.ts` + `SmoothScrollProvider.tsx`
13
+
14
+ **Patch if Claude still generates wrong deps:** replace with bundled `package.json`, run `npm install` again.
15
+
16
+ ---
17
+
18
+ ## 2026-05-23 — Terminal: pasted README block causes `command not found: #`
19
+
20
+ **Symptom:** `zsh: command not found: #`, `MODULE_NOT_FOUND` for scripts
21
+
22
+ **Cause:** User pasted multi-line README instructions including `#` comment lines. zsh runs each line separately; comments become invalid commands.
23
+
24
+ **Fix:** Run one command at a time:
25
+
26
+ ```bash
27
+ npm install
28
+ cp .env.example .env.local
29
+ npm run dev
30
+ ```
31
+
32
+ ---
33
+
34
+ ## 2026-05-23 — Claude removed `choreo-3d` and hand-rolled parallax
35
+
36
+ **Symptom:** Custom `ParallaxChapter.tsx`, inline types instead of `choreo-3d`
37
+
38
+ **Cause:** Claude ignored bundled `EditionsPage.tsx` which imports `ScrollLayer`, `ScrollChoreography`, etc.
39
+
40
+ **Fix:** Copy `templates/nextjs/components/EditionsPage.tsx` and ensure `"choreo-3d": "^1.0.0"` in `package.json`.
41
+
42
+ ---
43
+
44
+ ## 2026-05-23 — `next: command not found`
45
+
46
+ **Symptom:** `npm run dev` → `sh: next: command not found`
47
+
48
+ **Cause:** `npm install` failed earlier (Lenis ETARGET), so `node_modules` was never created.
49
+
50
+ **Fix:** Fix `package.json` first, then `npm install`, then `npm run dev`.
@@ -0,0 +1,166 @@
1
+ # Trigger Prompts — Cinematic Scroll
2
+
3
+ Copy, paste, replace the bracketed bits, hit enter. Prompts are grouped by the two modes.
4
+
5
+ - **Mode A — scroll artifact:** one self-contained HTML/TSX section. No build, no keys.
6
+ - **Mode B — full release site:** a complete Next.js project + optional fal.ai assets.
7
+
8
+ ---
9
+ ---
10
+
11
+ # Mode A — scroll artifacts (single section, instant preview)
12
+
13
+ Each must output a complete, runnable HTML or TSX artifact.
14
+
15
+ ## Aesthetic worlds
16
+
17
+ ### A1) Bold editorial — graphic brutalism
18
+
19
+ > Use cinematic-scroll to build a hero chapter for a fashion brand: brutal editorial style, black on white, raw grid lines, oversized title that cuts into view with a hard vertical clip-path wipe (no cross-fade). Pin for 150vh. Background is a stark white void. Title is 20vw tall. A single accent line (2px, black) sweeps left-to-right across the frame at 60% scroll. Progress HUD in top-right corner.
20
+
21
+ ### A2) Elegant quiet luxury
22
+
23
+ > Use cinematic-scroll to create a pinned chapter for a luxury brand: muted palette (ecru, bark, cognac), long slow parallax (depth 0.15–0.50 only), 220vh pin. Title reveals via letter-spacing scrub from 0.45em to 0em over the first 30% of scroll. Background image drifts barely 3% over the full pin — perceptual depth without movement. No bright colours, no glow. Reduced motion: immediately show mid-state, no snap.
24
+
25
+ ### A3) Contemporary pop — Gen Z energy
26
+
27
+ > Use cinematic-scroll to build an energetic hero chapter for a productivity app: candy pink and electric lime gradients, bold mixed-case type, fast parallax (depth 0.15–1.40 with wide multiplier gaps), short 90vh pin. Title stagger is fast (each word enters on a 2% offset). A floating UI screenshot layer at depth 1.20 drifts upward faster than the title. Progress HUD included.
28
+
29
+ ### A4) Minimal tech — Linear / Vercel aesthetic
30
+
31
+ > Use cinematic-scroll to produce a scroll chapter in the Linear release-notes style: #09090b background, Inter stack, no images, SVG line-art illustration at mid-depth, controlled restraint. Pin 120vh. Parallax depth range narrow (0.05–0.35 only). No 3D camera rotation. Title uses letter-spacing scrub only. One thin border line sweeps in from the left at 15% scroll. Compositor-only paths proven in code comments.
32
+
33
+ ### A5) Cinematic dark sci-fi
34
+
35
+ > Use cinematic-scroll to generate a 200vh pinned chapter for a sci-fi game: near-black background, deep teal atmospheric gradient (depth 0.15), heavy grain overlay (depth 0.30), dramatic character silhouette (depth 0.75) with 3D camera (rotateX ±4°, rotateY ±2°, translateZ −80px). Title uses vertical clip-path mask wipe. Oversized Roman numeral watermark at depth 1.20. Scroll cue badge at depth 1.40. Touch devices: 3D disabled, grain hidden, chapter stacked.
36
+
37
+ ### A6) Soft organic — wellness / botanical
38
+
39
+ > Use cinematic-scroll to build a calm scroll chapter for a wellness brand: off-white, blush and sage, watercolour-wash background, very slow depth multipliers (max 0.55 on all layers), 180vh pin. Title horizontal wipe (`clip-path: inset(0 100% 0 0) → inset(0 0 0 0)`). No hard edges — all containers 16px radius. Reduce motion: render mid-keyframe static state immediately.
40
+
41
+ ### A7) Typographic maximalism — text as image
42
+
43
+ > Use cinematic-scroll to build a chapter where the ONLY visual element is the oversized title. Background is a solid colour from the palette. No images, no decorative layers. Title is `clamp(6rem, 20vw, 18rem)` tall, letter-spacing scrubs from 0.5em to −0.02em across the full pin. One word per line, stacked vertically. At depth 1.20, the same word list repeats in ghost form (opacity 0.05) drifting upward. Pin 140vh. A poster in motion.
44
+
45
+ ### A8) Nostalgic retro — analogue grain revival
46
+
47
+ > Use cinematic-scroll to create a scroll chapter for a vintage audio brand: warm amber and deep burgundy, subtle VHS scan-line overlay (thin repeating horizontal lines at 0.7px, opacity 0.08), wide-tracking serif italic title (letter-spacing +0.06em). Depth layers max at 0.60 — everything moves slowly, suggesting physical weight. Background image shifts only 4% over the full pin. Foreground product render at depth 0.75. Progress HUD styled as an analogue gauge.
48
+
49
+ ## Technical / QA prompts (Mode A)
50
+
51
+ ### A9) Deep parallax + timing gate
52
+
53
+ > Use cinematic-scroll to build a hero chapter pinned for two viewport heights. Use 5 depth layers: atmosphere (0.15), distant props (0.35), mid texture (0.55), subject image (0.75), typography (1.0). Title fades in by 20% scroll, holds through 70%, drifts out by 100%. Add a live progress HUD.
54
+
55
+ ### A10) Sandbox / iframe-proof fallback
56
+
57
+ > Use cinematic-scroll to produce a self-contained HTML artifact that works inside sandboxed iframes: container-based scroll root (not window), sticky pinning, normalized progress `p ∈ [0,1]`, guaranteed visible initial state (background opacity ≥ 0.85 at p=0), and a debug HUD. No npm, no build step.
58
+
59
+ ### A11) Mobile-first responsive
60
+
61
+ > Use cinematic-scroll to build a fully responsive scroll chapter. Desktop: pinned 7-layer parallax, 3D perspective camera. Mobile (<768px): IntersectionObserver fade-up, no pinning, stacked layout, clamp() typography, safe-area-inset padding, 44px tap targets. Touch: backdrop-blur removed, 3D disabled.
62
+
63
+ ### A12) Performance proof
64
+
65
+ > Use cinematic-scroll to build a scroll chapter annotated with explicit performance guarantees: only `transform` and `opacity` mutate per frame (no top/left/filter), `getBoundingClientRect()` cached once on init, `will-change: transform` on animated layers only, rAF-throttled scroll handler. Include a Lighthouse score target comment.
66
+
67
+ ---
68
+ ---
69
+
70
+ # Mode B — full release sites (Next.js + fal.ai)
71
+
72
+ ## ← START HERE
73
+
74
+ ### B1) Default — the safe scaffolding prompt
75
+
76
+ Replace `[YOUR PRODUCT IN ONE LINE]`. Everything else has sensible defaults.
77
+
78
+ > Use cinematic-scroll to scaffold a complete Shopify-Editions-tier cinematic release page for **[YOUR PRODUCT IN ONE LINE]**.
79
+ >
80
+ > Requirements:
81
+ > - **Demo mode** for the first run — do not require my fal.ai key. The page must look stunning on first paint using the CSS-only `ChapterDemoVisual` component.
82
+ > - Copy ALL bundled templates from `templates/nextjs/` **verbatim** — `package.json`, `ChapterScene.tsx`, `ChapterDemoVisual.tsx`, `lib/fal-models.ts`, `lib/fal-generate.ts`, `scripts/setup.mjs`, `scripts/generate-chapter-assets.mjs`. Do not regenerate them from memory.
83
+ > - 8 chapters in `lib/editions-manifest.ts` — customise titles, eyebrows, summaries, technicalDetail, features, accent, atmosphere, and visualPrompt for my product. Leave `background` commented out so demo mode renders.
84
+ > - Default model `fal-ai/flux-2-pro` when I'm ready to generate real images.
85
+ >
86
+ > Finish your response with **exactly three things**, in this order:
87
+ > 1. The two commands to run now: `npm install && npm run dev`
88
+ > 2. The optional fal.ai setup command: `npm run setup`
89
+ > 3. The optional batch command for real images: `npm run generate`
90
+ >
91
+ > Nothing else after those commands.
92
+
93
+ ### B2) Beginner — full fal.ai walkthrough
94
+
95
+ > I'm new to fal.ai. Using cinematic-scroll, walk me through the full setup: run `npm run setup`, follow each prompt in the wizard, and generate one test hero image. Use the bundled scripts — do not put my key in any client component. Follow `examples/GETTING_STARTED.md`.
96
+
97
+ ## Aesthetic variants — swap B1 for one of these for a different world
98
+
99
+ ### B3) Bold editorial — Brutalist-meets-Balenciaga
100
+
101
+ > Use cinematic-scroll to build a release page for a fashion-tech brand. Visual world: bold editorial brutalism — oversized black-on-white typography, raw grid lines, stark silhouette photography, zero decoration. 8 chapters, each a magazine double-spread: massive headline lands first, then the image cuts in hard with no cross-fade. Atmospheres alternate white void / ink black. Word-stagger reveals on every title. No gradients, no glass panels — solid-colour blocks and ruled lines.
102
+
103
+ ### B4) Elegant editorial — quiet luxury / Bottega Veneta
104
+
105
+ > Use cinematic-scroll to create a release page for a luxury leather goods launch. Visual world: quiet luxury — muted earth palettes (stone, ecru, bark, rust), extreme negative space, micro-typography, long unhurried pins (200vh per chapter). 6 chapters. Each foreground figure is a still-life product shot via ScrollDepthImage. One warm cognac highlight throughout. Roman index barely visible (opacity 0.25), surfacing on hover.
106
+
107
+ ### B5) Contemporary pop — vivid Gen-Z launch
108
+
109
+ > Use cinematic-scroll to generate an 8-chapter launch page for a productivity app targeting Gen Z. Visual world: contemporary pop — neon gradients (electric violet, candy pink, lime green), playful type mixing, chunky pill buttons, UI screenshots as floating foreground objects. Short pins (100vh), fast parallax, quick word-stagger. Background morphs shift between vivid complementary gradient pairs per chapter.
110
+
111
+ ### B6) Minimal tech — Linear / Vercel release
112
+
113
+ > Use cinematic-scroll to build a chaptered product release page in Linear's style: controlled restraint, dark background (#09090b), Inter/monospace stack, thin borders, no photos — only generative SVG chapter illustrations and sharp UI screenshots. 7 chapters, each 80% text / 20% visual. Subtle parallax (0.05–0.30 only). No 3D camera. Word reveals use letter-spacing scrub. Communicate speed and precision, not spectacle.
114
+
115
+ ### B7) Cinematic dark sci-fi — Blade Runner / A24
116
+
117
+ > Use cinematic-scroll to generate a feature-film-quality release page for a sci-fi game expansion. Visual world: neo-noir — near-black backgrounds, deep teals and crimson, heavy grain, fog layers, dramatic edge lighting. 9 chapters, all 7 depth layers fully populated. 3D camera at max spec. Type reveals via vertical mask wipe. Generate fal.ai foreground figures with `historicalLayer: 'baroque'` and `modernLayer` set to armour, chrome, UI glow.
118
+
119
+ ### B8) Soft organic — wellness / bioscience
120
+
121
+ > Use cinematic-scroll to create a calming release page for a longevity science company. Visual world: organic editorial — warm off-whites, blush, sage, parchment, watercolour washes. 6 chapters. Transitions feel like turning pages — long cross-fades (scrub 1.4), slow depth (max 0.6 on background). Titles use clip-path horizontal wipe. Generous border-radius everywhere. Chapter index uses dots. fal.ai with `historicalLayer: 'atelier'`, painterly botanical subjects.
122
+
123
+ ### B9) Typographic maximalism — Pentagram-tier
124
+
125
+ > Use cinematic-scroll to build a 7-chapter release page where typography IS the art direction. Title is 30vw tall, letter-spaced −0.1em, scrubs 0.4em → 0em over the full pin. No hero images — each chapter background is a single solid palette colour. Foreground uses SVG illustration or generative texture only. Stark bordered cards, no blur. The motion is about the text, not the image.
126
+
127
+ ### B10) Nostalgic retro — 80s / 90s archive revival
128
+
129
+ > Use cinematic-scroll to generate a release page for a vintage audio brand. Visual world: retro archive — warm amber and burgundy, VHS scan lines, analogue gauge UI, wide serif italic type, physical texture. 6 chapters, each foreground a product render with tactile depth. fal.ai with `historicalLayer: 'industrial'`. Atmospheres desaturated warm-to-cool gradient pairs. Parallax max 0.6 to suggest weight, not speed.
130
+
131
+ ## Technical / QA prompts (Mode B)
132
+
133
+ ### B11) Template integrity test
134
+
135
+ > Use cinematic-scroll to scaffold a complete Next.js App Router release site. Copy ALL bundled files from `templates/nextjs/` verbatim — especially `package.json` (lenis, not @studio-freight/lenis), `ChapterScene.tsx` (7 layers, perspective camera, word-stagger), and `use-device.ts`. Customise only `editions-manifest.ts`. Keep `FAL_KEY` server-side only. Show where env vars are read and how `prompt-contract.ts` is structured.
136
+
137
+ ### B12) Mobile-first stress test
138
+
139
+ > Use cinematic-scroll to build the release page mobile-first (375px). Show how `ChapterScene` switches to the mobile fallback below 768px: IntersectionObserver fade-up, no pinning, stacked layout, safe-area padding, 44px tap targets. Then confirm the desktop 7-layer scene is intact at 1280px.
140
+
141
+ ### B13) Performance + Lighthouse gate
142
+
143
+ > Use cinematic-scroll to produce a full 8-chapter release page with a QA checklist proving: compositor-only scroll paths, reduced-motion static fallback, backdrop-blur removed on touch, iOS video safety (no preserve-3d ancestor around video), Lighthouse Performance ≥ 90.
144
+
145
+ ### B14) Batch asset generation (one command)
146
+
147
+ > Use cinematic-scroll to scaffold the project, then walk me through `node scripts/generate-chapter-assets.mjs --dry-run` to preview prompts, followed by a real run that generates all 8 chapter images into `public/generated/` and writes `manifest.json`. Show how to point chapter `background` fields at the local paths.
148
+
149
+ ### B15) Model swap (FLUX → Nano Banana, no code edits)
150
+
151
+ > Use cinematic-scroll to scaffold the page with `FAL_IMAGE_MODEL=fal-ai/flux-2-pro`, generate one hero, then change `.env.local` to `FAL_IMAGE_MODEL=fal-ai/gemini-3-pro-image-preview` and regenerate the same chapter — no code change. The `lib/fal-models.ts` adapter must handle `image_size → aspect_ratio` automatically. Print the request body in each case.
152
+
153
+ ### B16) Queue + webhook (production async)
154
+
155
+ > Use cinematic-scroll to scaffold the page and demonstrate queue mode: POST to `/api/generate-edition-asset` with `{"mode":"queue", ...}`, get a `requestId`, and show how `app/api/fal/webhook/route.ts` receives the result. Add a minimal in-memory map to persist `{requestId → url}`.
156
+
157
+ ---
158
+
159
+ ## Anti-patterns — do NOT use this skill for
160
+
161
+ - "Build a basic hero + features + pricing landing page."
162
+ - "Generate a WordPress theme."
163
+ - "Build me a SaaS dashboard with a sidebar and tables."
164
+ - "Add a fade-in when this button is clicked."
165
+ - "Give me motion ideas only, no code." (The skill must output runnable artifacts.)
166
+ - "Regenerate all templates from scratch without reading bundled files."
@@ -0,0 +1,88 @@
1
+ # Luxe — quiet-luxury maison (Maison Solenne)
2
+
3
+ A worked example for **cinematic-scroll** in a deliberately restrained world:
4
+ **quiet luxury** — warm ivory and sand grounds, a single muted cognac accent,
5
+ refined thin-serif display type, vast negative space, and *barely-there*
6
+ parallax. The motion is Villeneuve-by-way-of-Kubrick: long 220vh pins, a
7
+ background that drifts only ~3% across the whole pin, and titles that reveal
8
+ through a **letter-spacing scrub** (0.45em → 0em) rather than anything flashy.
9
+ Fictional maison (**Maison Solenne**) — no real people or brands.
10
+
11
+ Single self-contained `index.html` — no build step, no npm, no external JS.
12
+ The only external request is Google Fonts. GitHub-Pages-native.
13
+
14
+ ## Run it
15
+
16
+ ```bash
17
+ # from the repo root
18
+ python3 -m http.server 8099
19
+ # then open http://localhost:8099/examples/luxe/
20
+ ```
21
+
22
+ …or just double-click `index.html`. It works **immediately, at $0**, with **zero
23
+ image files**: each chapter probes for a real still and, on 404, renders a
24
+ refined CSS-only placeholder (soft warm gradients + subtle grain) so the page
25
+ looks intentional and complete. Drop real stills in later and the page picks
26
+ them up automatically.
27
+
28
+ ## What it demonstrates
29
+
30
+ - **Quiet-luxury motion** — depth multipliers ≤ 0.50; the framed still drifts
31
+ only ~3% of the viewport over the entire 220vh pin (perceptual depth without
32
+ visible movement). No 3D tilt, no glow, no `filter` animation.
33
+ - **Letter-spacing title reveal** — the refined/luxury treatment from
34
+ `taste-guardrails.md`: the first title fragment scrubs `0.45em → 0em` over
35
+ the first ~30% of each pin.
36
+ - **GSAP ScrollTrigger showcase beat** — one dedicated, whisper-quiet section
37
+ ("The Object, Held", inserted after Chapter III) powered by GSAP
38
+ ScrollTrigger (deferred from CDN, feature-detected). It demonstrates two
39
+ restrained techniques from `taste-guardrails.md` §2:
40
+ - **Push-in** — the framed object scales `1 → 1.08` over the pin (a slow zoom
41
+ toward the subject), with no other foreground motion.
42
+ - **Match-cut** — two captions share the exact same position; the words swap
43
+ by `opacity` crossfade while the composition holds perfectly still.
44
+
45
+ No 3D tilt, no snap, no velocity effects (museum restraint). If GSAP fails to
46
+ load — or under reduced-motion / mobile — the beat degrades to a complete
47
+ static state (object at rest, both captions shown), and the hand-rolled rAF
48
+ engine is unaffected.
49
+ - **Compositor-only scroll** — only `transform` and `opacity` mutate per frame,
50
+ in one rAF batch, behind a passive scroll listener; off-screen sections are
51
+ skipped.
52
+ - **Background morph + quiet rail** — a fixed warm atmosphere crossfades
53
+ between four ground tones via an IntersectionObserver scroll-spy; the
54
+ left-hand progress rail marks the active chapter.
55
+ - **Graceful degradation** — `prefers-reduced-motion` and mobile (≤680px) drop
56
+ the pin entirely for a clean, stacked, full-opacity static mid-state
57
+ (letter-spacing settled to 0), with a gentle IntersectionObserver fade-up.
58
+
59
+ ## Image slots
60
+
61
+ The page is built to look complete with **no files present**. To upgrade a
62
+ chapter, drop a JPEG at the probed path below and reload — no code change. All
63
+ paths are relative, so it works at
64
+ `https://<user>.github.io/cinematic-scroll-skill/examples/luxe/`.
65
+
66
+ | Slot | Probed file (relative) | Aspect ratio | Target px | Generation prompt |
67
+ |------|------------------------|:------------:|:---------:|-------------------|
68
+ | I — Overture | `assets/overture.jpg` | 4 : 5 | 1024 × 1280 | Quiet-luxury website-interface still life: a single muted object — a folded length of pale ecru linen on warm ivory — centred in vast negative space, photographed in soft north-window light. Warm ivory and sand palette, the faintest restrained cognac warmth, no bright colour, no glow, generous soft shadow, refined and calm. Editorial Swiss-museum restraint. No text, no logos, no people. |
69
+ | II — Provenance | `assets/provenance.jpg` | 4 : 5 | 1024 × 1280 | Quiet-luxury still: a worn leather-bound ledger and a single brass key resting on aged sand-coloured paper, shot from above in soft diffuse light. Muted ecru, bark, and restrained cognac tones, vast negative space around the objects, gentle grain, no hard edges. Calm archival mood, expensive restraint. No text, no logos, no people. |
70
+ | III — The Object | `assets/object.jpg` | 4 : 5 | 1024 × 1280 | Quiet-luxury product moment: one hand-burnished cognac-leather object — a minimal unbranded holdall — standing alone on a warm sand surface, framed in soft directional light against an ivory void. Restrained cognac accent, deep soft shadow, no monogram, no hardware, no shine or glow. Refined thin-serif-era catalogue mood, immense negative space. No text, no logos, no people. |
71
+ | IV — Enquire | `assets/audience.jpg` | 4 : 5 | 1024 × 1280 | Quiet-luxury still: a single sheet of heavy ivory correspondence paper and a fountain pen on a bare warm-ecru desk, one shaft of soft window light, long quiet shadow. Muted ivory, sand, and cognac palette, vast empty space, fine grain, soft radii. Calm, patient, intentional. No writing, no text, no logos, no people. |
72
+
73
+ > Recommended export: **WebP or optimised JPEG, ≤ 200KB each, ≤ 1280px on the
74
+ > long edge** (per `references/performance-budget.md`). The frame uses
75
+ > `object-fit: cover` (via `background-size: cover`), so off-centre crops are
76
+ > forgiving.
77
+
78
+ ## Editing
79
+
80
+ Open `index.html` and edit the `CHAPTERS` array near the bottom — titles
81
+ (`[text, italic?]` fragments; the first fragment carries the scrub), copy,
82
+ ground-tone `morph`, captions, and the rail labels. Drop matching stills into
83
+ `./assets/<id>.jpg`. That is the whole content model.
84
+
85
+ ## Deploy / preview
86
+
87
+ Static files only — push to a branch and enable GitHub Pages, or
88
+ `python3 -m http.server 8099` locally and open `/examples/luxe/`.