Web Design: Build Pages and UI That Look Designed, Not Generated
Build pages and UI that look designed, not generated. Read the project's DESIGN.md first (write one from the real code if it is missing), look at two real examples for each section, pull parts from free shadcn-compatible libraries, keep to the rules that break phones, add Lenis smooth scroll to marketing pages, then check at phone and desktop width.
Editor's Note
Write `DESIGN.md` from the real code, not from taste. Use `npx @google/design.md lint DESIGN.md` to check it. Use `npx @google/design.md export --format css-tailwind DESIGN.md` to export it when needed. Read every part before adding it to the project, and replace its colors and radii with the `DESIGN.md` tokens.
When to Use It
- Building or restyling a landing page
- Creating marketing sites, hero sections, pricing pages, or dashboards
- Adding motion design to any UI component that moves
SKILL.md
SkillsHunter provides this listing for informational purposes only. Review the skill’s source, license, and required permissions before use. You are responsible for deciding whether to install or run it. Terms of Use
Web design: designed, not generated
An agent is not bad at design. It has just never seen the project's design, and it has never looked at good examples before it starts. This skill fixes both, in this order:
- Read
DESIGN.md. No file? Write one first (below). Never invent a color, a font or a radius. - Look before you build. Two real examples for each section you build.
resources.mdsays where. - Pull parts, don't draw them. Free libraries that install into a shadcn project in one command.
- Keep the phone rules. They are short, and each one was paid for on a live site.
- Add smooth scroll to marketing pages. Lenis, set up the one way below.
- Check it at two widths. Look at 375 px and 1440 px, light and dark, before you call it done.
1. DESIGN.md: one file the builder and the designer both read
DESIGN.md is an open format from Google Labs (Apache-2.0, still alpha). It sits in the
project root next to README.md. Exact values go in YAML front matter: name, colors,
typography, rounded, spacing, components. The reasons go in Markdown sections, in this
order: Overview, Colors, Typography, Layout, Elevation & Depth, Shapes, Components, Do's and
Don'ts. You can leave a section out. A section must not appear twice.
- Write it from the code, never from taste. Read the real tokens: the CSS variables, the Tailwind theme, the button and card source files. Write down what the code does today. Put a wish in Do's and Don'ts, labelled as a wish.
- Name the source of each value (file and variable) in the Colors section. Then the next agent can check it.
- Check it:
npx @google/design.md lint DESIGN.md. An error makes the exit code 1. - Export it when a tool needs it:
npx @google/design.md export --format css-tailwind DESIGN.md. - Client or white-label work: each brand gets its own
DESIGN.md. A shared component reads the brand from the project's tenant or theme data. It never hardcodes a brand name or color. - Motion has no key in the format yet. Put the motion numbers in the Components section as a
short table.
motion-designsays which numbers.
DESIGN.template.md in this folder is a starting file. Delete every value you did not measure.
2. Look before you build
Before you build a section, open two strong examples of that same section. Write down three
things each one does: the spacing rhythm, the type scale, and one detail you would not have
thought of. Then build to the project's DESIGN.md, not to the example.
- Look only. Never copy a layout pixel for pixel. Never lift a site's images, copy or logo.
resources.mdlists where to look for each job: heroes, pricing, navigation, footers, forms, mobile patterns and whole sites.- Screenshots on gallery sites belong to the sites they show. Use them to learn, not as assets.
3. Pull parts, don't draw them
Most good animated parts already exist as free shadcn registry items. The shadcn command
line knows these libraries by name, so they need no setup:
npx shadcn@latest search @magicui -q marquee # find
npx shadcn@latest view @magicui/marquee # read the code before it lands
npx shadcn@latest add @magicui/marquee # copy it into the project
Named registries checked on 2026-10-11: @magicui, @aceternity, @motion-primitives,
@smoothui, @shadcnblocks, and also @animate-ui, @cult-ui, @kokonutui, @reui,
@kibo-ui, @eldoraui. resources.md gives the licence and price of each.
- Read every part before you add it. Replace its colors and radii with the
DESIGN.mdtokens. Remove anyfilter: blur()glow (see rule 1 below). Check what it adds to the bundle. - Use one animation library. If the project already uses Motion (formerly framer-motion; import from
motion/react), choose parts built on Motion. Do not add GSAP or anime.js beside it for one effect. - Paid blocks (most of shadcnblocks, Aceternity Pro, 21st.dev past two copies a day) need the project owner's yes and a licence that covers client work. Never resell a part as part of a kit.
- An MCP connection is optional:
npx shadcn@latest mcp init --client claudelets the agent search these registries from chat. The command line does the same job with no setup.
4. The phone rules
Each rule below broke a live site before it became a rule.
- No big
filter: blur()orbackdrop-filterglows. iPhone Safari has a small graphics budget. It drops large blurred layers and paints them again while you scroll, so whole sections flash black. Desktop browsers and Chrome DevTools cannot show the bug. Use aradial-gradientto get the same soft glow. - No three.js or shader hero on a shared layout. One 3D library in a shared chunk once put about 1.26 MB on every marketing page. If one page truly needs 3D, load it lazily on that page.
- Glass and refraction effects need a real iPhone test before they ship. They use the same kind of layers as rule 1.
- Never hide the main headline behind an animation. Text that starts at
opacity: 0and waits for JavaScript makes the page slow to show and slow to score. Animate in the second line, not the first. - Respect
prefers-reduced-motion. Use fades instead of moves, and stop the loops. - No horizontal scroll at 375 px. Wide marquees and three-column grids are the usual cause.
5. Smooth scroll: Lenis, set up once
Smooth wheel scrolling is a big part of what makes a marketing page feel finished. Use Lenis
(npm i lenis, about 5 KB gzip, MIT). One smooth-scroll library per project.
import Lenis from "lenis";
import "lenis/dist/lenis.css";
export function startSmoothScroll() {
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return null;
return new Lenis({
autoRaf: true, // Lenis runs its own frame loop
anchors: true, // # links glide, and stop at each section's scroll-margin-top
allowNestedScroll: true, // rows and panels that scroll keep their own scroll
prevent: (node) => node.closest?.("dialog") != null, // dialogs scroll natively
});
}
- Marketing pages only. Never on an app screen or dashboard with its own scroll panels: a
global Lenis fights them. In a single-page app, start it on marketing routes and call
destroy()when the visitor leaves them. - Leave touch native. Keep
syncTouchoff. Phones already scroll smoothly, and fake touch inertia feels wrong. - Do not start it under reduced motion. The page keeps plain browser scrolling.
- Import
lenis/dist/lenis.css. It turns off CSSscroll-behavior: smoothwhile Lenis runs. Two smoothers fight each other. - Give sections
scroll-margin-topequal to the sticky nav height. Lenis reads it for links. - Do not cancel link clicks. Lenis does not, so the URL hash and the skip link keep working.
- Modals: a native
<dialog>with thepreventline above is enough. A modal that locks the page some other way needslenis.stop()when it opens andlenis.start()when it closes. - Scroll readers keep working (sticky headers, progress bars, IntersectionObserver), because
Lenis moves the real window scroll. GSAP ScrollTrigger needs
lenis.on("scroll", ScrollTrigger.update). - Prove it. In a headless browser, one wheel tick should land over many frames and a reduced-motion run should land in one frame. A hidden browser tab runs no frames, so it shows nothing. Measured on a live marketing site (2026-10-11): one wheel tick took 24 frames (1 before), a nav link 75 frames to the same spot, and the page grew by 5 KB gzip.
6. Check it at two widths
- Take screenshots at 375 px and 1440 px, in light and dark, and look at them. Do not trust the code alone.
- Compare each screenshot with its two examples: is the spacing as calm, and is the type as sure?
- Each new library: build, then say what it added to the bundle, as a number.
- Say NOT VERIFIED for a device or browser you could not test, and say what would prove it.
What to skip
- Prompt packs and "award-winning prompt" bundles. A
DESIGN.md, two real examples and a real component do this job better. A pack is somebody else's taste with no tokens behind it. - A second design tool when one is enough. Claude Code, Cursor, v0 and Lovable all read the
same
DESIGN.md. Choose one per job.
View original Markdown
---
name: web-design
description: Build pages and UI that look designed, not generated. Read the project's DESIGN.md first (write one from the real code if it is missing), look at two real examples for each section, pull parts from free shadcn-compatible libraries, keep to the rules that break phones, add Lenis smooth scroll to marketing pages, then check at phone and desktop width. Use when building or restyling a landing page, marketing site, hero, pricing page, dashboard, or any UI component. Use motion-design as well for anything that moves.
metadata:
license: AGPL-3.0-or-later
copyright: "2026 DevTribe Labs"
homepage: https://github.com/DevDadTribe/toolbox
---
# Web design: designed, not generated
An agent is not bad at design. It has just never seen the project's design, and it has never
looked at good examples before it starts. This skill fixes both, in this order:
1. **Read `DESIGN.md`.** No file? Write one first (below). Never invent a color, a font or a radius.
2. **Look before you build.** Two real examples for each section you build. `resources.md` says where.
3. **Pull parts, don't draw them.** Free libraries that install into a shadcn project in one command.
4. **Keep the phone rules.** They are short, and each one was paid for on a live site.
5. **Add smooth scroll** to marketing pages. Lenis, set up the one way below.
6. **Check it at two widths.** Look at 375 px and 1440 px, light and dark, before you call it done.
## 1. `DESIGN.md`: one file the builder and the designer both read
`DESIGN.md` is an open format from Google Labs (Apache-2.0, still `alpha`). It sits in the
project root next to `README.md`. Exact values go in YAML front matter: `name`, `colors`,
`typography`, `rounded`, `spacing`, `components`. The reasons go in Markdown sections, in this
order: Overview, Colors, Typography, Layout, Elevation & Depth, Shapes, Components, Do's and
Don'ts. You can leave a section out. A section must not appear twice.
- **Write it from the code, never from taste.** Read the real tokens: the CSS variables, the
Tailwind theme, the button and card source files. Write down what the code does today. Put a
wish in Do's and Don'ts, labelled as a wish.
- **Name the source of each value** (file and variable) in the Colors section. Then the next
agent can check it.
- **Check it:** `npx @google/design.md lint DESIGN.md`. An error makes the exit code 1.
- **Export it** when a tool needs it: `npx @google/design.md export --format css-tailwind DESIGN.md`.
- **Client or white-label work:** each brand gets its own `DESIGN.md`. A shared component reads
the brand from the project's tenant or theme data. It never hardcodes a brand name or color.
- Motion has no key in the format yet. Put the motion numbers in the Components section as a
short table. `motion-design` says which numbers.
`DESIGN.template.md` in this folder is a starting file. Delete every value you did not measure.
## 2. Look before you build
Before you build a section, open two strong examples of that same section. Write down three
things each one does: the spacing rhythm, the type scale, and one detail you would not have
thought of. Then build to the project's `DESIGN.md`, not to the example.
- Look only. Never copy a layout pixel for pixel. Never lift a site's images, copy or logo.
- `resources.md` lists where to look for each job: heroes, pricing, navigation, footers, forms,
mobile patterns and whole sites.
- Screenshots on gallery sites belong to the sites they show. Use them to learn, not as assets.
## 3. Pull parts, don't draw them
Most good animated parts already exist as free shadcn registry items. The `shadcn` command
line knows these libraries by name, so they need no setup:
```bash
npx shadcn@latest search @magicui -q marquee # find
npx shadcn@latest view @magicui/marquee # read the code before it lands
npx shadcn@latest add @magicui/marquee # copy it into the project
```
Named registries checked on 2026-10-11: `@magicui`, `@aceternity`, `@motion-primitives`,
`@smoothui`, `@shadcnblocks`, and also `@animate-ui`, `@cult-ui`, `@kokonutui`, `@reui`,
`@kibo-ui`, `@eldoraui`. `resources.md` gives the licence and price of each.
- **Read every part before you add it.** Replace its colors and radii with the `DESIGN.md`
tokens. Remove any `filter: blur()` glow (see rule 1 below). Check what it adds to the bundle.
- **Use one animation library.** If the project already uses Motion (formerly framer-motion; import from `motion/react`), choose parts
built on Motion. Do not add GSAP or anime.js beside it for one effect.
- **Paid blocks** (most of shadcnblocks, Aceternity Pro, 21st.dev past two copies a day) need
the project owner's yes and a licence that covers client work. Never resell a part as part of a kit.
- An MCP connection is optional: `npx shadcn@latest mcp init --client claude` lets the agent
search these registries from chat. The command line does the same job with no setup.
## 4. The phone rules
Each rule below broke a live site before it became a rule.
1. **No big `filter: blur()` or `backdrop-filter` glows.** iPhone Safari has a small graphics
budget. It drops large blurred layers and paints them again while you scroll, so whole
sections flash black. Desktop browsers and Chrome DevTools cannot show the bug. Use a
`radial-gradient` to get the same soft glow.
2. **No three.js or shader hero on a shared layout.** One 3D library in a shared chunk once put
about 1.26 MB on every marketing page. If one page truly needs 3D, load it lazily on that page.
3. **Glass and refraction effects need a real iPhone test** before they ship. They use the same
kind of layers as rule 1.
4. **Never hide the main headline behind an animation.** Text that starts at `opacity: 0` and
waits for JavaScript makes the page slow to show and slow to score. Animate in the second line,
not the first.
5. **Respect `prefers-reduced-motion`.** Use fades instead of moves, and stop the loops.
6. **No horizontal scroll at 375 px.** Wide marquees and three-column grids are the usual cause.
## 5. Smooth scroll: Lenis, set up once
Smooth wheel scrolling is a big part of what makes a marketing page feel finished. Use Lenis
(`npm i lenis`, about 5 KB gzip, MIT). One smooth-scroll library per project.
```ts
import Lenis from "lenis";
import "lenis/dist/lenis.css";
export function startSmoothScroll() {
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return null;
return new Lenis({
autoRaf: true, // Lenis runs its own frame loop
anchors: true, // # links glide, and stop at each section's scroll-margin-top
allowNestedScroll: true, // rows and panels that scroll keep their own scroll
prevent: (node) => node.closest?.("dialog") != null, // dialogs scroll natively
});
}
```
1. **Marketing pages only.** Never on an app screen or dashboard with its own scroll panels: a
global Lenis fights them. In a single-page app, start it on marketing routes and call
`destroy()` when the visitor leaves them.
2. **Leave touch native.** Keep `syncTouch` off. Phones already scroll smoothly, and fake touch
inertia feels wrong.
3. **Do not start it under reduced motion.** The page keeps plain browser scrolling.
4. **Import `lenis/dist/lenis.css`.** It turns off CSS `scroll-behavior: smooth` while Lenis runs.
Two smoothers fight each other.
5. **Give sections `scroll-margin-top`** equal to the sticky nav height. Lenis reads it for links.
6. **Do not cancel link clicks.** Lenis does not, so the URL hash and the skip link keep working.
7. **Modals:** a native `<dialog>` with the `prevent` line above is enough. A modal that locks the
page some other way needs `lenis.stop()` when it opens and `lenis.start()` when it closes.
8. **Scroll readers keep working** (sticky headers, progress bars, IntersectionObserver), because
Lenis moves the real window scroll. GSAP ScrollTrigger needs
`lenis.on("scroll", ScrollTrigger.update)`.
9. **Prove it.** In a headless browser, one wheel tick should land over many frames and a
reduced-motion run should land in one frame. A hidden browser tab runs no frames, so it shows
nothing. Measured on a live marketing site (2026-10-11): one wheel tick took 24 frames (1
before), a nav link 75 frames to the same spot, and the page grew by 5 KB gzip.
## 6. Check it at two widths
- Take screenshots at 375 px and 1440 px, in light and dark, and look at them. Do not trust the
code alone.
- Compare each screenshot with its two examples: is the spacing as calm, and is the type as sure?
- Each new library: build, then say what it added to the bundle, as a number.
- Say NOT VERIFIED for a device or browser you could not test, and say what would prove it.
## What to skip
- **Prompt packs and "award-winning prompt" bundles.** A `DESIGN.md`, two real examples and a
real component do this job better. A pack is somebody else's taste with no tokens behind it.
- **A second design tool when one is enough.** Claude Code, Cursor, v0 and Lovable all read the
same `DESIGN.md`. Choose one per job.
Community Reviews & Field Notes
Tried this skill on your own project? Share the model you used and the results you got.