Guide · Design · ★★★☆☆
Design a landing page with Claude Code: build several versions, keep the best
One prompt gives you one landing page, and you can't tell if it's good until you see another. My home page playground has 11 variants built by Claude Code, side by side in one gallery. This is the setup.
By Arthur Hsiao · Last updated · 7 min read
The idea. Treat each design as an experiment: one folder, one brief, one verdict. Claude is quick at building variants, so the slow part becomes your judgement, which is where it should be. The playground calls them "home pages"; a landing page is the same method. See it live: the home page playground.
1Set the rules in CLAUDE.md
The playground is a separate repo with its own CLAUDE.md. The rules that make comparing possible, condensed:
- Plain HTML + CSS + vanilla JS. No framework, no build step. - Every page must work when opened directly in a browser (file://). - Tokens: use the semantic names in shared/css/design-system.css (--bg-primary, --text-primary, --primary-color ...). A variant may override token values for its own look but must not invent parallel naming schemes. - variants/NN-short-slug/ holds index.html, styles.css and notes.md (brief, what is being tested, agents used, verdict). - Promote, don't copy: when a pattern is used in two or more variants, move it into shared/css/components.css.
Plain HTML keeps each variant cheap to build and easy to throw away. Shared tokens mean two variants differ only where you meant them to. How to write your own is in CLAUDE.md best practices.
2Turn the steps into a skill
Building a variant is the same eight steps every time, so they live in a skill, .claude/skills/create_home_page/SKILL.md. Its description tells Claude when to use it:
Standard process for creating a new home page variant in this playground, from brief to gallery card. Use when the user asks to create, add, build or start a new home page / variant / page design (e.g. "make a new variant", "try a home page for X").
The steps: brief, set up the folder, design (agents), build, add the gallery card, check, notes, report. The rule between the two files: CLAUDE.md holds the conventions, the skill is the procedure, and "If the two disagree, fix the skill." More in how to write Claude Code skills.
3Split the design between three agents
Each agent lives in .claude/agents/, reads CLAUDE.md and the variant's notes.md, and returns a spec. None of them writes the page; the main session builds it.
| Agent | Returns |
|---|---|
ux-architect |
Section order, layout grid per breakpoint, interaction patterns, art slots. Also owns shared/ |
ui-designer |
Palette, type, component styling and states, as values for the shared tokens, with a contrast table |
image-prompt-engineer |
Image prompts in assets/images/NN-slug/prompts.md, keyed by filename, plus a ready-to-paste Gemini prompt |
The first two run in parallel from the brief. The image agent runs last, because it needs the art slots from one and the palette from the other. The images can then come from local ComfyUI with Claude Code, or from Gemini.
Agents are optional. Variant 05 skipped the first two because its structure copies 02, "so the comparison is purely visual". Variants 09 to 11 used none. How to write one: how to create a Claude Code agent.
4Write the brief before any code
Every variant starts with a brief in its notes.md. The real one for variant 11:
- Industry: Productivity software (gallery group). - Brand (fictional): Jollo, a friendly weekly planner for small creative teams. - Mood: Playful, bold, sticker-like. Saturated colour blocks, chunky type, springy motion. - What is tested: 1. Asymmetric split hero: oversized kinetic headline that overlaps a tilted art card. 2. Vertical scroll driving a horizontal "week" track. 3. Monthly / annual pricing toggle with live price swap. 4. Kinetic type: rotating hero word and a looping marquee.
"What is tested" is the part that matters. A variant that tests nothing can't win or lose. The brands are always fictional: the rules say "Never imitate a real company's branding."
5Compare them in one gallery
The playground's root index.html is a gallery: one card per variant with a live preview, grouped by industry, with filter chips. Seeing 06, 07 and 08 next to each other (same structure, three palettes) settles a colour question faster than any description.
The last section of each notes.md is Verdict, and the skill says "a variant with no verdict hasn't been compared". To be honest about my own: all 11 still read _Pending._. The comparison has happened in the gallery, and variant 10 (Slow Ember) is the current top pick, featured on this site's Projects page, but I haven't written the verdicts down. That's the step I'd fix first.
6Promote what wins, don't copy it
When two variants use the same piece, it moves into shared/css/components.css. The "back to gallery" pill on every variant went that way: one .back-pill style in the shared file, one link at the end of each page.
The rule also says when not to. Variants 09 and 10 both pin a scroll stage under the header, and the notes say the CSS "is four lines each, so it was left in the variants for now". Promoting four lines would add a shared rule for no gain.
7Fix what Claude got wrong
When I put the gallery under this site, I asked Claude to copy this site's header. It did, mostly, but the theme switch didn't match. My next prompt:
do 2 and 3. and make sure header is exact same as ahdevstudio. currently switch button looks different. and we need go back button on each variant or we keep the header. let me know which option is better
Claude replaced the playground's light/dark/system switch on the gallery page with a copy of this site's moon/sun button, same theme storage key, so a choice on one site applies on both. It suggested a back button over a full header, and built the pill after I said yes. Then I asked have you add this rule when creating new button need a back button. It hadn't, so it added the rule to CLAUDE.md and to the skill. A fix that isn't written into the rules comes back in the next variant.
Serve it under your own domain
The playground is its own Cloudflare Pages project. This site's Worker forwards /projects/home-page-playground/ to it, so it looks like part of the site. In worker/index.js:
const PAGES_PROJECTS = ['home-page-playground'];
and wrangler.jsonc sends those paths to the Worker first:
"run_worker_first": ["/projects/home-page-playground", "/projects/home-page-playground/*"]
The Worker fetches the page from home-page-playground.pages.dev and rewrites links so they stay under the prefix. The deploy setup itself is in deploy Angular to Cloudflare with Claude Code.
When a variant wins, the motion is often what sells it. Adding that to a real site without breaking the build: GSAP ScrollTrigger in Angular. New to Claude Code? Start with Claude Code for beginners.