WorkCase study

Product, founder · Live · 2026

Dusklayer

A library of animated web pages sold as prompts you paste into Claude Code, Cursor or v0.

The Dusklayer homepage: the headline Cinematic web pages you rebuild from one prompt on a black background, next to a preview of a layer showing a carved stone vessel lit from above.
dusklayer.com
Role
I'm the founder. I built the library, the prompt format, the scoring pipeline, accounts and plans, and the site.
Team
Founder
Stack
TypeScript, WebGL, Three.js, Netlify
Status
Live, 2026

Problem

Dusklayer is a library of web pages with real motion in them: scenes, sections, gradients, product films and full templates. Each one is sold as a prompt. You paste it into Claude Code, Cursor or v0 and it rebuilds the page in your own stack.

That only works if the prompt is complete on its own. So the question I had to answer was whether a model with just the prompt can rebuild the page, and how close it gets.

  • Each prompt has to include everything: the DOM, the design tokens, every number in the motion, any shaders, the runtime API, the responsive rules and a checklist. That comes out to 30 to 45 KB of text per layer.
  • The pages are motion heavy but still need to be fast on a mid range phone, and each one needs a reduced motion version.
  • The score has to be shown per layer and per version, including when it hasn't been measured yet.

What I built

I'm the founder and I built the product, the library and the site.

  • The library: 22 layers. Ten scenes, four sections, two gradients, three product films and three templates.
  • Looks: every layer comes with nine named looks. A look is just a set of parameter values, so switching looks doesn't change the page structure.
  • A runtime API that every layer shares. The library preview uses it to recolor a page live.
  • The scoring pipeline behind the Fidelity Score.
  • Performance numbers for every layer: mobile Lighthouse scores and file weight.
  • Accounts, three plans, and a connector for coding agents that's in testing.

How the Fidelity Score works

  1. PromptOne text file, 30 to 45 KB
  2. Blind rebuildA fresh model that hasn't seen the original
  3. CaptureSame timing, pointer path and scroll. 5 frames on desktop, 5 on a phone
  4. Compare80% structural similarity, 20% color palette
  5. Score85 or higher counts as measured

A fresh model gets the prompt and nothing else, and builds the layer. Then both pages are captured with the same clock, pointer path and scroll positions, which gives ten pairs of frames. Each pair is compared with structural similarity on grayscale frames, and the five dominant colors of each page are compared as a palette. The score is 80% similarity and 20% palette.

I went with a blind rebuild because that's what a buyer actually does. Structure counts for more than color because a page that moves right in a slightly different shade is closer than one with the right colors that doesn't move.

A score only applies to the version it was measured on. When a layer changes, its page says In review until it's measured again.

Looks are parameter sets so that there's one prompt per layer. If each look were its own page, I'd have nine prompts per layer to keep in sync.

The runtime API

Every layer exposes window.DUSKLAYER with params, set(values), pause(), resume() and a ready promise. Inside an iframe it also listens for messages from the host page and reports when it's ready and how fast it's running:

postMessage protocol// host to layer
{ source: 'dusklayer-host', type: 'set', values: { accent: '#F2B98A' } }
{ source: 'dusklayer-host', type: 'pause' }
{ source: 'dusklayer-host', type: 'resume' }

// layer to host
{ source: 'dusklayer', type: 'ready', params }
{ source: 'dusklayer', type: 'fps', value: 58 }

Product films are the one case where a single text file isn't enough. The prompt builds the page and the player, but the film itself is a folder of frames (4 to 8 MB) that text can't carry. Those frames load after first paint, and only for the screen size in use.

The Dusklayer docs page at the Fidelity Score section, with the performance table starting below it.
The scoring method is written up in the docs.

Performance

Each layer lists its mobile Lighthouse scores, measured with Lighthouse 13 on a simulated mid range phone over slow 4G. Here's where the 22 layers stand:

MeasureAcross 22 layers
Mobile performance100 on 20 layers, 99 on two product films
Accessibility100 on all 22
Weight (scenes, sections, gradients, templates)41 KB to 132 KB
Weight (product films)3.8 MB to 7.8 MB
Fidelity ScoreIn review on all 22. Two had version 1 scores of 93 and 99.

From the table in the Dusklayer docs. Weight is the layer's own files, without fonts or CDN libraries.

Limits

The product is live with accounts and three plans. The scoring pipeline is built and documented, but right now every layer reads In review, because the layers changed after they were first measured. Two of them had scores on their first version.

  • Until a layer's current version scores 85 or higher, it's listed as a preview release.
  • A rebuild depends on the model doing it, so a score is for one model on one day.
  • Product films can't be rebuilt from text alone. The footage comes with the source files on the top plan.
  • The connector for coding agents is still in testing.

What's next

Finish measuring the current version of every layer. After that I want to score each prompt against more than one model and show the range.