Design guidance and the fundamentals every Artifact needs. Load it before you write an artifact of any kind, including a Markdown page that a skill asks for; picking Markdown does not let you skip the design work.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Spatial Design?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/kpal81xd-spatial-design)
---
name: spatial-design
description: Design guidance and the fundamentals every Artifact needs. Load it before you write an artifact of any kind, including a Markdown page that a skill asks for; picking Markdown does not let you skip the design work.
---
Approach each page like the lead designer of a small studio that takes on all kinds of clients: every client gets its own visual identity, pitched at the level of treatment the job actually needs. Choose the palette, type and layout on purpose, for this subject in particular, and stay away from template-looking pages.
## Start by reading the request
You will design either way; what you are deciding is which treatment the page gets. A document deserves as much care as a landing page, just a different treatment. Which format to write is a separate question: write HTML, and publish Markdown only when a skill you have loaded explicitly tells you to. A Markdown page is titled by its filename, can use hardly any of the craft below, and is never the shortcut for saving effort.
Many requests want a more utilitarian treatment, as with a plan, a memo or a demo. Polish it with a real type hierarchy, thought-through spacing and a proper palette, and stop short of over-designing it. A large, showy hero is unnecessary on most pages. Keep any flourish small and in good taste.
Other requests want the editorial treatment: a landing page, a game, or an app or tool that people will keep using or pass around.
When you can't tell which applies, remember that a well-composed page is never the wrong answer, while an over-designed identity sometimes is.
Every page follows the fundamentals below. The editorial process after them applies only when your reading of the request calls for it.
## Fundamentals for every artifact
**Build on what's already there.** Before choosing anything, look for a design system the project already has: CLAUDE.md, a tokens or theme file, the styles of existing components. If you find one, use it; the guidance here only fills what it leaves open and never overrides it. The order of authority is fixed: what the user said, then the project's own system, then your own decisions.
**Root it in the subject.** When the subject is still vague, pin it down: a single concrete subject, who it is for, and the one job the page does. Distinctive choices come out of the subject's own world, its materials, tools and way of talking. At every level of treatment, put in at least one detail that belongs to this subject alone (its actual units and scales, the conventions of its documents, its terms of art), as content and not as ornament; that is free even on a plain page. Fill the page with real content and never with lorem ipsum.
**Pair the typefaces.** How a page reads is decided by its type, even on a page whose subject has nothing to do with type. The Artifact CSP admits Google Fonts as its only font host, so link to it directly (`<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=...&display=swap">`). Any face hosted elsewhere has to be embedded as a @font-face data URI; otherwise the browser quietly falls back. Either way, give every face a real fallback stack. Hold running text to roughly 65 characters per line. Pick a type scale and stick to it. Headings get `text-wrap: balance`, body text gets comfortable spacing, and uppercase labels get slight letter-spacing.
**Load a library rather than inlining it.** If the page genuinely needs a library (React, a charting or syntax-highlighting package), pull in its UMD build with a single cdnjs tag, `<script src="https://cdnjs.cloudflare.com/ajax/libs/<lib>/<exact version>/<file>">`, placed ahead of whichever inline script reads the global it defines. Pin every library URL to an exact version (`react@18.3.1` on jsDelivr or unpkg, `react/18.3.1/…` on cdnjs, `cdn.tailwindcss.com/3.4.17`), never a bare name, a range or a tag (`react`, `react@18`, `@latest`), and choose one at least two weeks old: any version you knew before this conversation is old enough, and if you look versions up, skip any published in the last two weeks. Don't paste the library's source into the page and don't write your own stand-in for it. This route is for scripts only; any stylesheet the library needs must still be inlined, and the SpatialArtifact tool's description names the other few script hosts the CSP accepts. The page's own CSS, JS, images and data all ship inside the page. Most pages need no library at all; reach for one only when the work it does for the page is substantial.
**Pick neutrals on purpose.** A plain mid-grey reads as unconsidered, while a grey nudged slightly toward the page's accent hue reads as chosen. Pure white or near-black backgrounds are fine when they suit the subject, provided you picked that neutral rather than accepting a default.
**Design for both themes.** Pages are shown in whichever theme the viewer uses, and it can be in one of three states. An explicit choice of theme puts `data-theme="dark"` or `data-theme="light"` on the document root; the default, "system", sets *nothing*. For most viewers, then, the document has no `data-theme` attribute and `prefers-color-scheme` is the only signal of light or dark. Organize the CSS around tokens so all three states work. The bare `:root` block holds the full light palette (a deliberately dark-first design swaps light and dark consistently throughout this pattern). `@media (prefers-color-scheme: dark)` redefines the tokens and nothing else, under the guard `:root:not([data-theme="light"])`, so that choosing light explicitly beats a dark OS setting. A second redefinition under `:root[data-theme="dark"]` makes the explicit choice win in the other direction too. In every place the dark palette is in force (the two dark blocks, or the bare `:root` of a design that is dark-first or dark-only), add `color-scheme: dark` as well; the skeleton fixes `light` on `:root`, and this brings native form controls and scrollbars in line with the palette. Components get their colors through the tokens; never style them directly in a media block or under `[data-theme]`. A color that is defined only under `[data-theme]` does nothing when the attribute is missing, which leaves text from one theme sitting on the background of the other. Two further rules keep each theme coherent. First, the viewer paints a background in *its own* theme behind the artifact, so `body` needs an explicit `background` taken from a token; a transparent body lets the host's background show through and nothing warns you. Second, any element that sets a color pulls it from the token set its surface also uses, never from a literal that only works in one theme. Declare each token first in the bare `:root` block, and only then redefine it in a media or `[data-theme]` block; any color existing in nothing but one of those blocks is the textbook cause of an unreadable artifact. Treat the second theme with the same care as the first: don't just invert it; keep contrast readable and make the accent work against both backgrounds. A design that commits on purpose to one visual world, say a neon arcade screen or a letterpress invitation, can stay single-theme: drop the media query and the `[data-theme]` blocks altogether, while still giving the background and each color an explicit value, so that it looks right on either host background; make that a decision, never an oversight.
**Space things with layout.** Arrange groups of siblings with flex or grid and `gap`, not with margins on each element, which collapse or double up without telling you. At every width, hold a gutter of 16px or more on each side, defined once as horizontal padding on `body` or on a single outer wrapper; that element takes its vertical padding through `padding-block`, never through a `padding` shorthand that sets the sides to zero. At phone width (about 400px) rows should wrap or collapse to a single column. Images and any `aspect-ratio` box get `max-width: 100%`, and no element gets a `min-width` greater than the screen's width. Wide tables, code and diagrams are the only exceptions, and each sits in its own container with `overflow-x: auto`, so the body of the page never scrolls sideways. The publish skeleton pads the top and bottom of `:root` by the phone's safe-area insets (zero anywhere but a phone app), so the page reaches the screen edges while keeping its content out from under the system bars; don't remove that padding. A `position: fixed` bar on the top or bottom edge keeps its `top`/`bottom` at `0` and instead grows its own padding by `env(safe-area-inset-top, 0px)` or `env(safe-area-inset-bottom, 0px)`. For a sticky header, set `top: env(safe-area-inset-top, 0px)`, never `0`. A one-screen app is sized with `height: 100%` on `html` and `body`, not `100vh`, so it fits inside that padding. If the page brings its own viewport meta, it only gets this padding when that meta includes `viewport-fit=cover`. Wherever digits line up in columns, use `font-variant-numeric: tabular-nums`.
**Keep repeated elements consistent.** A row of cards, a list of label/value pairs, badges on sibling items: give each one the same edges, baselines and inner padding, and put every recurring element in the same spot on each. Let the content decide a container's height, and pick a number of columns that the items actually fill, so nothing stretches across empty space or sits by itself on a row. Text that can grow past its track wraps or scrolls inside its own container; clipped text counts as a bug.
**Be sparing with card styling.** A border, a fill, a radius or a shadow each tell the reader that an element stands apart. Use them by role, to set off the single element that needs it; giving every block the same radius and shadow flattens the hierarchy. Lead with big-number tiles only when those numbers are what the page is about.
**Keep charts to scale.** Marks, ticks and labels all come from one scale, and every label names a value the chart really reaches. Chart text takes its color from the theme tokens so it reads in both themes. Marks, labels and edges don't collide and stay inside the drawing's bounds; in SVG, make the viewBox big enough for the labels at the edges and set an explicit fill on each shape.
**Make the page whole before anyone scrolls.** Everything meant to be read is on screen once the page loads, with no scrolling needed to reveal it; that first still frame is what thumbnails, link previews and skimming readers get. A section can animate in, but it starts from a visible resting state and is never parked at `opacity: 0` until an observer fires. Size a hero to what it holds, not to the viewport; a `100vh` opener shoves everything else out of that first frame. Tools and apps open already doing their job: the user's real data when there is some, otherwise sample rows, a loaded example or a believably filled-in form, clearly labeled as examples and never passed off as figures that belong to the user. The first screen demonstrates the tool; a blank shell that waits for input demonstrates nothing.
**Steer clear of the AI look.** Generated designs tend to land on the same few looks right now: warm cream (#F4F1EA) with a serif display face and a terracotta accent; near-black with one acid-green or vermilion highlight; newspaper-style hairline rules over dense columns; a hero with a purple-to-blue gradient on white; Inter or Space Grotesk picked as the "safe" face; section markers made of emoji; centered everything; `rounded-lg` on every element; an accent bar or rail on rounded cards. If the user names a visual direction, follow it to the letter; their words always win, even when what they ask for is one of these looks. If they name none, don't use that freedom to fall back on any of these defaults.
**Build it clean.** Look out for elements that overlap, rules that collide in the cascade, and fonts that silently fall back. Close every non-void element, put attributes in double quotes, give keyboard focus a visible style, and honor `prefers-reduced-motion`. Every form control gets a stable `id` (when the page is republished, the platform carries over form values, focus and scroll position). Draw generative or decorative graphics with Canvas or WebGL rather than writing out long SVG path data by hand.
**Mind the cascade.** Keep an eye on selector specificity as you write the CSS. Generated classes easily cancel each other out, for example a type-based `.section` selector and an element-based `.cta` selector both setting the padding and margins between sections. Arrange the cascade so it can't quietly undo your spacing.
**Write the copy with care.** Words are part of the design, never filler. Write from where the user sits: call things what people know them as, not what the system calls them internally (people manage *notifications*, not *webhook config*). Use the active voice, and have each control say exactly what it does ("Publish", followed by a toast reading "Published"). An error says what went wrong and how to put it right, with no apology and nothing vague. Choose the specific over the clever. Write plainly, the way someone who knows the subject would say it aloud. Leave out mannered devices: asides between em-dashes, "not X, but Y" framing, a colon followed by a reveal, scare quotes around labels you made up, and stock phrases like "worth noting" or "honest caveat". Short, direct sentences beat compressed or clever ones.
**Give the page a product's name, not a caption.** The `<title>` is what the gallery and the browser tab call the artifact, and it is the reader's first sign of how much care went in. Name the page properly: a short noun phrase specific to its subject, usually two to four words; or, when the page exists to answer one question, that question, which then serves as its name. End at the name; an explanation tacked on after a dash or colon makes the title read like generated filler. The name also has to single the page out: in the gallery it appears next to dozens of other artifacts, and a generic label for a category, one that would suit all of them, is no more a name than an appended explanation is. When a draft title pairs the name with a generic word, such as a greeting, a category or a label for the kind of page, keep the name; trimming it down to the generic word gives a title that could belong to any page. The point of this rule is to drop explanations, not to force brevity: once a multi-word title already reads as one distinct name, it is finished, and cutting further just makes it generic. The explanation belongs in the one-sentence publish `description`, which the gallery prints right under the title.
**Let structure carry meaning.** Structural devices (numbering, eyebrows, dividers, labels) should say something true about the content, not decorate it. Generic designs often reach for numbered markers (01 / 02 / 03), but those only belong where the content really is a sequence, such as an actual process or a typed timeline whose order the reader needs. Before you add numbered markers or anything like them, check that they mean something.
**When the page is an interface (a dashboard, a tool).** People scan and operate it rather than reading it top to bottom, so the craft moves away from typography and toward information design. The summary comes before the detail. State shows up in form as well as in numbers, through a pill, a chip or a severity stripe, so a glance is enough to see whatever needs attention. Semantic color (good / warning / critical) is a system of its own, apart from the accent hue, and it doesn't count as your accent. Sparklines and charts deserve the care you give type: a faint grid, an area fill, a highlighted endpoint. Anything interactive should look interactive.
**Charts and diagrams.** Here the goal is honesty rather than identity: pick whatever form the shape of the data calls for, never let an encoding exaggerate, and title the finding rather than the axes. When this session offers the `dataviz` skill, load it for the details; the rest of the page still follows this skill.
## Process
Begin with the things a viewer can do on the page, as well as the things they will read there. If the page should accept input, keep what people change for the next person who opens it, show live data, or put a question to Claude, load the `spatial-capabilities` skill now and build the design around what it makes possible for this user. A read-only page can skip it.
Before you write code, draft a brief design plan, which is a small token system for color, type and layout:
- **Color**: the palette as 4-6 named hex values.
- **Type**: faces for at least two roles: a display face with character, used sparingly, a body face that complements it, and when needed a utility face for data or captions.
- **Layout**: the layout idea in one or two sentences.
Then build to that plan, taking every color and type decision from it.
**Write it, look once, publish.** You get one look at the rendered page before you publish: one screenshot of the local file, or a preview from the `SpatialArtifactCheck` tool (or the SpatialArtifact tool's own `action: "preview"` when there is no separate `SpatialArtifactCheck` tool) if this session has one. Then do one round of edits for what you saw, and don't look again. When the page charts real numbers, take that look rather than skipping it, and spend it on the chart. Don't turn your own file into a test loop: no repeated screenshots, no extracting the script to run under node, no scripts that poke at the DOM. A loop like that burns the session re-checking what careful writing already got right while the user waits for a link. Then publish. If the point of the page is its logic or stored data, its one check happens here, not in a render loop: call once any `window.claude` function the preview couldn't exercise (for example, read the stored data back), then stop. The user reviews the live page, and any further polish is theirs to ask for. That check covers runtime code you wrote into this page, not content you put into an Artifact built from an Artifact type, such as a Slides deck or a Design canvas: for those, the type's own instructions decide whether to check, and if they don't say, don't. When the user points out something visibly broken, such as a clipped column, unreadable text or a control that does nothing, fix it and republish once.
**Viewers who already have it open.** Nothing is needed for people who have the page open already: published changes reach them on their next quiet moment, keeping state where possible. If the page holds state a viewer would hate to lose, as a game or a long form does, register `window.claude?.hot?.snapshot(...)` and boot through `window.claude?.hot?.ready ? window.claude.hot.ready(start) : start(window.claude?.hot?.data ?? {})`.
## When the request is editorial
The stance shifts here: this client has already turned down templated-feeling proposals and is paying for a distinct point of view. Make opinionated calls, and take one genuine aesthetic risk where it helps the work.
Check the design plan against the subject before you build: wherever part of it looks like the generic default you'd produce for any similar page, rework that part and note what you changed and why. Only write code once you're sure the plan is its own, and then follow the revised plan exactly.
**Principles**
- The hero makes the argument: lead with the most characteristic thing from the subject's world (a headline, an image, a live demo, an interactive moment).
- Type gives the page its personality. Choose the display and body pairing with intent, avoiding the families you'd reach for on any other project, and give the type scale clear steps and deliberate weights, widths and spacing. Let the type treatment be a memorable part of the design, not a neutral holder for the content.
- Use motion with intent. Consider whether and where animation helps the subject: a sequence as the page loads, small hover interactions, ambient atmosphere. A single orchestrated moment usually lands better than effects scattered everywhere; pick what the direction needs. Sometimes, though, less is more, and extra animation only strengthens the impression that the design was AI-generated.
- Fit the complexity to the vision. A maximalist direction needs elaborate execution; a minimal one needs precision in spacing, type and detail. Elegance means carrying out the chosen vision well.
- Spend your boldness in one place and keep everything around it calm. If the accent fights the background, move it toward a neighboring hue or desaturate it rather than swapping it out.