A skill that turn any brand into a scrollable 3D world landing page
JavaScript
v0.6.0: Monid seedance-2.0 qualified — full-chain pay-per-clip backend
cyw37d1a1e18011
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex 39c87b5..00c1f12 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,7 +1,7 @@{"name": "scroll-world","description": "Build an immersive scroll-scrubbed 'fly through the world' landing page for any industry or brand using Higgsfield. As the visitor scrolls, a pre-rendered camera flies from outside each scene into its interior, then flows on to the next scene with no cuts — one continuous connected flight. Interviews the user for the topic, story beats, and brand kit, then generates cohesive scenes + seamless camera clips and wires a portable, framework-agnostic scroll-scrub engine. Use for a '3D world' / 'browse-through-the-industry' hero, a scroll cinematic, or a diorama landing.",- "version": "0.5.0",+ "version": "0.6.0","author": {"name": "cyw","email": "[email protected]"diff --git a/README.md b/README.mdindex eb6a52f..c9cc73f 100644--- a/README.md+++ b/README.md@@ -54,12 +54,13 @@ cp -R scroll-world/skills/scroll-world ~/.codex/skills/ # Codex- The [Codex CLI](https://github.com/openai/codex) (optional) — if present, the scenestills can be generated through Codex's built-in `image_gen` (the same GPT Imagemodel), billed to a ChatGPT subscription instead of Higgsfield credits.-- The [Monid CLI](https://monid.ai) (optional) — recognized as a candidate- pay-per-clip video backend. The skill capability-checks its endpoints before use- (the chain needs start/end-frame conditioning); as of 2026-07 none qualify —- Monid's Seedance endpoints are text-to-video only, and its MiniMax endpoint drops- the start frame whenever a prompt is present — so it documents the findings and- the re-qualification probes instead of wiring broken legs.+- The [Monid CLI](https://monid.ai) (optional) — a qualified pay-per-clip video+ backend: the same Seedance 2.0 chain billed per clip in USD instead of+ Higgsfield credits (verified 2026-07-25: first/last-frame conditioning+ frame-locks; frames travel via Monid's free workspace file system). Useful as a+ no-subscription alternative or a mid-build top-up when credits run dry. The+ skill re-checks the endpoint schema each build and keeps qualification probes+ in the pipeline for when the catalog changes.## What it doesdiff --git a/skills/scroll-world/SKILL.md b/skills/scroll-world/SKILL.mdindex d576cad..73cec7a 100644--- a/skills/scroll-world/SKILL.md+++ b/skills/scroll-world/SKILL.md@@ -8,8 +8,8 @@ description: >or any art direction you pick). The skill interviews the user for the topic, thestory beats/sections, and brand kit, then generates cohesive scenes + seamless cameraclips with Higgsfield and wires a portable, framework-agnostic scroll-scrub engine.- Knows the Monid CLI as a candidate pay-per-clip video backend (capability-checked- before use — see Step 4). Use when the user wants a "3D world" /+ Supports the Monid CLI as a qualified pay-per-clip video backend (Seedance 2.0+ in USD — capability re-checked each build, see Step 4). Use when the user wants a "3D world" /"browse-through-the-industry" hero, a scroll cinematic, a diorama landing, or toturn a business into a scrollable world.allowed-tools: Bash, Read, Write, Edit, AskUserQuestion, Skill@@ -56,10 +56,11 @@ not the framework.user's ChatGPT subscription instead of Higgsfield credits — offer it atStep 1.6, command in Step 2. Absence just removes the option.5. **(Optional) Monid CLI** — if `monid` is on `$PATH` with an active key- (`monid keys list`), its pay-per-USD catalog is a candidate video backend and a- top-up path when Higgsfield credits run dry — but it must pass the capability- check first, and as of 2026-07 **no Monid endpoint qualifies for the chain**- (Step 4 → Monid backend). Absence just removes the option.+ (`monid keys list`), Monid's `bytedance /v1/video/seedance-2.0` is a qualified+ pay-per-USD chain backend (both probes passed 2026-07-25 — Step 4 → Monid+ backend): per-clip dollar billing instead of Higgsfield credits, `monid+ balance` for the wallet. Frames travel via Monid's free workspace file system+ (`sfs`), not inline base64. Absence just removes the option.6. Caveats: macOS ships **bash 3.2** (no `declare -A`); don't use associative arrays inscripts. Higgsfield generations take **3–8 min each** — always run them detached(background) and poll, never a foreground blocking call. Reference-by-job-UUID is@@ -138,14 +139,21 @@ default. Cover:Draft doubles as the previz path: run the whole chain cheap, approve thejourney, re-render final legs on Standard (pipeline.md Notes) — suggest itunprompted when the balance reads tight.- - **Monid (pay-per-clip USD)** — mention only if bootstrapped (Step 0.5). It's- a *billing* alternative (per-clip dollars, `monid balance`, no subscription),- not a quality tier: for the same model it prices at rough parity with- Higgsfield's Plus-monthly credit rate (verified 2026-07: MiniMax Hailuo-2.3- 768P/6s ≈ $0.28 on both; Higgsfield annual plans undercut it). And it- currently fields **no chain-capable endpoint** (Step 4 → Monid backend), so- today it cannot render the world — re-check its catalog before each build,- it moves.+ - **Monid (pay-per-clip USD)** — offer only if bootstrapped (Step 0.5). Same+ Seedance 2.0 chain, billed per clip in dollars instead of credits (qualified+ 2026-07-25; wiring in pipeline.md → Monid backend). Token-priced:+ `width × height × 24 × seconds / 1024` tokens at $7/1M (480p/720p) or+ $7.7/1M (1080p) — measured: 1080p 8s dive ≈ $2.99, 5s connector ≈ $1.87,+ 720p ≈ $1.21 / $0.76, 480p previz ≈ $0.28 / $0.35. An N=6 desktop chain ≈+ $27 at 1080p / ~$11 at 720p vs Higgsfield Plus-monthly ≈ $32 / $16 — ~15%+ cheaper per clip, parity with Plus-annual, and the real differences are+ structural: pay-per-use (no subscription, no monthly expiry) and a top-up+ path when credits run dry mid-build. It's the same underlying model+ (`seedance_2_0` ≙ Monid's `seedance-2.0`), so finishing a stranded chain on+ Monid is a reasonable rescue — but the serving stacks differ and+ cross-provider seam character is **untested**: eyeball the first rescued+ seam before rendering the rest, same as any model swap. Check+ `monid balance` before promising a build.- **Stills source** (only offer if the Codex CLI is present, Step 0.4):Higgsfield `gpt_image_2` (spends credits) vs **Codex `image_gen`** — the samegpt-image-2 model billed to the ChatGPT subscription (zero credits; counts@@ -278,39 +286,49 @@ Rules:- The pipeline scripts take the model as `$VMODEL` with per-model flags already casedout (`references/pipeline.md`).-### Monid backend — capability-check protocol (2026-07 status: declined)--Monid (`monid` CLI, Step 0.5) exposes hundreds of pay-per-USD endpoints, including-video models that share names with the roster — **the name overlap is a trap**. The-frame-lock rule applies unchanged, and the check is the endpoint's *schema*, not the-model name:--```bash-monid discover -q "image to video"-monid inspect -p <provider> -e <endpoint> # read the Input schema, not the title-```--Qualification = the body schema takes a start-frame image for every chained clip-(plus an end-frame for connectors), and a paid probe confirms the image actually-steers the render. Verified 2026-07-17:--| Endpoint | Schema verdict | Chain? |-|---|---|---|-| `bytedance /v1/video/seedance-2.0` (also `-mini`, `-fast`) | `content` accepts **text items only** — no image conditioning at all, despite the Seedance name | ✗ declined |-| `minimax /v1/video_generation` (Hailuo-2.3) | Has `first_frame_image` (data-URL ok) — but sending `prompt` **and** the image together silently drops the image (unrelated t2v output, wrong price cell billed: $0.56 vs $0.28). Image-only requests frame-lock perfectly (probe: output frame 0 ≡ input, PSNR 33 dB) — and have no camera control. | ✗ declined |--So Monid's `/v1/video/seedance-2.0` is **not** the roster's `seedance_2_0`: same-model family, different exposed capability (t2v vs i2v). Decline it with the-standard one-liner — it can't hold a seam — and use a roster model. If the user's-real goal is pay-per-clip billing, say that plainly: today that means Higgsfield.--**Re-qualification (the catalog moves):** when a later `monid inspect` shows a-start(+end)-frame schema, run the two paid probes from pipeline.md → "Monid-backend" before trusting it: (1) an image-only clip from a real still — the-video's frame 0 must match the input to codec noise; (2) a prompt+image clip —-the image must still steer the output *and* `cost.value` must match the-advertised matrix cell. Both pass → wire it as a pay-per-clip tier (arch A if-start-only; full roster if start+end).+### Monid backend — QUALIFIED for the full chain (2026-07-25)++Monid's **`bytedance /v1/video/seedance-2.0`** passed both paid probes on+2026-07-25 and is a sanctioned chain backend for **both architectures** — it is+the roster's `seedance_2_0` served pay-per-USD (wiring in pipeline.md → "Monid+backend"):++- **Leg probe** (prompt + `first_frame` image): output frame 0 ≡ input still+ (PSNR 31.6 dB), forward-glide prompt obeyed, billed the advertised cell+ ($0.279 / 480p 4s).+- **Connector probe** (prompt + `first_frame` + `last_frame`): start locked+ (31.6 dB); the end **lands close but not pixel-perfect** (27.5 dB, same+ composition, prop-level drift) — the exact end-image behavior Seedance shows+ on Higgsfield, covered by the engine's seam crossfade and by using the next+ dive's ACTUAL first frame as the end-image (Step 5 law, unchanged).++The I/O contract differs from the Higgsfield CLI — three rules:++1. **Images go by URL, never inline.** `content` items are+ `{"type":"image_url","image_url":{"url":…},"role":"first_frame"|"last_frame"}`;+ base64 data URLs are **rejected** ("Must be a public https:// URL or an+ asset://<id> reference"). Local frames travel through Monid's free workspace+ file system: `sfs /put` → `curl -T` the bytes → `sfs /cat` returns a signed+ public URL to paste into the body ($0, explicitly built for this).+2. **Pass `ratio` explicitly** (`16:9`, or `9:16` for the mobile chain) — the+ adaptive default follows the input image's aspect instead.+3. **Bill-check every clip**: cost is token-priced+ (`w × h × 24 × sec / 1024` at $7–7.7/1M); read `cost.value` off each run.++History that shaped these rules (still true as of 2026-07-25): the seedance+endpoints were text-to-video-only until late July 2026 — **re-`inspect` before+each build; the catalog moves in both directions.** `minimax+/v1/video_generation` (Hailuo-2.3) remains disqualified: sending `prompt` ++`first_frame_image` together silently drops the image (unrelated t2v output,+wrong price cell); image-only frame-locks (33 dB) but has no camera control.++**Qualification protocol for any new/changed Monid endpoint** (each probe is one+cheap 480p clip): (1) prompt + first-frame from a real still — frame 0 must+match the input to codec noise (PSNR ≳ 30 dB) and `cost.value` must match the+advertised cell; (2) for connector duty, add a `last_frame` from a different+still — the end must land on that composition (Seedance-style near-miss is fine,+the crossfade covers it). Pass → pay-per-clip tier (arch A if start-only; full+roster if start+end).### A) Continuous forward take — RECOMMENDED for grounded / realistic / walkthroughOne camera that only ever glides **forward**, first scene through last, as a single take.@@ -641,21 +659,32 @@ is the thing most likely to be wrong:start-image-only model where a connector needs an `--end-image`. One model for the wholechain; the only cheap tier is `seedance_2_0_mini`, which keeps frame-locking so it staysseamless. (Any model with reference-only inputs can't hold a seam at all — Step 4.)-- **Monid "seedance" ≠ roster `seedance_2_0`** → Monid's bytedance video endpoints are- text-to-video only; no prompt can make them hold a seam. Capability lives in the- endpoint *schema* (`monid inspect`), never the model name (Step 4 → Monid backend).+- **Monid seedance rejects inline images** → "Must be a public https:// URL or an+ asset://<id> reference": frames go through the free `sfs` file system+ (put → `curl -T` → cat → signed URL; pipeline.md → Monid backend), never base64.+ Quirk: `/put` echoes back `home/<path>`, but `/cat` and `/ls` want the **original+ relative path** you gave `/put` — using the echoed path 404s.+- **Monid clip wrong aspect** → the `ratio` default is adaptive and follows the input+ image (a 3:2 still → a 4:3-ish video). Pass `--ratio` — `16:9` desktop, `9:16`+ mobile chain — explicitly on every chained clip.+- **Monid CLI "Polling timed out after 120s"** → only the local wait died; the run+ continues server-side. Re-poll with `monid runs get -r <runId> -w 120` (find the id+ in `monid runs list`). Result URLs expire (~24–48 h) — download immediately.- **Monid minimax drops the image when a prompt is present** → `prompt` +`first_frame_image` together returns an unrelated t2v clip AND bills the wrong matrixcell ($0.56 vs $0.28 observed). Image-only frame-locks but has no camera control.- Until the wrapper is fixed, the endpoint can't chain. (The model itself is fine —- the same prompt+image via Higgsfield `minimax_hailuo` frame-locks.)-- **Monid request fails with "Unexpected token '<'"** → the gateway returned an HTML- error page, usually a too-big body: a ~4 MB base64 image failed, ~250 KB passed.- JPEG-compress any inlined frame (≤1536px, q85) before data-URL'ing it.-- **Monid billing surprises** → matrix-priced endpoints bill by selector match: pass- every selector field explicitly (`model`, `resolution`, `duration`) and read- `cost.value` off the run result after each clip. Result URLs expire (~24 h on- bytedance) — download immediately.+ Until the wrapper is fixed, that endpoint can't chain — use Monid's seedance-2.0.+ (The model itself is fine — the same prompt+image via Higgsfield `minimax_hailuo`+ frame-locks.)+- **Monid billing surprises** → matrix/token-priced endpoints bill by selector match:+ pass every selector field explicitly (`model`, `resolution`, `duration`) and read+ `cost.value` off the run result after each clip. A big base64 field in any body can+ also bounce as an HTML error page ("Unexpected token '<'") — another reason frames+ travel by sfs URL.+- **Monid schema changed since last build** → it happens (seedance was t2v-only until+ late July 2026, then gained first/last-frame support). `monid inspect` before each+ build; re-run the Step 4 qualification probes when the Input schema differs from+ what pipeline.md documents.- **White-box scenes** → `gpt_image_2` returns a solid bg; either match the page bg to itor knock it out (Step 3).- **bash 3.2** on macOS → no associative arrays in scripts.diff --git a/skills/scroll-world/references/pipeline.md b/skills/scroll-world/references/pipeline.mdindex 9a8f807..b7b2dda 100644--- a/skills/scroll-world/references/pipeline.md+++ b/skills/scroll-world/references/pipeline.md@@ -12,6 +12,8 @@ NAMES="farm kitchen shop delivery plaza finale" # <-- your section ids, in ord# Must accept --start-image AND --end-image (verify: higgsfield model get <model>):# seedance_2_0 | kling3_0 | seedance_2_0_mini (draft tier). Reference-only models can't# hold a seam; models without --mode (e.g. kling3_0_turbo) need their own flag branch below.+# Pay-per-clip billing instead of credits: same seedance chain via Monid — §7 functions+# (gen_dive_monid/gen_conn_monid with VRES=1080p|720p|480p instead of VOPTS).VMODEL=seedance_2_0case "$VMODEL" in # per-model flags + durations (bash 3.2 safe)kling3_0) VOPTS="--mode std --sound off"; DIVE_DUR=10; CONN_DUR=5 ;; # no --resolution param on Kling@@ -194,54 +196,92 @@ Step 1.5 interview.`stillMobile` so the poster matches the portrait video's frame 0 (no landscape→portraitflash when the clip paints). Engine support: `sections[k].stillMobile`.-## 7. Monid backend — status + qualification harness (SKILL Step 4 → Monid)+## 7. Monid backend — Seedance 2.0 pay-per-clip (qualified 2026-07-25)-**As of 2026-07-17 no Monid endpoint qualifies for the chain**: `bytedance-/v1/video/seedance-2.0(-mini/-fast)` are text-to-video only, and `minimax-/v1/video_generation` silently drops `first_frame_image` whenever `prompt` is also-present (unrelated t2v output + wrong price cell billed). Do not wire Monid legs until-the probes below pass. The catalog moves — re-check per build.--General call pattern (runs take 1–120 s; result URLs expire, download immediately):+`bytedance /v1/video/seedance-2.0` via Monid is the roster's `seedance_2_0` billed+per clip in USD (SKILL Step 4 → Monid backend; both probes passed). Same chain laws+as everywhere else — only the I/O differs: **frames ride Monid's free `sfs` file+system** (inline base64 is rejected), **`ratio` must be explicit** (the adaptive+default follows the input image's aspect), and runs are fire-and-poll. Token-priced+`w×h×24×sec/1024` at $7/1M (480p/720p), $7.7/1M (1080p) — measured: 1080p ≈ $2.99+dive / $1.87 connector; 720p ≈ $1.21 / $0.76; 480p previz ≈ $0.28 / $0.35.```bash-monid discover -q "image to video"-monid inspect -p <provider> -e <endpoint> # read the Input schema — the whole test-monid run -p <provider> -e <endpoint> -f body.json -w 120 -j > run.json-jq -r '.cost, .status' run.json # check billed cost EVERY run-# video URL lives at .output.download_url (minimax) or .output.content.video_url (bytedance)-```+# helper: upload a local frame to sfs, print a signed public URL for it ($0).+# NB: /cat and /ls take the SAME relative path you gave /put — not the+# "home/..."-prefixed path /put echoes back (that one 404s).+monid_frame_url() { # localPng remoteName (JPEG-compresses on the way up)+ jpg="$WORK/sfs_$2.jpg"+ ffmpeg -v error -y -i "$1" -vf "scale='min(1536,iw)':-2" -q:v 2 "$jpg"+ size=$(stat -f%z "$jpg")+ up=$(NO_COLOR=1 monid run -p sfs -e /put \+ -i "{\"path\":\"chain/$2.jpg\",\"sizeBytes\":$size,\"ttl\":\"1h\"}" -w 60 -j \+ | jq -r '.output.uploadUrl')+ curl -fsS -T "$jpg" "$up" > /dev/null+ NO_COLOR=1 monid run -p sfs -e /cat -i "{\"path\":\"chain/$2.jpg\",\"ttl\":\"1d\"}" \+ -w 60 -j | jq -r '.output.url'+}++# fire-and-poll (the CLI's -w caps at 120s and seedance can exceed it)+monid_wait() { # runId outJson+ while :; do+ NO_COLOR=1 monid runs get -r "$1" -j > "$2" 2>/dev/null+ case "$(jq -r '.status // empty' "$2")" in+ COMPLETED|FAILED|BLOCKED|STOPPED|TIME_OUT) break ;;+ esac+ sleep 8+ done+}-Qualification probes — run BOTH before trusting a new/changed endpoint with a chain-(each costs one cheap clip; use the smallest resolution/duration the schema allows):+gen_dive_monid() { # name (VRES=1080p|720p|480p; DIVE_DUR as usual)+ furl=$(monid_frame_url "$WORK/still_$1.png" "still_$1")+ jq -n --arg p "$(cat "$WORK/dive_$1.txt")" --arg u "$furl" --arg r "$VRES" \+ '{content:[{type:"text",text:$p},+ {type:"image_url",image_url:{url:$u},role:"first_frame"}],+ resolution:$r, duration:'"$DIVE_DUR"', ratio:"16:9", generate_audio:false}' \+ > "$WORK/dive_$1.body.json"+ rid=$(NO_COLOR=1 monid run -p bytedance -e /v1/video/seedance-2.0 \+ -f "$WORK/dive_$1.body.json" -j | jq -r '.runId')+ monid_wait "$rid" "$WORK/dive_$1.json"+ url=$(jq -r '.output.content.video_url // empty' "$WORK/dive_$1.json")+ [ -n "$url" ] && curl -fsSL "$url" -o "$WORK/dive_$1.mp4" \+ && echo "dive $1 ok (\$$(jq -r '.cost.value' "$WORK/dive_$1.json"))" \+ || echo "dive $1 FAIL ($(jq -r '.status' "$WORK/dive_$1.json"))"+}-```bash-# Probe 1 — image-only frame-lock: does the video actually start on your frame?-python3 - <<'EOF' # build body.json with a small JPEG data URL (big base64 bodies 500)-import base64, io, json-from PIL import Image-im = Image.open("still.png").convert("RGB"); im.thumbnail((1536,1536))-buf = io.BytesIO(); im.save(buf, "JPEG", quality=85)-json.dump({"model": "<explicit>", "first_frame_image":- "data:image/jpeg;base64,"+base64.b64encode(buf.getvalue()).decode(),- "resolution": "<explicit>", "duration": 6}, open("body.json","w"))-EOF-monid run -p minimax -e /v1/video_generation -f body.json -w 120 -j > run.json-curl -fsSL "$(jq -r '.output.download_url' run.json)" -o probe.mp4-ffmpeg -y -ss 0 -i probe.mp4 -frames:v 1 f0.png-# PASS = f0.png matches still.png to codec noise (eyeball + PSNR ≳ 30 dB)-# AND jq .cost matches the advertised matrix cell.--# Probe 2 — prompt steering: add "prompt": "<forward-glide leg prompt>" to body.json,-# re-run. PASS = f0 still matches AND the camera obeyed AND cost unchanged.-# (This is the probe the minimax endpoint fails today: the image vanishes.)+gen_conn_monid() { # i startPng endPng+ su=$(monid_frame_url "$2" "conn$1_start"); eu=$(monid_frame_url "$3" "conn$1_end")+ jq -n --arg p "$(cat "$WORK/conn_$1.txt")" --arg s "$su" --arg e "$eu" --arg r "$VRES" \+ '{content:[{type:"text",text:$p},+ {type:"image_url",image_url:{url:$s},role:"first_frame"},+ {type:"image_url",image_url:{url:$e},role:"last_frame"}],+ resolution:$r, duration:'"$CONN_DUR"', ratio:"16:9", generate_audio:false}' \+ > "$WORK/conn_$1.body.json"+ rid=$(NO_COLOR=1 monid run -p bytedance -e /v1/video/seedance-2.0 \+ -f "$WORK/conn_$1.body.json" -j | jq -r '.runId')+ monid_wait "$rid" "$WORK/conn_$1.json"+ url=$(jq -r '.output.content.video_url // empty' "$WORK/conn_$1.json")+ [ -n "$url" ] && curl -fsSL "$url" -o "$WORK/conn_$1.mp4" \+ && echo "conn $1 ok (\$$(jq -r '.cost.value' "$WORK/conn_$1.json"))" \+ || echo "conn $1 FAIL ($(jq -r '.status' "$WORK/conn_$1.json"))"+}```-Both pass → the endpoint joins as a pay-per-clip tier: arch-A legs if start-image-only, full roster if it also takes an end-frame. Feed each leg the previous leg's-actual last frame as the data URL, exactly like the Higgsfield arch-A loop — and note-MiniMax output aspect follows the *input image*, so composite stills onto a 16:9 (or-9:16) canvas before leg 0, same trick as the §6b portrait canvases.+Drop-in for §2/§4: same loops, `gen_dive_monid`/`gen_conn_monid` instead of+`gen_dive`/`gen_conn` (mobile chain: `ratio:"9:16"` and the §6b portrait canvases).+Result URLs expire (~24–48 h) — the functions download immediately. Read the billed+`cost.value` per clip (echoed in the ok-line) and `monid balance` between phases; a+`BLOCKED` status is a workspace budget/run cap — terminal, surface it to the user.+Frame extraction, encoding, QA: identical to the Higgsfield path.++**Qualification harness for future/changed endpoints** (each probe = one cheap 480p+clip): (1) prompt + first_frame from a real still → downloaded video's frame 0 must+match the still (eyeball + PSNR ≳ 30 dB) and `cost.value` must match the advertised+cell; (2) add a last_frame from a *different* still → the final frame must land on+that composition (Seedance-style near-miss ok — the crossfade covers it). Known+failure to watch for (it's why the harness exists): `minimax /v1/video_generation`+still silently drops the image when `prompt` is present — image-only output proves+nothing about steerability.## Notes