Most hero sections are looked at for two seconds and scrolled past. You can put a looping video behind the headline, but a video is the same for everyone and nobody can do anything to it. We wanted a first screen that visitors play with, one that answers a hand, and that still loads fast, reads well and degrades cleanly when WebGL or the network is missing.
This tutorial walks through the agent skill we built for that: Washing Line Hero.
What the visitor gets
The hero is a normal first screen: the brand bar and navigation on top, a large headline with one coloured phrase, a line of introduction, one or two buttons and a small note. Beside them a washing line is strung across an open sky with drifting clouds. On the line hangs a cotton cloth held by wooden pegs, and the cloth carries your poster.
It is meant to be touched:
- Hover, and a fingertip dents the cloth.
- Press and drag, and the cloth follows your hand. Pull a corner up, fold it over the line, stretch it toward you.
- Let go, and it falls, swings back and settles.
- On a phone a finger does the same, and the page does not scroll while the cloth is held.
This is a real cloth simulation, not a video. The cloth is a grid of particles held together by stretch, shear and bend constraints, stepped at a fixed 120 Hz. Because it is simulated, it behaves like fabric wherever it is grabbed instead of replaying a canned animation.
What it does not do
Better to know the limits up front. The cloth does not tear, tangle with itself or blow off the line. It has no self-collision, so if you fold it hard through itself it passes through and falls back. The print is drawn by the page from your words; you cannot upload a photo to print on it.
What you need
- Node.js 18 or newer. Nothing to install.
- Chrome, Chromium or Edge for the checks and the recording. The scripts find it, and you can set
CHROME_PATHif they do not. - ffmpeg for the video, or set
FFMPEG_PATH. - Internet access when the page is opened. three.js and the fonts load from jsDelivr at pinned versions with integrity hashes. Without it, visitors see a still picture of the same line and cloth, drawn flat, plus system fonts. The page still works.
Install the skill
It is one of our 38 free skills, MIT licensed. With the skills CLI:
npx skills add lookbkdev/lookbk-skills --skill washing-line-hero
Or as a Claude Code plugin:
/plugin marketplace add lookbkdev/lookbk-skills
/plugin install washing-line-hero@lookbk-skills
The source is at github.com/lookbkdev/lookbk-skills.
Step 1: give the agent the brand and the words
The agent asks for, or finds on your current site, the following:
- A name, and a logo as a plain SVG file. Without one, up to three letters make a monogram.
- A background colour, which is also the sky at the horizon, and one accent. A light blue gives a midday sky with dark text. A deep navy or plum gives a dusk sky with light text and a low warm sun.
- A display face for the headline and the big words on the cloth, and one for everything else.
- The page copy: a headline with the phrase to colour, a short introduction, one or two buttons, up to five navigation links.
- The cloth copy: a name to print at the top, one small line, two to four big words, up to six short spec pairs, a caption for the chart and a web address for the corner.
One rule matters here. Every name, number, claim and date must come from you. The agent does not invent specs; it leaves one out instead. The bars in the little chart are decoration drawn from a seed, not data, so the caption should not claim numbers.
Step 2: hero.json
Everything lives in one file. The skill ships two complete examples to copy from, examples/paperwind/ (a notes app, midday sky, four pegs) and examples/halden/ (a linen brand, dusk sky, three pegs). A trimmed sketch of the shape:
{
"brand": { "name": "Paperwind", "logo": "logo.svg" },
"hero": {
"title": "Notes that\n*travel light*",
"lede": "A notes app for people who write on the move.",
"actions": [{ "label": "Get started", "href": "/start" }],
"align": "left"
},
"theme": {
"background": "#cfe3f7",
"ink": "#14202e",
"accent": "#c2410c",
"fonts": { "display": "Space Grotesk", "body": "Inter", "weight": 500 }
},
"effect": {
"printTitle": "Paperwind",
"printHeadline": "Light\nwords",
"printFoot": "paperwind.example",
"light": "day",
"pegs": 4,
"breeze": 0.45,
"poke": 1,
"drag": true
}
}
The names above are made up for illustration. A few settings are worth knowing:
-
lightisdayfor midday sun from above orduskfor a low warm sun and a cool sky light. It follows the theme mode if you leave it out. -
pegsruns from 2 to 6, andaspectsets the cloth's width over its height. -
breezecontrols how hard the wind lifts the cloth.pokecontrols the dent under the pointer, and 0 turns it off while dragging still works. -
sizesets how much of the space beside the copy the cloth fills. It leaves room on purpose so the cloth can be pulled. -
hintis a small caption in the far bottom corner on wide screens that tells visitors they can touch it.
Two limits to respect: the headline and the big words on the cloth should say different things, and the cloth should carry few, large words. It reads like a poster, not a data sheet. Two or three spec pairs read better than six.
Step 3: build
node <skill>/scripts/build.mjs hero.json out
The build lists every problem in hero.json at once: missing fields, text over its limit, a setting out of range, colours that do not contrast, print ink too faint on the cloth. It writes nothing until they are fixed. Text colour must reach 7:1 on the background, and the print ink must reach 7:1 on the cloth. If your accent is too light for the headline, the build darkens it so the text reads at 4.5:1 and tells you.
When it passes, you get out/index.html, a whole page in one file, and out/embed.html, the same section to paste into a site you already have. You also get out/assets/logo.svg for the tab icon.
Step 4: check at four widths
node <skill>/scripts/check.mjs out/index.html
This loads the page at 390, 768, 1024 and 1440 px and must say ok at each. It looks for anything wider than the screen or cut off, readable contrast for every line of text against the sky behind it, names on every link and button, and exactly one h1. Lines marked with a dot are worth a look but do not fail the check.
Step 5: look at it, then touch it
node <skill>/scripts/record.mjs out/index.html --still 1.6 --size 1440x900
node <skill>/scripts/record.mjs out/index.html --still 3.5 --size 1440x900
node <skill>/scripts/record.mjs out/index.html --still 1.6 --size 390x844 --scale 2
node <skill>/scripts/screenshot.mjs out/index.html
The first frame is the cloth at rest. The second is mid-pull, with the scripted hand holding a corner up. The third is the phone. Ask yourself whether the whole cloth is on screen with room around it, whether the print reads, and whether the pegs sit on the line.
screenshot.mjs runs Chrome without a GPU, so it shows the still picture that visitors get when WebGL or the network fails. It lands in out/screens/. Check that this version reads too, because some visitors will only ever see it.
Then open out/index.html in a browser and play: hover, press, pull a corner over the line, let go. On a phone, drag the cloth with a finger and confirm that the page still scrolls when you swipe beside it.
Step 6: record the video
node <skill>/scripts/record.mjs out/index.html --seconds 10
This steps the hero through 10 seconds at 30 fps at 1920x1080 and writes out/preview.mp4 and out/poster.png, the frame at 3.5 seconds. In the clip a drawn pointer grabs the lower corner at 2.2 s, pulls it up toward you and lets go at 4.4 s. From 6 s it runs a fingertip across the cloth. So the video shows what visitors can do, not just what the cloth looks like.
The recording is frame-perfect because the simulation runs at a fixed step from a settled start. Frames are the same on any machine, as long as the recording starts from 0, which it always does. Options include --size 1080x1350 for portrait, --size 1080x1920, --fps 60 and --poster 1.6.
Step 7: put it live
As a page, upload out/index.html and out/assets/ to any static host. Use out/poster.png, or a 1200x630 crop of it, as meta.image.
Into an existing site, paste out/embed.html where the hero goes. Everything is scoped under #mh-washing-line. If the site already has a <script type="importmap">, merge the embed's imports and integrity entries into it. The section is the full viewport high, so set --mh-height on it, for example style="--mh-height:760px", for less. In React or other frameworks, put the markup in the component and the script tags in the page, or render it in an iframe.
To change the print later, edit hero.json and build again.
When something looks off
- The cloth is cut off at the edge: lower
size, or make the cloth squarer withaspectnearer 1. - The big words on the cloth are small: they shrink to fit beside the spec column. Use fewer words, a
\n, or fewer specs and no chart. - The cloth will not settle or flaps too much: lower
breeze. - The recorder says the effect did not start: the page fell back to its still picture, so Chrome could not load three.js from jsDelivr or has no WebGL.
- Visitors see a still cloth: WebGL is off or the CDN is blocked, or they asked for reduced motion. That last case shows one frame of the live cloth at rest. This is by design.
- On a phone the page does not scroll: it only stops while a finger holds the cloth. Swipe beside it, and lower
sizeif the cloth fills the screen.
Why we built it this way
A touchable hero only earns its place if it survives the real world. So the fallback is a flat picture of the same scene, reduced motion gets a single resting frame, the checks run at four widths, and the video is generated from the same page rather than from a separate render. The playful part is the cloth. The rest is plumbing that keeps it honest.
You can try the skill, see the examples and read the full settings on its page at Lookbk.
This post was drafted with AI assistance and checked against the skill's SKILL.md.
Top comments (0)