Seven Skills That Make AI Coding Assistants Actually Understand Design

    Most AI coding assistants return the same landing page every time: purple gradient hero, a common geometric sans, "do everything faster with AI," three rounded icon cards, and a pricing table nobody asked for. This article explains why that happens at the engineering level and how to fix it by externalizing design decisions into structured, version-controlled skill files. It covers seven skills across three layers — a constraint layer (project-level visual direction with explicit exclusions), a capability layer (typography, color, layout, component states, motion), and an adjustment layer (parameterized aesthetic preferences) — along with the repository layout, the `SKILL.md` structure, invocation triggers, a three-stage acceptance checklist, and practical tuning advice for avoiding over-styled output.

    1. Start with the problem: why AI-generated interfaces default to the average

    Tell a coding assistant to “build me a landing page” with no constraints, and the result is highly predictable: a purple gradient background, a common geometric sans-serif, a hero line about doing everything faster with AI, three rounded cards with icons below it, and a pricing table nobody asked for further down.

    The issue isn’t that it looks good or bad. The issue is that it has no point of view. The convergence comes from three engineering-level causes, not from “the model can’t design”:

    1. Mode effect of the training distribution. Without constraints, a model favors the highest-probability combination. AI product landing pages are heavily represented on the web and share the same visual template, so the template becomes the default answer.
    2. The prompt describes the business, not the aesthetics. Users supply a feature list, so the model translates that list directly into stacked sections — centered, vertical, one after another — because centering is the排版 decision least likely to be wrong.
    3. No reusable constraint layer. Design judgment is scattered across individual conversations. It can’t be accumulated, versioned, reused across projects, or shared with collaborators outside the team to produce consistent output.

    So the effective fix is not a longer prompt. It is to externalize design decisions into structured skill files: make the model complete an explicit visual decision before it writes the first line of code, and make those decisions tunable, reviewable, and regression-testable.

    2. Skill layering: from global conventions to adjustable preferences

    In practice, the skills that actually change the final output fall into three layers. Drop any one of them and output slides back into templates:

    • Constraint layer: a project-level visual direction declaration that decides “what not to do.”
    • Capability layer: five concrete skills — typography, color, layout, component states, motion — that decide “how to do it right.”
    • Adjustment layer: parameterized aesthetic preferences that decide “how strongly.”

    The seven skills below are grouped by these three layers.

    Skill 1: Front-load the visual direction statement

    The core idea is decide the direction, then write code. Before generating any markup or styles, force a short design brief to be produced: is this product editorial, brutalist, retro-print, soft-natural, or calm technical-tooling; what are the primary hue and background tone; is the display typeface a display face or a neutral one; what is the order of magnitude of the corner radius; are shadows softly diffused or essentially absent.

    Exclusions matter just as much. The direction statement should include an explicit forbidden list — for example, “no color gradient as the hero background,” “no centered stack of three feature cards,” “no pricing section unless requested.” Exclusions suppress the mode effect more effectively than positive descriptions.

    1. # design/direction.yaml
    2. style: editorial-minimal # editorial direction
    3. background: warm-off-white # warm off-white, not pure white or deep purple
    4. display_font: high-contrast serif
    5. body_font: neutral grotesque
    6. radius_scale: small # ~4px scale
    7. shadow: none # hierarchy built from rules and whitespace
    8. accent_hue: terracotta
    9. forbidden:
    10. - gradient hero background
    11. - three centered feature cards
    12. - unsolicited pricing section

    Skill 2: Tunable aesthetic parameters

    A direction still needs “intensity knobs.” Decomposing subjective taste into a few orthogonal, quantified dimensions is far more controllable than adjectives. Three dimensions cover most cases in practice:

    1. # design/taste.yaml
    2. DESIGN_VARIANCE: 4 # 1 = fully symmetrical; 10 = strong artistic offset and asymmetry
    3. MOTION_INTENSITY: 3 # 1 = nearly static; 10 = cinematic motion
    4. VISUAL_DENSITY: 6 # 1 = gallery-like whitespace; 10 = data cockpit

    Semantics and tuning guidance for each:

    • DESIGN_VARIANCE controls how regular the composition is. Marketing pages can go to 5–7, using slight offsets, asymmetric column widths, and elements that break the container to create memorable moments. Internal admin tools and form-dense systems should be held at 1–3, or scanning efficiency gets sacrificed for the sake of “looking designed.”
    • MOTION_INTENSITY controls transition durations, displacement magnitude, and whether scroll-driven animation is introduced. Tool products should stay at 2–4, where motion only explains state changes. Brand showcase pages can reach 6–8, but only with a performance budget attached.
    • VISUAL_DENSITY controls the spacing scale, font-size ratio, and amount of information per unit area. Consumer-facing pages lean toward 2–4; operations and monitoring interfaces lean toward 6–8.

    The value of parameterization is that it translates a vague complaint (“too flashy”) into a committable configuration change (“set variance from 7 to 3”), which then enters version control and code review.

    Skill 3: A typography system, not a single font

    A telltale sign of inexperienced generation is picking one font and then setting font sizes arbitrarily. A mature typography skill outputs a type scale, not scattered sizes:

    • Define a 6–8 step size ladder with a ratio of 1.2 (compact) or 1.333 (expansive). Every font size on the site must come from that ladder.
    • Body line height should be 1.5–1.7× the font size; heading line height compressed to 1.1–1.25. Build hierarchy from line-height differences, not font size alone.
    • Keep line length between 45–75 characters; beyond that, add columns or narrow the container.
    • Chinese-language contexts need additional rules for weight hierarchy (three steps is usually enough) and spacing strategy for mixed Chinese/Latin text, to avoid baseline misalignment between the two scripts.
    • Explicitly forbid more than two display fonts, and specify the fallback order when a font fails to load, to prevent layout shift in the first viewport.

    Skill 4: Color and contrast validation

    The goal of the color skill is not “pick a nice color.” It is to establish a semantic palette so styles reference roles rather than raw values:

    1. :root {
    2. --bg-surface: #faf7f2;
    3. --fg-primary: #1c1a17;
    4. --fg-muted: #6b6459;
    5. --border-subtle: #e6e0d6;
    6. --accent: #b4552d;
    7. --accent-contrast: #ffffff;
    8. --danger: #b3261e;
    9. --success: #2f6b46;
    10. }

    Supporting requirements: body text contrast against the background must be at least 4.5:1, and large text at least 3:1. The accent color must not carry both “brand identity” and “the only interactive cue” — otherwise users with color vision deficiencies can’t distinguish them. Light and dark modes should be implemented by swapping token sets, not by scattering conditionals inside components.

    Skill 5: Layout and spacing grid

    Layout is where de-templating actually happens. The skill should require: spacing drawn from a single 4- or 8-based scale; the grid allows deliberate overflows and offset elements (matching a higher DESIGN_VARIANCE); avoid site-wide “centered + vertically stacked,” and introduce at least one asymmetric two-column or sidebar-anchored structure; keep one primary action in the hero and demote all other entry points to secondary styling.

    Skill 6: Complete component state coverage

    AI-generated pages usually ship only the “happy state.” This skill requires that any interactive component come with its full state set: default, hover, focus (including a visible keyboard focus style), active, disabled, loading, empty data, error, and partial success. List interfaces also need a pagination or scroll-loading strategy; forms need an agreed timing for validation and an agreed location for error copy. Interfaces missing this layer almost always get bounced in review, because they immediately fall apart under real networks and real data.

    Skill 7: Motion and accessibility baseline

    The motion skill specifies duration ranges (micro-interactions 100–200ms, transitions 200–400ms), an easing family (decelerate on enter, accelerate on exit), and a maximum displacement distance. It also requires honoring the system’s “reduce motion” preference, degrading displacement and parallax to a pure fade when that preference is on. The accessibility baseline covers semantic elements, alternative text for images, label association in forms, focus order, skip links, and full keyboard operability. Only once these requirements are written into the skill file does the model generate them by default, instead of patching them in during review.

    3. Organization and invocation conventions

    Turning the seven skills into directories and putting them under version control alongside the application code is the prerequisite for keeping them in effect:

    1. project/
    2. ├── design/
    3. │ ├── direction.yaml # Skill 1: direction statement
    4. │ ├── taste.yaml # Skill 2: aesthetic parameters
    5. │ └── tokens.css # Skill 4: semantic palette and scales
    6. └── skills/
    7. ├── SKILL.md # Skill index and trigger conditions
    8. ├── typography.md # Skill 3
    9. ├── layout.md # Skill 5
    10. ├── states.md # Skill 6
    11. └── motion-a11y.md # Skill 7

    The recommended structure for SKILL.md has five fields: applicable scenarios (when it should load), inputs (which config files it reads), required artifacts (brief, tokens, page), a self-check list, and explicit prohibitions. Trigger conditions should be stated precisely — for example, “load only when the task adds a new interface or reworks the visual layer” — so the skills don’t generate noise on pure backend work.

    In a coding assistant or a self-built internal AI coding capability, the maintainability of these assets matters more than the initial output quality. Skill file changes go through code review, parameter changes are traceable, and new team members get a consistent output baseline from day one. Combine it with pipeline checks and you can validate at commit time whether design tokens were bypassed with hardcoded color values and whether the component state files are complete; feeding build and runtime logs into unified logging, monitoring, and alerting turns “UI regression” into an observable event.

    4. Acceptance: replace intuition with a checklist

    Design deliverables are the most prone to “looks fine to me” sign-off. Split acceptance into three stages:

    1. Static consistency check: are only type-scale sizes used; are there hardcoded color values; are spacing values on the scale; are there violations of the direction’s forbidden list.
    2. State and responsive check: walk the page under five conditions one by one — narrow viewport, wide viewport, overlong text, empty data, failed API call; the primary flow must be keyboard-completable; no displacement animation with reduced motion enabled.
    3. Visual regression: keep baseline screenshots for key pages and diff after changes. Differences should be explainable, not “it happened to look better.”

    5. Common pitfalls and tuning experience

    • Overdoing it. An aggressive direction declaration applied to a plain internal admin tool produces exaggerated compositions. The fix isn’t deleting the skill — it’s lowering DESIGN_VARIANCE and adding a scenario constraint such as “this is a high-frequency efficiency tool,” after which the model naturally converges.
    • Treating parameters as goals. Parameters are a communication language. Don’t manufacture meaningless offsets just to max out variance.
    • Skills conflicting with existing conventions. If the team already has a mature design system, the skill files should reference the existing tokens rather than start a parallel set, or you end up with two visual languages running at once.
    • Constraining visuals but not content. Hero copy, the number of sections, and information priority belong in the direction statement too. Otherwise the model still fills in whatever sections it thinks are “supposed to be there.”

    6. Conclusion

    Making an AI coding assistant “understand design” is fundamentally not about finding a stronger model. It is about turning design judgment from a chance byproduct of each conversation into engineering assets that can be declared, parameterized, reviewed, and regression-tested. The direction statement suppresses convergence; typography and color tokens guarantee consistency; state completeness and the accessibility baseline guarantee usability; and aesthetic parameters give different products different intensities of expression. Once the seven skills are installed, landing pages and admin interfaces can carry an explicit design tradeoff for the first time — and that tradeoff is exactly the line between a template and a product.