Project design

From Starchild-ai-agent/official-skills · View interactive version

Project design is an AI agent skill from the GitHub repository Starchild-ai-agent/official-skills. Professional UI design system — the visual quality gate for all HTML output. MUST USE together with project-builder when building any HTML page, dashboard, landing page, portfolio, or web application. project-builder handles engineering workflow; this skill handles visual design decisions (color pal

How to use this skill

Skill file

Project Design Skill

Generate production-grade, visually distinctive web interfaces. Every page must look like it was designed by a professional — not generated by AI.

When to Use

This skill applies whenever you generate HTML/CSS/JS for any visual web output — dashboards, landing pages, web apps, tools, portfolios, or any other page type.

Reference Files

| File | Read When |

|------|-----------|

| references/aesthetics.md | Building a color palette, choosing typography, designing layout — the methodology for making design decisions |

| references/components.md | Building UI components — navigation, cards, tables, buttons, forms, hero sections, CTAs |

| references/animations.md | Adding motion — scroll reveals, hover effects, modals, drawers, page load sequences |

| references/charts.md | Creating charts — Chart.js/ECharts setup, chart type selection, mock data generation, dashboard layouts |


Priority Override: User Settings Come First

If the user (or the brief) explicitly specifies any design preference, that preference overrides the corresponding Design Dial result. The priority order is:

  1. User-specified settings (highest priority) — explicit requests like "use dark mode", "make it blue", "use Playfair Display font", "I want a minimalist style"
  2. Design Read inference — signals inferred from the brief content and context
  3. Design Dials (lowest priority) — time-based random selection, used only for dimensions the user didn't specify

How this works in practice:

Never argue with the user's taste. If they want purple gradient on a cream background, do it well. Document the user override in the Design Dials output line:

Design Dials: Surface=USER(Dark) · Accent=3(Orange, #e87040) · Type=USER(Serif) · Family=2(Editorial) → Playfair Display


Step 0: Design Read (MANDATORY)

Before writing ANY code, silently analyze the brief and output a single-line Design Read:

Design Read: [page type] · [audience] · [atmosphere word] · [aesthetic family] · [light/dark/tinted]

How to infer each signal:

| Signal | Source | Example |

|--------|--------|---------|

| Page type | Explicit in brief or inferred from content | SaaS dashboard, editorial blog, dev tool, portfolio |

| Audience | Who will use this? | Enterprise buyers, indie developers, Gen-Z consumers |

| Atmosphere | One word capturing the emotional register | Clinical, playful, austere, warm, raw, luxurious |

| Aesthetic family | The design tradition this belongs to | Swiss/International, Neo-brutalist, Editorial, Soft-tech, Industrial |

| Surface | Light, dark, or tinted background | Dark with blue tint, warm off-white, pure white |

The Design Read anchors every subsequent decision. If two choices conflict, the Design Read wins.


Step 0.5: Scene Sentence (MANDATORY for dark/tinted surfaces)

If your Surface dial (Step 1) selects a dark or tinted direction (indices 5 or 6), you MUST write a Scene Sentence before choosing any colors. This anchors the dark palette to a physical environment instead of defaulting to generic blue-black.

Scene: [who] is using this [where], under [what lighting], in [what mood]

Examples:

The Scene Sentence determines your dark surface tint:

BANNED default scene: "a developer's monitor in a dark room" — this is the AI default scene that produces the same blue-black every time. Be specific and varied.

See references/aesthetics.md § Dark Surface Tint Guide for the full scene-to-tint mapping table.


Step 1: Spin the Design Dials (MANDATORY)

You have no memory of previous generations and WILL converge on the same dark-blue-card layout every time if left unchecked. To prevent this, you MUST spin four independent dials before writing any code. These dials constrain your direction but leave you full creative freedom within that direction.

How to Spin

Take the current UTC time and compute four indices:

dial_A = UTC_minute mod 8                → Surface
dial_B = (UTC_minute + 3) mod 7          → Accent Hue
dial_C = (UTC_hour) mod 6               → Typography
dial_D = (UTC_hour + UTC_minute) mod 12  → Aesthetic Family

Dial A: Surface (mod 8)

| Index | Direction | Description |

|-------|-----------|-------------|

| 0 | Warm Light | Off-white with warm undertone (cream-adjacent but NOT generic cream — add personality). Light cards, dark text. |

| 1 | Cool Light | White or blue-tinted white. Crisp, clinical, airy. Think Arctic, not generic. |

| 2 | Pure White | Clean #ffffff or #fafafa. Maximum contrast, no tint. Let typography and accent do the work. |

| 3 | Tinted Light | Light background with a subtle color tint — pale sage, lavender wash, soft peach, ice blue. Not white, not cream. |

| 4 | Light with Color Pop | White/light base with one bold colored section or element (colored hero, colored sidebar, colored footer). Mostly light. |

| 5 | Tinted Dark | Dark background with a NON-BLUE tint — try deep green, wine, charcoal-brown, dark purple, or slate-olive. NOT the #0a-#0f blue-black that AI always picks. Use Scene Sentence to anchor the tint. |

| 6 | Neutral Dark | True dark — near-black with NO color tint. Pure #111 or #0f0f0f. Monochrome surface, let accent do the talking. Use Scene Sentence. |

| 7 | Mixed | Light header/hero + dark content area, or alternating light/dark sections. Two-tone page. |

Dial B: Accent Hue (mod 7)

| Index | Hue Family | Suggested Range (pick your own specific shade) |

|-------|-----------|------------------------------------------------|

| 0 | Warm Red | Vermillion, terracotta, rust, brick — NOT generic #ef4444 |

| 1 | Gold / Amber | Marigold, honey, saffron, brass — warm and rich |

| 2 | Green | Sage, olive, emerald, lime, mint — pick one, NOT teal |

| 3 | Orange / Coral | Tangerine, peach, salmon, burnt orange |

| 4 | Pink / Magenta | Rose, fuchsia, hot pink, dusty pink — bold or muted |

| 5 | Violet / Purple | Lavender, grape, plum, electric purple — own it fully |

| 6 | Cool Blue | Cobalt, cerulean, sky, steel — but NOT the generic #3b82f6 or #6366f1 |

Dial C: Typography (mod 6)

| Index | Mood | Example Fonts (pick ONE — these are suggestions, not the only options) |

|-------|------|----------------------------------------------------------------------|

| 0 | Serif | Libre Baskerville, Newsreader, Lora, Playfair Display, Cormorant Garamond, Source Serif 4 |

| 1 | Geometric Sans | Instrument Sans, Geist, Sora, Urbanist, Figtree, Albert Sans |

| 2 | Humanist Sans | IBM Plex Sans, Nunito Sans, Atkinson Hyperlegible, Lexend |

| 3 | Monospace | JetBrains Mono, Space Mono, IBM Plex Mono, Fira Code |

| 4 | Display / Decorative | Fraunces, Bricolage Grotesque, Clash Display, Cabinet Grotesk |

| 5 | Slab / Mechanical | Roboto Slab, Zilla Slab, Bitter, Arvo |

Dial D: Aesthetic Family (mod 12)

| Index | Family | Surface Tendency | Typography | Accent Style | Layout |

|-------|--------|-----------------|-----------|-------------|--------|

| 0 | Swiss/International | Pure white or light gray | Geometric sans | Single saturated, sparse | 12-col grid, strict alignment |

| 1 | Neo-brutalist | White or bright color | System mono or bold sans | Black + one loud color | Broken grid, thick borders |

| 2 | Editorial/Magazine | Off-white (not cream) | Serif display + sans body | Muted, editorial | Asymmetric, generous whitespace |

| 3 | Soft-tech | Tinted light | Rounded sans | Pastel gradient | Rounded cards, soft shadows |

| 4 | Industrial/Utilitarian | Near-black or concrete gray | Monospace | Single neon or warning | Dense grid, no decoration |

| 5 | Art Deco/Geometric | Deep color (navy, forest) | Display serif or geometric sans | Gold, brass | Symmetric, geometric patterns |

| 6 | Organic/Natural | Earth tones | Humanist sans | Warm, natural | Flowing, irregular shapes |

| 7 | Retro-futuristic | Dark with color tint | Display sans or pixel font | Neon, holographic | Asymmetric, layered |

| 8 | Minimalist/Zen | Pure white, max whitespace | Thin sans (weight 300-400) | Single muted tone, barely there | Extreme whitespace, few elements |

| 9 | Data-dense/Mission Control | Dark or neutral | Monospace + condensed sans | Status colors (green/amber/red) | Multi-panel, dense grid, no wasted space |

| 10 | Playful/Toy-like | Bright, saturated background | Rounded/bouncy sans | Multiple bold colors | Irregular, overlapping, rotated elements |

| 11 | Luxury/Refined | Deep black or dark color | Thin serif or elegant sans | Metallic (gold, silver, copper) | Generous spacing, minimal elements, large type |

Note: The Aesthetic Family is a tendency, not a hard constraint. It guides your overall design language but the Surface/Accent/Typography dials take precedence for their specific dimensions. Use the family to inform layout decisions, spacing rhythm, border treatments, and overall visual language.

Output Your Spin

Before writing any code, output:

Design Dials: Surface=index · Accent=index · Type=index · Family=index → [specific font choice]

Example:

Design Dials: Surface=2(Tinted Dark, wine) · Accent=1(Gold, #d4a030) · Type=0(Serif) · Family=5(Art Deco/Geometric) → Libre Baskerville

Rules


Step 2: Build with Craft

Implement working HTML/CSS/JS that is:

Required Elements (not a template — implement fresh each time)

Every generated page must include:

  1. Proper DOCTYPE, charset, viewport meta
  2. Google Fonts loaded via <link> with preconnect
  3. All colors defined as semantic CSS custom properties in :root
  4. A prefers-reduced-motion media query that disables animations
  5. Box-sizing reset and font-smoothing
  6. An entrance animation strategy (choose ONE per project, vary across projects):
  1. Light/Dark theme toggle (MANDATORY) — every page must support both light and dark themes with a toggle button:

Do NOT copy a fixed HTML skeleton. Structure the document to match the content.


Design Rules

Typography

Color

Layout

Hero Section Discipline

CTA Discipline

Components

Animation

Charts

Icons

Image & Visual Asset Strategy

Priority order for visual assets:

  1. Image-generation tool first — If ANY image-gen tool is available in the environment (generate_image, MCP image tool, etc.), use it to create section-specific assets: hero photography, product shots, texture backgrounds. Generate at the right aspect ratio for the section.
  2. Real web images second — Use https://picsum.photos/seed/{descriptive-seed}/{w}/{h} for placeholder photography (seed should describe the section, e.g. crypto-dashboard-hero). Or use Unsplash/Pexels direct URLs.
  3. Last resort: tell the user — If neither is possible, leave clearly-labeled placeholder slots (<!-- TODO: hero product photo, 1600x900 -->) and note what images are needed.

Rules:

Mock Data

Accessibility (CRITICAL)

Forms & Feedback

Interaction States


Copy Rules (Text Content)

AI-generated text is one of the most obvious tells. Apply these rules to ALL visible text:

Banned Patterns

Copy Self-Audit

Before delivering, read every visible string on the page and ask:

  1. Would a human copywriter write this? Or does it sound like ChatGPT?
  2. Is this specific to the product, or could it apply to any product in the category?
  3. Does the heading actually say something, or is it a vague platitude?
  4. Are there any grammatically broken phrases or AI-hallucinated wordplay?
  5. Does any string read like "an LLM trying to sound thoughtful"? (passive-aggressive humility, fake-craftsman labels, mock-poetic micro-meta)

Theme Support (Light / Dark — MANDATORY)

Every generated page MUST include a light/dark theme toggle. This is not optional. Users expect to be able to switch themes on any modern website.

Default Behavior (Light/Dark Toggle)

The Surface dial determines which theme is the primary (shown on first load if no system preference), but both themes must be fully implemented:

  1. CSS custom properties for all colors — define all colors as --var in :root (light) and [data-theme="dark"] (dark).
  2. Toggle UI — add a simple toggle button (sun/moon icon) in the header/nav. Store preference in localStorage.
  3. System preference detection — use prefers-color-scheme: dark as the initial default if no stored preference.
  4. Both themes must be fully designed — not just "invert the colors". Each theme needs its own surface hierarchy, contrast verification, and accent adjustment.

Dark Mode Design Rules

When designing the dark variant (which every page needs for its dark theme):

  1. Scene sentence: Write a Scene Sentence (see Step 0.5) to anchor the dark palette. Do NOT default to blue-black.
  2. Surface hierarchy: Dark backgrounds need MORE levels of elevation than light (at least 4 distinct surface levels).
  3. Contrast independence: Verify contrast ratios independently for dark mode — don't assume light-mode-passing colors work on dark surfaces.
  4. Accent adjustment: Accent colors often need to be lighter/more saturated on dark backgrounds to maintain the same visual weight.
  5. Token strategy: Use the same CSS custom property names with different values:
:root {
  --surface-primary: #fafafa;
  --surface-elevated: #ffffff;
  --text-primary: #1a1a1a;
  --accent: #d4a030;
}

[data-theme="dark"] {
  --surface-primary: #1a1816;  /* from Scene Sentence */
  --surface-elevated: #242220;
  --text-primary: #e8e4e0;
  --accent: #e8b84a;  /* lighter for dark bg */
}
  1. Toggle implementation:
// Detect system preference, respect stored preference
const stored = localStorage.getItem('theme');
const prefersDark = matchMedia('(prefers-color-scheme: dark)').matches;
document.documentElement.dataset.theme = stored || (prefersDark ? 'dark' : 'light');

// Toggle handler
function toggleTheme() {
  const current = document.documentElement.dataset.theme;
  const next = current === 'dark' ? 'light' : 'dark';
  document.documentElement.dataset.theme = next;
  localStorage.setItem('theme', next);
}

Anti-Patterns (NEVER DO THESE)

Claude-Specific Defects (known failure modes)

These are patterns Claude specifically tends to produce. Watch for and avoid them:

  1. border + box-shadow combo — Claude likes to add both a 1px border AND a large box-shadow to the same element, creating a "ghost card" effect. Rule: choose one or the other, never both on the same element.
  2. border-radius inflation — Claude tends to use 24px-40px border-radius on cards. Rule: cards max 16px; pill shapes only for tags/badges/buttons.
  3. Hand-drawn SVG illustrations — Claude will attempt to hand-draw SVG illustrations as decoration. The quality is consistently poor. Rule: use icon libraries (Lucide, Phosphor, Heroicons) or CSS-based decorative elements, never hand-drawn SVGs.
  4. Repeating-linear-gradient stripes — Claude likes to add diagonal stripe patterns via repeating-linear-gradient on body::before or section backgrounds. Rule: banned. Use other surface treatments from references/aesthetics.md.
  5. Gradient text on headings — Claude frequently applies background-clip: text + gradient to large headings. Rule: banned. Use solid colors for all text.
  6. Deep blue-black default — When asked for dark mode, Claude almost always picks the #0a-#0f blue-black range. Rule: must use Scene Sentence to anchor a specific, non-blue dark tint.

The AI Slop Test (Two Layers)

Before delivering, run both layers:

Layer 0: Production-Test Tells (73-Brand Benchmark)

These are the specific measurable differences between AI-generated UI and real production websites, derived from analyzing 73 major brand design systems:

| Tell | AI Default | Real Brand Range | Fix |

|------|-----------|-----------------|-----|

| Display weight | 600-700 | 300-500 (45% of brands) | Try 400-500 for display; 300 for editorial |

| Display letter-spacing | 0 (none) | -0.28px to -3px (85% negative) | Add letter-spacing: -1px to -2px on display |

| Body letter-spacing | 0 | 0 to +0.24px (IBM +0.16px, Revolut +0.24px) | Consider subtle positive tracking on body |

| Card border-radius | 24px+ | 12px (35%), 16px (20%) | Cap at 16px for cards |

| Button shape | 8-12px radius | 9999px pill (40%) or 0-8px (30%) | Commit to pill OR sharp, avoid the middle |

| Section spacing | 48-64px | 80-120px (96px most common) | Use 96px between major sections |

| Shadow strategy | box-shadow on cards | Hairline border or surface-lift (60%) | Prefer 1px border over drop shadow |

| CTA color | Blue #3b82f6 | Black (25%), brand-specific (30%) | Try black pill CTA |

| Canvas warmth | Same cream every time | Each brand's warm-white is unique | Vary the warm-white hue per project |

| Font families | 2 families | 1 family (40% of brands) | Consider single-family with weight contrast |

Layer 1: First-Order Check

  1. Could someone tell this was AI-generated? If yes → the design lacks a distinctive point-of-view. Redesign.
  2. Could someone guess the topic just from the color scheme? If yes → the palette is too cliché (blue for finance, green for health). Find a less obvious choice.
  3. Does every section look the same? If yes → vary the layout rhythm. Mix card sizes, alternate text/image placement, break the grid.
  4. Is this the same design you made last time? If yes → change at least the font, color palette, and layout structure.

Layer 2: Second-Order Check (Anti-Anti-Default)

The first layer catches obvious AI defaults. This layer catches the defaults you reach for when avoiding the obvious defaults — the "anti-default defaults" that shift over time.

  1. Is your "alternative" choice actually the most common alternative? When you avoid one cliché, you often land on the next most popular option. Ask: "If 100 AI agents all avoided the obvious default, what would most of them pick instead?" — then pick something else.
  2. Can someone guess your aesthetic family from the page type alone? (e.g., "developer tool = dark mode + monospace + green accent", "fintech = navy + white + clean sans") If yes → subvert the expectation.
  3. Are you using the same "safe alternative" font/color/layout you used last time? The anti-default becomes the new default through repetition. Track what you've used recently and deliberately avoid it.
  4. Does your design feel like it belongs to a recognizable "AI aesthetic school"? (e.g., "the Linear clone", "the Vercel look", "the Stripe style") If it clearly belongs to one school → mix in elements from a different tradition.

Refinement Pass (MANDATORY)

After completing the initial build, take a second pass to refine and polish. Do NOT add more elements — instead, make what exists more cohesive and crisp. This is inspired by the canvas-design skill's principle: "The user already said it isn't perfect enough. It must be pristine."

During the refinement pass, ask:

  1. Spacing consistency: Are all margins and paddings following the spacing system? Any awkward gaps?
  2. Color harmony: Does every color on the page serve the same design direction? Any rogue shades?
  3. Typography rhythm: Are heading sizes, weights, and letter-spacing consistent across sections?
  4. Component polish: Do all buttons have hover + active states? Do all cards have consistent border-radius?
  5. Copy quality: Re-read every visible string. Any AI-sounding phrases? Any em-dashes that slipped through?
  6. Dark mode parity: Switch to the other theme. Does it look equally polished, or is one theme clearly an afterthought?
  7. Mobile check: Does everything stack cleanly at 375px? Any horizontal overflow?

The instinct to add more is wrong. If something feels incomplete, the fix is usually better spacing, better contrast, or better typography — not another gradient, another animation, or another section.


Pre-Delivery Checklist

Run every item. Each must pass mechanically — no subjective judgment.

Design Dials & Design Read

Scene Sentence (dark/tinted surfaces only)

Typography

Color & Surface

Layout

Copy

CTA & Buttons

Claude-Specific Defects

Technical

Theme Toggle

Accessibility

Forms & Interaction (if applicable)

Anti-Slop (Layer 2)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.