◉ Pulse
Moh4696 avatar
#47 today ▲ 21

Moh4696/How-I-built-Flight-Website

Shell AI

How Claude Opus 5 turned a landing page's static hero into a seamless AI-generated flight film — Higgsfield CLI, frame-locked seams, and a self-contained CSP-safe build.

Created Jul 27, 2026
Stars
11
Today
+3
Forks
0
Quality
85/100
Momentum
28

README

Fetched from GitHub on Nov 15, 2026, 8:46 AM UTC · README.md

View original on GitHub

Third-party content — Open Source Pulse is not the owner of this repository.

This README belongs to Moh4696/How-I-built-Flight-Website and its contributors. We fetch it directly from the project’s public GitHub repository and display it for reference only. All text, code, images and trademarks remain the property of their respective authors. See the repository for its license terms. Copyright / takedown policy.

Turning a static hero into an AI-generated flight film

How Claude Opus 5 replaced a landing page's static hero video with a continuous, seamless 16-second flight film — using the Higgsfield CLI, the scroll-world skill, and a numeric seam check that turns out to be the whole ballgame.

The hero at rotation


Read this first: what this actually is

Being precise about scope, because it changes what you'll get out of it.

This is not "an AI built a website from scratch." The site — Flight, a fictional whole-aircraft charter company — already existed. A human made it. What Opus 5 did was:

  1. Study the existing site closely enough to extend it without breaking its visual language
  2. Generate a continuous flight film with Higgsfield and wire it into the hero
  3. Convert the page into a self-contained build that survives a strict CSP, and publish it

So this is a guide about AI-generated motion inside a real design, and the engineering around it. That's a narrower claim than "AI builds websites," and a more useful one — the hard parts here are the parts nobody warns you about.

A note on two tool names you may have seen attached to this work:

What it's often called What it actually is
"Higgsfield MCP" The Higgsfield CLI — @higgsfield/cli on npm, a higgsfield binary. Not an MCP server.
"Claude design" The artifact-design skill, a Claude Code skill that calibrates design treatment. Here it mostly said don't redesign anything — see Part 6.

And scroll-world is a Claude Code skill wrapping the Higgsfield pipeline. This project used its generation method and its seam discipline, but not its scroll-scrub engine — the hero autoplays and loops; it isn't scrubbed by scroll. Don't expect the Apple-style scroll-driven camera here.


The result

Before and after

Before After
Hero 5s static plate, looped 16.08s continuous flight film
Motion essentially none, played at 0.6× passenger boards → door seals → taxi → rotation → climb
Cuts — zero — every seam is frame-identical
Source 1280×720 1920×1080 master, 1280×720 web cut

The film opens on the exact frame the original hero opened on, then that frame starts moving. That single decision is what makes it read as an extension of the site rather than a replacement for it.

The opening frame


What you need

Higgsfield account Pro plan used here. ~72 credits per 8s 1080p clip.
higgsfield CLI npm i -g @higgsfield/cli, then higgsfield auth login (interactive OAuth)
ffmpeg / ffprobe frame extraction, concat, encode
Python 3 + Pillow the seam check and the figures
cwebp image compression for the self-contained build

Budget honestly before you start: higgsfield generate cost <model> --prompt ... prices a job without running it. This build cost 288 credits — 216 of which produced shipped footage, and 72 of which were pure waste (see What it cost).


Part 1 — Read the site before you generate anything

The instinct is to start generating. Don't. Every prompt in this build was derived from something already on the page:

  • The palette came out of the CSS, not out of taste: #0B1417, #16292D, #A8BDC3, #F4F1EA, #F5A623. Those five hexes went into every prompt verbatim.
  • The first beat of the film came from the page's own copy. The operator note reads: "doors close, the ramp falls away, and the day you were having is two hours behind you." So leg 1 is literally the door closing and the ramp folding.
  • The subject came from the existing footage — a cream-white nine-seat jet, dark swept tail, amber cabin light, wet tarmac, chain-link fence, grass berm. All of that is in the prompt so the generated aircraft matches the one in the gallery photos further down the page.

A hero film that contradicts the copy or the photography below it looks worse than no film at all.


Part 2 — Pick the camera architecture

The scroll-world skill offers two, and this is the highest-leverage decision in the whole build.

Architecture A — continuous forward take. One camera that only ever moves forward. Each leg starts from the previous leg's actual last frame. No connectors.

Architecture B — dive-in + aerial connector. A dive into each scene, then a connector that pulls up and out to the next.

B reverses camera direction at every seam. In a miniature diorama world that reads as "zoom out to the map, fly to the next island." In a grounded, photoreal walkthrough it reads as a rewind stutter.

This build is photoreal and grounded, so: architecture A, no question.

The chain

leg 1  --start-image = frame 0 of the site's existing hero-loop.mp4
leg 2  --start-image = leg 1's ACTUAL last frame   (ffmpeg -sseof -0.15)
leg 3  --start-image = leg 2's ACTUAL last frame

The phrase actual last frame is load-bearing. Not the original still, not a re-render — the real pixels ffmpeg pulls out of the rendered clip. Anything else and the seam pops.

Legs are strictly sequential. You cannot parallelize this; leg N+1 doesn't exist until leg N finishes. Budget wall-clock accordingly: 7–8 minutes per leg here.


Part 3 — Write prompts that describe the frame they're handed

This is the part that cost real money to learn.

--start-image is a strong hint, not a constraint. When your prompt describes a composition that contradicts the frame you handed in, the model follows the words and re-frames the shot. The seam breaks.

Leg 1 ended on a low, distant, tail-on view down the runway centreline. My leg 2 prompt asked for the aircraft "three-quarters from behind" with "spray lifting off behind the main gear" and "centreline lights streaming past" — a much closer, different framing. Seedance obliged, and produced a beautiful clip that did not continue the shot at all:

A broken seam

The fix is to open every chained leg by restating the composition it's being given, then describe what changes from there:

Single continuous cinematic camera move, no cuts. Begin exactly on this frame and
keep its framing: a low camera close to the wet runway surface looking straight
down the centreline from directly behind, the cream-white private jet small in the
middle distance already lined up, amber runway edge lights receding toward a low
horizon, standing water throwing back the light.

Hold that exact camera position and let the shot continue from it. The engines
spool up and the aircraft accelerates away down the runway...

[style block — identical in every leg]

Do not re-frame, do not cut to a new angle, do not change the camera's starting
position — the shot grows out of the given frame. In the final second, settle into
a slow, steady forward drift... Never pull backward, never reverse direction.

Same start image, same model, rewritten prompt:

A locked seam

Three rules that fall out of this:

  1. Establishing-shot language belongs only in leg 1. "Wide shot of…", "the camera holds it three-quarters from behind" — every one of those is an instruction to re-compose. Leg 1 has no seam to protect; every other leg does.
  2. Keep a style block byte-identical across all legs. Palette, lens, grain, subject description. It's what stops the world drifting.
  3. Pin the time of day explicitly. Leg 1's sky warmed noticeably toward dawn over its final two seconds. Adding "the light falling, not rising… do not brighten toward daylight, do not render a sunrise" to the later legs held it.

Part 4 — Verify seams numerically. Do not trust your eyes.

The single most important section of this guide.

Here is the failure mode that will get you: a job returns status: "completed", the clip looks great, the start image is confirmed attached in the job params — and the seam is still broken. You cannot see it by watching one clip, because a re-composed shot is only wrong relative to its neighbour.

Worse, it's non-deterministic. In this build, the same prompt with the same start image was run twice. One take locked at 3.96. The other scored 53.18. Identical inputs.

So measure every seam:

ffmpeg -v error -y -ss 0 -i leg2.mp4 -frames:v 1 -q:v 2 first.png
python3 - leg1_last.png first.png <<'PY'
import sys
from PIL import Image, ImageChops
a = Image.open(sys.argv[1]).convert('RGB').resize((320,180))
b = Image.open(sys.argv[2]).convert('RGB').resize((320,180))
px = list(ImageChops.difference(a,b).getdata())
m  = sum(sum(p) for p in px)/(len(px)*3)
print(f"diff={m:.2f}", "OK" if m < 8 else "SEAM POP — re-roll")
PY

Mean absolute pixel difference, downscaled to 320×180 so encoder noise doesn't dominate. Measured on this build:

Score Meaning Seen on
2.5 – 4 frame-locked, ships hero→leg1 (2.54), leg1→leg2 (3.96)
~23 visible pop leg2→leg3 (22.93) — cut from the final film
53 – 68 fully re-composed two discarded takes

Threshold: 8.

Run it before paying for the next leg. In architecture A an unverified seam means the next leg is generated from a frame you're about to throw away — you pay twice for one mistake.

Full script: pipeline/verify_seams.sh


Part 5 — Concatenate and encode

Because the seams are already frame-identical, joining the legs is a plain concat — no crossfades, no transitions:

ffmpeg -f concat -safe 0 -i concat.txt -an \
  -vf "unsharp=5:5:0.8:5:5:0.0" \
  -c:v libx264 -preset slow -crf 20 -pix_fmt yuv420p \
  -g 8 -keyint_min 8 -sc_threshold 0 -movflags +faststart \
  hero-flight.mp4

Re-encode rather than stream-copy, so all legs share one GOP structure and quality. unsharp counters the softness generative video has relative to stills. Strip audio — you're muting it anyway.

Two cuts: a 1080p master (11.6 MB) for the real site, and a 720p crf 28 web cut (1.46 MB) for the embedded build, where every byte gets base64'd at ~1.37×.

Wiring it into the page kept the existing crossfade loop rather than inventing something new — the site already had an A/B double-<video> fade, so the film completes its journey and dissolves back to the tarmac. The only change was playbackRate 0.6 → 0.85: 0.6× suited a static plate, but makes real motion look sluggish.

Rolling out


Part 6 — Publishing under a strict CSP

Published Claude artifacts run under a CSP that blocks every external host. The original page broke on two counts:

  1. Its runtime loaded React from unpkg
  2. Its fonts came from Google Fonts

So the page had to be rebuilt as a single self-contained file:

  • The component logic was rewritten as vanilla JS — nav-solidify-on-scroll, the quote calculator, the passenger stepper, the video crossfade
  • Fonts embedded as base64 woff2, latin subsets only, 5 faces → 128 KB
  • Images re-encoded to WebP: 2.3 MB of JPEG → 276 KB
  • The film inlined as a data URI, referenced once as a JS const and assigned to all three <video> elements — putting the data URI in three src attributes would triple the payload

Total: 2.85 MB, zero external requests.

Every number in the rewritten calculator was verified against the original rather than assumed:

Check Expected Got
3.3h route $8,400 × 3.3 + $1,850 $29,570 ✅
1.8h route (below 2h minimum) rebills at 2.0h $18,650 ✅
Amber prompt #F5A623 rgb(245,166,35) ✅
Green confirmation #8FD1A0 rgb(143,209,160) ✅
Passenger clamp 1–9 1–9 ✅

This is where the artifact-design skill earned its keep by telling us to do nothing: its first principle is honor what's already there — the user's own design system outranks any opinion the model has. The palette, the Darker Grotesque / Hanken Grotesk pairing, and the single committed visual world were preserved exactly. The conversion was an act of fidelity, not design.

The cabin section


Part 7 — The autoplay trap

The film worked perfectly in local testing and did not autoplay once published.

Published artifacts render inside a cross-origin iframe with allow="(none)". Chrome's Permissions Policy defaults autoplay to self, so an iframe not granted allow="autoplay" has autoplay disabled outright — being muted does not exempt it. play() rejects with NotAllowedError.

The original code — and therefore the conversion — swallowed it:

if (a) a.play().catch(function () {});   // silently does nothing, forever

Fine on a normally-hosted page. Fatal inside a restricted iframe. The fix is to try immediately and fall back to the first real user gesture:

var GESTURES = ['pointerdown', 'touchstart', 'keydown', 'click'];
function onGesture() { if (!started) startPlayback(); }
GESTURES.forEach(function (evt) {
  document.addEventListener(evt, onGesture, { capture: true, passive: true });
});
startPlayback();

scroll and pointermove do not count as user activation. Only pointerdown / touchstart / keydown / click will do.

The honest limitation: inside the artifact viewer the hero holds on its poster until the visitor clicks anywhere. That's the host's policy, not something code can route around. Self-host the same file and it autoplays normally.


What it cost

288 credits for 16 seconds of usable film. The breakdown is the useful part:

Render Credits Outcome
leg 1 — tarmac 72 ✅ shipped, locked at 2.54
leg 2 take 1 72 ❌ seam 67.89 — prompt fought the start frame
leg 2 take 2 (lost response) 72 ⚠️ billed, never delivered
leg 2 take 3 72 ✅ shipped, locked at 3.96
leg 3 — cruise 72 ❌ seam 22.93 — cut from the film

Two lessons worth more than the credits:

Error: request failed (no response received) does not mean the job failed. It means the CLI lost the response. The render completes and bills anyway. Retrying pays twice. Wait ~45s, run higgsfield generate list, and adopt the orphaned completed job:

ORPHAN=$(higgsfield generate list --size 5 | awk '$0 ~ /completed/ && /\.mp4/ {print $NF; exit}')
curl -sSL "$ORPHAN" -o leg2.mp4

Assume roughly one seam in three needs a second take. Budget (legs × 1.4) × cost and you won't get stranded mid-chain.


Gotchas, condensed

Symptom Cause Fix
Visible cut between clips Prompt contradicted the start frame — or plain bad luck Restate the start frame's composition; verify numerically; re-roll
Clip looks perfect, chain doesn't Adherence is non-deterministic Never infer a lock from status: "completed"
no response received CLI lost the reply; job still billed Adopt the orphaned job, don't retry
Same error, but persistent Local DNS can't resolve fnf-api-gw.higgsfield.ai dig +short fnf-api-gw.higgsfield.ai @8.8.8.8 vs system resolver. Apex higgsfield.ai resolving proves nothing
Sky drifts toward daylight No time-of-day lock "the light falling, not rising… do not render a sunrise"
Published page unstyled / dead CSP blocked CDN fonts + scripts Inline everything as data URIs
Video won't autoplay when embedded Iframe lacks allow="autoplay" User-gesture fallback
Blank headless screenshots loading="lazy" never fires; scrollTo doesn't move --screenshot; video won't decode under virtual time Strip lazy; shift with translateY; seek currentTime explicitly

Repo layout

README.md                this guide
images/                  every figure, generated from real build artifacts
pipeline/
  style.txt              shared style preamble — byte-identical across legs
  leg1_tarmac.txt        boarding → door seals → taxi
  leg2_rotation.txt      takeoff roll → rotation → climb
  leg3_cruise.txt        gear up → cloud → cruise  (rendered, failed seam, unused)
  run_chain.sh           sequential chain, frame handoff, orphan recovery, re-rolls
  verify_seams.sh        the numeric seam check
  encode.sh              concat + 1080p master + 720p web cut + poster
  build_publish.py       inline fonts/images/film into one self-contained file
  make_figures.py        regenerates this guide's figures from real artifacts
  make_screenshots.sh    regenerates this guide's site screenshots

The scripts expect a work/ directory beside them for intermediates, and read the starting frame from the site's existing hero clip. Reproduce the film:

higgsfield auth login
LEGS=1 bash pipeline/run_chain.sh seedance_2_0 && bash pipeline/verify_seams.sh
LEGS=2 bash pipeline/run_chain.sh seedance_2_0 && bash pipeline/verify_seams.sh
bash pipeline/encode.sh && python3 pipeline/build_publish.py

One leg at a time, verifying between each. That cadence is the method.

Nothing here is illustrative — every figure is composited from the actual rendered clips, and every number in the tables is a measurement from this build. Regenerate them with python3 pipeline/make_figures.py and bash pipeline/make_screenshots.sh.


The takeaway

The generative part was the easy part. Two of five renders produced shipped footage, and the model was cooperative when the prompt was right.

The engineering around it is where the work actually lives: chaining on real frames, measuring seams instead of trusting them, knowing that a completed job can still be wrong, knowing that a lost response still bills, and knowing that a strict CSP and an iframe autoplay policy stand between a working local file and a working published page.

Generative video gives you probabilistic output. Everything downstream has to be deterministic enough to catch it when it lies.

The gallery

Rendered by GitHub from the repository’s README. Scroll to read the full file.
First trending

Jul 28, 2026

first spotted on the list

Best rank

#42

highest position reached

Appearances

2

times on the trending list

Quality score

85

out of 100

Momentum

28

trend strength indicator

Star velocity

0.10

stars per day since creation

Activity — last 60 days

daily counts, collected every 6 hours
  • Stars
  • Forks
  • Merged PRs
  • Issues
  • Closed issues

Collecting activity data since launch — check back in a few days.

Star history

total stars per snapshot
789101112Moh4696/How-I-built-Flight-Website · Jul 28, 2 AM UTC: 8 starsMoh4696/How-I-built-Flight-Website · Jul 28, 8 AM UTC: 11 stars2:47 AM5:43 AM8:40 AM

Rank history

position on trending · lower is better
#1#42#43#44#45#46#47Jul 28, 2 AM UTC: rank #42Jul 28, 8 AM UTC: rank #472:47 AM5:43 AM8:40 AM

3D card for your website

Live HTML card with a glass surface and pointer tilt. Paste the iframe on any website.

<iframe src="https://www.notionpulse.cc/embed/Moh4696/How-I-built-Flight-Website" width="420" height="240" style="border:0;max-width:100%;background:transparent" loading="lazy" title="Moh4696/How-I-built-Flight-Website — trending on Open Source Pulse"></iframe>

Stars badge

Show current stars in your README or profile. Auto-updates every 6 hours.

Moh4696/How-I-built-Flight-Website stars badge
Markdown
[![Moh4696/How-I-built-Flight-Website](https://www.notionpulse.cc/api/badge/Moh4696/How-I-built-Flight-Website.svg)](https://www.notionpulse.cc/repo/Moh4696/How-I-built-Flight-Website)
HTML
<a href="https://www.notionpulse.cc/repo/Moh4696/How-I-built-Flight-Website"><img src="https://www.notionpulse.cc/api/badge/Moh4696/How-I-built-Flight-Website.svg" alt="Moh4696/How-I-built-Flight-Website stars badge" /></a>

Repository of the Day

#42 Repository of the Day

Repository of the Week

#42 Repository of the Week

Repository of the Month

#42 Repository of the Month