Building a guideline
There is one library. 15 guidelines run on it, and the next one will too. Nothing below is per-brand code — a brand is a content document plus a handful of variables, and if a brand seems to need a new component, the component is missing from the library rather than special to that brand.
The three layers
- Content.
brands/<slug>/brand.json— aBrandDocument, declared once inkit/types.ts. Every field is nullable on purpose: a value the source never stated renders as absent, never as a plausible-looking placeholder. - Tokens.
public/brand/<slug>/tokens.css— generated from the document. Colour custom properties are named from the brand’s own colour names (--brand-forest-green), and each font file gets its own@font-face. Generated, never hand-edited. - Theme. The dial, on the brand’s Theme tab in the Studio. Read at request time and written onto the guideline’s wrapper as custom properties, so tuning a brand is changing a field and reloading — no rebuild.
Take it somewhere else
The same system, packaged as a Claude skill, for building a guideline directly inside a client’s own website rather than here. It carries the rule, the three layers, the BrandDocument schema verbatim, every module and its failure modes, the theme dial, and a note on installing the kit beside a host design system.
- SKILL.md
- references/brand-document.md
- references/modules.md
- references/theme-dial.md
- references/porting.md
Unzip it into .claude/skills/ in the target repository — or ~/.claude/skills/ to have it everywhere — and it loads itself when the work is brand guidelines.
unzip ~/Downloads/brand-guidelines-skill.zip -d .claude/skills/It describes the system rather than containing it: the modules themselves stay in this repository, and the skill says which files to copy and what has to stay scoped so a guideline and its host site do not style each other.
Migrating an existing guideline
bun scripts/extract-standards.ts <url> --out /tmp/extract
bun scripts/ingest.ts /tmp/extract/<name> --slug <slug>
bun scripts/verify-content.ts <slug>The extractor pulls the published document, every asset and every font file, and refuses to guess: anything the schema does not recognise is preserved verbatim as an unknown block and counted in EXTRACTION.md, so a gap shows up as a gap. Ingest copies the files in, then scripts/migrate-to-sanity.ts writes the brand, its pages and its modules into the CMS as drafts. Then tune the dial — that is the whole re-skin.
Building one with no existing site
Same three layers; only the first is sourced differently. Author the brand.json by hand against kit/types.ts, drop the fonts and assets into public/brand/<slug>/, then run the token generator. The brief has to carry everything below before a page can be built without inventing anything.
- Every colour, with its name and hex. Print values (CMYK, Pantone, RAL) where they exist. A colour with no Pantone renders with no Pantone — never a computed nearest match.
- Each named style with its font, size, line height and tracking. Plus the font files themselves, in a licensed format we may host.
- Master files, clear space, minimum size, and the misuses. The don’ts are content, not decoration — they render as their own module.
- The client’s own information architecture. It drives the navigation and the search index; without it the kit falls back to page and section names, which are editing labels rather than reader-facing ones.
- Whatever the brand shows itself on. Supplied as files, not as links — the guideline must survive the source going away.
- The existing guideline, deck or PDF. Every rebuilt guideline links back to it in its footer so the two can be read side by side.
The dial
Everything a brand may change about the shell. Any subset may be stated; the rest is inferred from the brand’s own document.
- Picks the whole five-step radius hierarchy at once. A brand with square edges sets `sharp` and every corner in the kit — nav, cards, swatches, search field — goes square together.
- Whether the framing bar, palette and footer read light or dark. Inferred from whether the guideline opens on a dark plate.
- How much air the shell gives the content. Scales the nav height and the section rhythm; does not touch the brand’s own type sizes.
- The one colour that stands for the brand in the chrome. Inferred as the palette’s stated default, or its most saturated usable entry.
- Sets the interface itself in the brand’s typeface. Use sparingly — chrome in the brand’s voice competes with the brand.
- Letterform treatment for nav labels. For brands whose wordmark is uppercase and whose navigation would look wrong in sentence case.
- Chrome tracking. Small interface type usually wants a little more than the brand’s display setting.
Anything left unset is inferred from the brand’s own palette, so a guideline renders sensibly before anyone has tuned it. Colour fields name a palette entry rather than holding a value — the accent is Forest Green, not #164734, so correcting the colour moves everything that uses it.
Keeping one private
A guideline that is not for public view is gated from its brand’s Access tab. Turning it on puts a password screen in front of every page — set in that brand’s own colours, typefaces and radius, because a login screen wearing somebody else’s clothes tells the reader they are in the wrong place at the exact moment they are deciding whether to trust it.
The password is never stored. What is stored is a salted PBKDF2 hash, derived in the browser as it is typed, so the plaintext never reaches the CMS and cannot be read back out by anyone with dataset access. The consequence is the right one: a forgotten password cannot be looked up, only replaced.
Unlocking sets a signed, httpOnly cookie carrying the brand’s slug, so it cannot be forged and a cookie for one client does not open another’s. Every page checks — a gate that only guards the front door is walked around by guessing a sub-page address.
The modules
Every guideline is composed from these, and only these. Each one below is live — the same BlockView a real guideline page calls, inside a browser frame, because what you are looking at is a fragment of a page rather than part of this one.
They are dressed in Acme, a brand invented for this page: five colours, three type styles, two font files, three pieces of artwork. A module holds no colour and no typeface of its own — it reads tokens, and the tokens belong to the brand — so pointing the same components at a different brand re-skins every one of them at once. If a brand seems to need a new module, the module is missing from the library rather than special to that brand.
The rules that hold it honest
- Nothing is inferred, completed or tidied. A null renders as absent.
- A duplicate is removed only where it is adjacent and reads as a mistake — the same words twice in a list, or the same words in two treatments side by side. A comparison table that says “Preferred” in two cells of one row means it, and keeps both.
- A stated ink is honoured only while it can be read. Every text colour is checked against the field it actually lands on and dropped below 3:1, because a colour the source stated against a white page is not a colour once the page is black.
- The source’s own contents, pagination and contact footer never render in the page. The shell draws all three itself, so rendering the copies states everything twice — which is what a reader sees as a broken page.
- A colour chip copies its hex on click. A guideline’s palette is read with a design tool open beside it, and the thing a reader does with a swatch is type its value somewhere else.
- A button leads somewhere or it is not a button. A control labelled “Button” with nothing behind it is a placeholder and renders as nothing; a download whose file the source never released renders as a note rather than as a control that would do nothing when pressed.
- Every contact address resolves to one that answers. The sources print four different ones between them —
hello@,admin@, a client mailbox nobody monitors, and one still sayingBrand@domain.com— so all of them become the studio’s. It is the one place the kit overwrites what the client wrote: a guideline pointing at a dead mailbox is worse than one that says nothing. - Lorem ipsum never renders. Three of the sources were published with filler still in them; filler is not content, so it is dropped — and never replaced, because writing the missing paragraph would be inventing the client’s words.
- A section with no visible content never renders, and so never appears in the nav.
- No component hard-codes a radius, an ink or an accent. It names a step in the scale.
- Chrome stays neutral by default. What is below the bar is the brand; a bar wearing the brand’s colours competes with it.
- Every guideline links back to its source in the footer, so the rebuild can always be read against the original.