Blog

Designing with AI: blank prompt or live site references

Board of six reference cards, one linked to a larger layout card

Ask a coding agent to "design this page" without a reference and you usually get the same page back: a centered hero, a gradient headline, three feature cards underneath. I saw that pattern often enough that I wrote an open source skill called ui-deck. Before the agent designs anything, it finds real, shipped sites in seven galleries, measures them, and puts three distinct directions side by side in one deck. This post compares the two approaches on the same criteria, and it takes a side: in interface work, the reference step should not be skipped. It has a cost, though, and I list that below too.

What an agent falls back on without references

With no reference, the agent only has adjectives to work with: "modern", "clean", "premium". Adjectives carry no measurements, so the model drifts back to the average it has seen most. I wrote the symptoms of that average into ui-deck's direction rules:

  • A centered hero with a gradient headline and three feature cards below
  • Purple or blue-violet gradients, cream with a serif and rust, black with neon
  • Grids of identical bordered cards as the main layout
  • Tracked-capital eyebrow labels above every heading, sections numbered 01/02/03
  • Emoji as icons, decorative blobs, glass panels with no reason

I hit the same problem in the first interface prototype of my own editor, ideagent. I had built a design system and the components were consistent. The screen still looked flat, because building a design system is not the same as designing. Since then every interface job of mine starts with references from the web. ui-deck is that rule turned into code.

Two approaches, six criteria

I am writing the comparison criterion by criterion rather than as a table. Each item gives the blank prompt first, then the ui-deck flow.

  • Starting point: A blank prompt starts from one sentence. ui-deck starts from a brief of under 30 lines: the screen's mode (persuade, operate, read, showcase), what the visitor wants at that moment, the one primary action, and a search plan of 2 or 3 queries.
  • Measurements: With a blank prompt, type sizes, spacing and radius come from the model's defaults. In ui-deck every reference is measured from the live site's computed styles: type scale, families, colours by area, radius, shadows, spacing rhythm, motion durations and easing, container width.
  • Variety: Ask a blank prompt for three options and you tend to get one layout in three colours. In ui-deck each direction must rest on a different main reference and differ in typography, palette strategy, density and layout skeleton; a colour change alone does not count.
  • Decision: With a blank prompt you decide in words: "make it a bit more airy". In ui-deck you decide with your eyes. The deck shows the references and the three directions side by side at 1440 and 390 pixels wide, and you pick one.
  • Contract: After a blank prompt, the only record of the choice is the chat history. In ui-deck the chosen direction is written into a contract of about 200 words: palette, type scale, spacing rhythm, radius, motion, layout skeleton, signature element, material. Any field left blank gets filled with defaults during the build, so none is left blank.
  • Cost: A blank prompt takes seconds and needs no setup. ui-deck needs Node 18 or newer, Playwright and Chromium, and scanning galleries, capturing sites and coding three directions takes far longer than one prompt.

That last item is the blank prompt's one real advantage. If you are making a small change inside an existing design system, a reference round is wasted effort. For a new page or a redesign, those few saved seconds tend to cost days later, when the result comes back as "not quite right".

Where references come from: seven galleries

ui-deck takes references from seven galleries only: Land-book, Lapa Ninja, Landingfolio, SaaS Landing Page, One Page Love, Recent (Godly) and Awwwards. A gallery is a door; the actual reference is the live site behind it, captured today. If the user brings a reference screen of their own, it leads and the galleries fill the gaps.

I measured how each gallery behaves under automation on 30 November 2026 and wrote it into the skill:

  • Awwwards: Returns 403 to automated browsers. The scanner never opens it; it hands the agent a web search instead and takes the live site from the result.
  • Land-book and Lapa Ninja: Both sit behind Cloudflare. After a search page, further pages in the same browser session get stuck on a bot check that never clears, so each detail page opens in a fresh session. Repeated runs in a short time get a 403 from Land-book for a while.
  • Lapa Ninja search: Results come from a search API over POST, so the page has to run its scripts.
  • Landingfolio and Recent: No text search. Landingfolio is used for page-type patterns, Recent for new, high-craft sites.
  • Recent and One Page Love: The feeds mix in concept shots and templates for sale. An entry with no live site cannot become a direction; at most it inspires a micro-interaction.

One rule is about manners: the scanner runs at its default pace, never loops, never logs in and never works around a block. If a bot check does not clear by itself, that gallery is skipped for the run.

Measuring a live site at 1440 and 390 pixels

The shortlist holds 6 to 9 live sites, from at least four different galleries. capture.mjs opens each one at 1440 pixels for desktop and 390 for mobile, takes first-screen and full-page screenshots, and writes a tokens.md from the computed styles. What goes into the notes is a measurement, not an adjective; the skill's example format reads like "h1 76px / 500 / -3.4 tracking" or "80px between sections". The list is then cut to 3 to 6 references.

What gets measured is proportion, rhythm and structure. Logos, brand colours, custom typefaces, copy and imagery stay with their owners. During capture the site is opened read-only: POST, PUT, PATCH and DELETE requests are aborted, WebSockets are closed and service workers are blocked. Cookie layers are hidden for the screenshot, never accepted. Measuring a reference never sends anything to its newsletter form or analytics beacon.

Before the three directions are built, the screen is built once in greys only: content order, sizes, one filled button, one empty or error state. Squint at it: if the strongest element is not the primary action, the structure is wrong and colour will not fix it. Each direction gets a signature element and a material (real product screenshots, photography, illustration, a distinctive type family). A fake invoice or phone frame drawn in CSS does not count as material.

Closing a screenshot tool off from the local network

Any tool that takes an address and opens it in a browser is exposed to the class of bug called SSRF: a crafted address or redirect can send the browser into the machine's local network. That is why two fix commits followed ui-deck 0.1.0 almost immediately.

The first (49b90be) refused private, loopback, link-local and metadata addresses. Names ending in localhost, .local or .internal are turned away outright; other names are resolved through DNS and every address returned must be public. To measure a local site, you say so explicitly with the --allow-private flag. The same commit closed the deck side: deck.mjs accepts an image only if it sits inside the deck folder after symlinks are resolved, and it checks the file's first bytes. A file named .png that does not start like a PNG stays out of the page.

The second commit (81a68d0) closed two gaps. One was IPv4-mapped IPv6: ::ffff:10.0.0.1 and its hex form ::ffff:a00:1 reach the same private address, and both are now checked as IPv4. The other was the page's own requests. Every request the page makes is now checked, once per host. Because Playwright does not route redirect hops through the route handler, the final address of the page and of every frame is checked again after loading.

Two weaknesses remain open, and I am not hiding them. Redirect hops are only checked through their final address. DNS rebinding is also possible, because the check and the connection happen at different moments. The lasting fix is to run Chromium through a local proxy that filters addresses, or to pin it to the verified IP with --host-resolver-rules. Both are on the backlog. Until then the tool runs on a local development machine with addresses you choose; if you plan to turn it into a service that accepts addresses from outside, close those two gaps first. The OWASP page is a good primer on SSRF, and the Playwright network docs cover what request interception can and cannot see.

Which one to choose, and when

For a new page, a landing page or a redesign, choose the reference-first flow. A blank prompt gives you a page; a reference-first flow gives you a choice. The difference is whether your three directions are the same screen in three colours. For small jobs inside an existing design system, such as adding a field or moving a button, skip the reference round; the contract already exists there.

In Claude Code, setup is two lines: /plugin marketplace add denizbarish/ui-deck and /plugin install ui-deck@ui-deck. For Codex, Cursor and Gemini CLI, npx skills add denizbarish/ui-deck is enough. Small teams run the galleries; if ui-deck helps you, visit them and support the ones with a paid plan.

I wrote about the desktop-app version of the same redirect problem in my ideagent development notes. My other open source work is on the projects page, and more posts are on the blog.

AIUXClaude Code