Blog

Claude Code for web design: a workflow and a CLAUDE.md design skill

A practical workflow for designing websites with Claude Code: a CLAUDE.md with your design rules, a reusable design skill, section-by-section prompts and the checks that catch generic output.

A glass terminal window with abstract code lines linked by a coral light beam to a finished website mockup on a blueprint grid
Claude Code turns a written design brief into a real, measured layout when the brief is specific.

Why Claude Code output looks generic, and what fixes it

Ask Claude Code for "a landing page for my app" and you get a competent page: a centred headline, three feature cards, a gradient, a footer. It is generic because the request left every design decision open, so the model fills them with the most common answer.

The fix is not a longer adjective list. It is moving decisions out of your head and into files Claude reads every time: a CLAUDE.md with the rules that never change, a design skill with the rules for a kind of page, and a prompt for the page in front of you. This post walks through each, with files you can copy. We use the same setup to build the BuildMotions templates, so the examples come from real builds.

Step 1: put the permanent rules in CLAUDE.md

Claude Code reads CLAUDE.md from your project root at the start of every session. Run /init once to create it, then replace the generated design notes with rules that are true for the whole site. Keep it short: a rule Claude follows on every page is worth more than a paragraph it skims.

The rules that matter most for design are tokens (colours, type scale, spacing), the motion budget, and what "done" means. Here is the design part of the CLAUDE.md we start from:

CLAUDE.md (design section)
## Design rules (apply to every page)
- Tokens live in app/globals.css as CSS variables. Never hard-code a colour or font size in a component.
- Type: one display face (Bricolage Grotesque), one text face (Geist). Scale: 14 / 16 / 20 / 28 / 40 / 66 px.
- Spacing: multiples of 4 px. Sections get 96 px vertical padding on desktop, 56 px on mobile.
- Motion: animate transform and opacity only. Entrances 400–600 ms, ease-out. Nothing loops near text.
- Every animation has a prefers-reduced-motion fallback that shows the final state.
- Images: next/image with width and height. Only the first visible image loads eagerly.

## Definition of done
- Builds with no TypeScript or console errors.
- Keyboard: every control reachable, visible focus ring.
- Checked at 390 px and 1440 px wide, and with reduced motion on.

Step 2: write a design skill for the kind of page you build often

CLAUDE.md holds rules for everything. A skill holds rules for one job, and Claude Code loads it only when the job comes up. Skills live in .claude/skills/<name>/SKILL.md, with a short description at the top that tells Claude when to use it.

We keep one skill per page type. A landing page skill, for example, fixes the section order, how the hero behaves, and the copy rules, so every landing page starts from a considered structure instead of the default one:

.claude/skills/landing-page/SKILL.md
---
name: landing-page
description: Use when building or rebuilding a marketing landing page. Sets section order, hero motion and copy rules.
---
# Landing page skill

## Section order
1. Hero: headline (max 8 words), one-sentence subhead, primary + secondary call to action, one visual.
2. Proof: 3–5 customer logos or one strong number.
3. Three sections, each making one point, alternating text and visual sides.
4. Pricing or a single call to action, then FAQ (4–6 questions), then footer.

## Hero motion
- Headline enters word by word: 60 ms stagger, 500 ms, ease-out, translateY 12px → 0.
- The visual fades in 200 ms after the headline starts. No parallax on mobile.

## Copy
- Write for the product in the brief. No lorem ipsum, no "revolutionary", no "seamless".
- Every claim needs a concrete detail (a number, a name, a feature).

Step 3: plan before Claude writes code

Large pages go wrong when Claude starts writing components before the structure is agreed. Switch to plan mode (Shift+Tab in Claude Code) and ask for a file plan first: the components, the data file, the CSS module, and the order it will build them in. Read the plan, correct it, then let it build.

For a long, cinematic page, build one section per turn. A template like ORREN Energy has a scroll-controlled film and several interactive chapters; asking for all of it at once gets you a shortened version of each part. Asking for the hero, checking it, then moving to the next chapter gets you the real thing.

The Nectra template page on BuildMotions with its live preview and Download source code button
Start from a finished design when you can: every template has a live preview to compare against.

Step 4: give Claude a prompt with numbers, not adjectives

"Make the hero feel premium" leaves the decision to the model. "Headline enters word by word with a 60 ms stagger" does not. The difference between a generic result and a designed one is almost always the number of decisions the prompt makes.

A good section prompt names the layout, the content, the motion with timings and easing, the states, and the checks. This is the shape we use for the hero of a product page:

Section prompt for Claude Code
Build the hero in components/hero.tsx with hero.module.css.
Layout: two columns from 1024px (copy left, product film right), one column below.
Content: headline "Plan launches your whole team can see", subhead from data.ts,
primary button "Start free", secondary link "Watch the 2-minute tour".
Motion: headline words enter with a 60ms stagger (500ms, ease-out, y 12px -> 0).
The film is muted, plays inline only when 50% visible, and shows its poster first.
Reduced motion: no stagger, poster instead of film.
Done when: no layout shift on load (poster has width and height), keyboard focus is
visible on both buttons, and it looks intentional at 390px wide.
A BuildMotions prompt page showing the structure of a template prompt
Template prompts follow the same shape: goal, layout, motion, content and checks.

Step 5: keep motion code small and reversible

Claude Code tends to reach for a library for every effect. For most entrances you do not need one: a small hook with IntersectionObserver and two CSS classes covers it, works without JavaScript enabled on the server render, and respects reduced motion for free. Ask for this pattern explicitly in your skill so Claude reuses it:

components/reveal.tsx
'use client';
import { useEffect, useRef, useState, type ReactNode } from 'react';
import s from './reveal.module.css';

/** Adds .visible once the element is 20% in view. CSS does the animation. */
export function Reveal({ children, delay = 0 }: { children: ReactNode; delay?: number }) {
  const ref = useRef<HTMLDivElement>(null);
  const [visible, setVisible] = useState(false);
  useEffect(() => {
    const node = ref.current;
    if (!node) return;
    const observer = new IntersectionObserver(([entry]) => {
      if (entry.isIntersecting) { setVisible(true); observer.disconnect(); }
    }, { threshold: 0.2 });
    observer.observe(node);
    return () => observer.disconnect();
  }, []);
  return (
    <div ref={ref} className={`${s.reveal} ${visible ? s.visible : ''}`} style={{ transitionDelay: `${delay}ms` }}>
      {children}
    </div>
  );
}

Step 6: make Claude check its own work

Claude Code can run your dev server and read the output, so end every prompt with checks it must run, and ask it to report anything it could not verify. The checks that catch the most problems on motion-heavy pages are short:

  • Run the build and fix every TypeScript error and console warning.
  • Open the page at 390 px and 1440 px and describe what changes between them.
  • Turn on reduced motion and confirm nothing moves and nothing is hidden.
  • Tab through the page and list any control without a visible focus style.
  • Check that the largest image has width and height and is the only eager image.

Review against a reference, not against your memory

After each section, compare the result with something concrete: a screenshot of the design, a live site you are matching, or a template preview open in the next tab. Reviewing from memory is how spacing drifts, type sizes creep and motion ends up faster than intended.

Tell Claude exactly what differs, in the same units the prompt used. "The headline is 56 px but should be 66 px at 1440 wide" fixes the problem in one turn. "Make the headline bigger" usually takes three, and the second attempt often changes something you liked. If you work from a BuildMotions template, the live preview shows the device sizes side by side, which makes this comparison quick.

Keep a short log of what you corrected. If the same correction comes up twice, it belongs in CLAUDE.md or the skill, not in the next prompt. Over a few pages the corrections shrink to nothing, because the files now hold every decision you used to repeat.

Mistakes that make Claude Code designs look generic

Most weak results come from a handful of habits, and each one has a direct fix:

  • Describing a mood instead of decisions. Replace "clean and modern" with a type scale, a spacing unit and two colours.
  • Letting Claude choose the fonts. It will pick Inter. Name the display and text faces in CLAUDE.md.
  • Asking for a whole site in one prompt. Long pages get compressed; build section by section.
  • Adding motion everywhere. Pick two moments that deserve it (usually the hero and one feature) and keep the rest still.
  • Skipping real copy. Placeholder text hides layout problems that real headlines expose immediately.
  • Never checking mobile. Ask for the 390 px check in every prompt, not once at the end.

Step 7: start from a finished design when you can

Writing the CLAUDE.md, the skill and the prompt yourself works, and the free motion prompt generator gives you the structure in a minute. But the fastest route to a designed page is to start from one that is already designed and tested, then change the content.

That is what the BuildMotions library is for. Each template, from the botanical Nectra studio site to the Aurel Bay travel site and the playful Loopkin app journey, comes with a Claude variant of its prompt, a live preview to compare against and the source code as a runnable Next.js project. The Claude Code templates page explains the setup, and plans start at $9 a month.

The free BuildMotions motion prompt generator with type, style, motion and tool options
The free prompt generator builds the goal, layout, motion and checks structure for you.

Questions

Does Claude Code read CLAUDE.md automatically?
Yes. Claude Code loads CLAUDE.md from the project root at the start of each session, so rules you put there apply to every request in that project.
What is a Claude Code skill?
A folder in .claude/skills with a SKILL.md file. The description at the top tells Claude when the skill applies, and Claude loads the instructions only for that kind of task.
Should the design rules go in CLAUDE.md or a skill?
Rules that are true for every page (tokens, motion budget, definition of done) go in CLAUDE.md. Rules for one kind of page, such as a landing page or a pricing page, go in a skill.
Can I use BuildMotions templates with Claude Code?
Yes. Every template has a Claude variant of its prompt, and Pro members can download the source code to customise with Claude Code. See the Claude Code templates page.

Ready to build? Browse the template library, copy a prompt, or compare the plans.