name: design-system description: Use when building, editing, or reviewing any page or component on this site - anything that produces markup or CSS. Covers the token system, the component library, when to build something new, and the layout rules. Trigger on requests to add a page, add a section, change styling, adjust spacing or colour, or make something "look better".
Design system
The one rule
Use what exists. This site has a small component library on purpose. A page that introduces its own spacing, its own colours, or its own card style breaks the consistency the template exists to provide.
Tokens
src/design/tokens.json is the source of truth. src/styles/tokens.css is
generated from it by npm run tokens — never edit the CSS directly.
Every value in a component comes from a variable:
| Need | Variable |
|---|---|
| Text colour | --color-ink, --color-ink-muted |
| Backgrounds | --color-paper, --color-paper-sunk, --color-accent-soft |
| Borders | --color-rule |
| Links, primary action | --color-accent |
| Warnings only | --color-signal |
| Font size | --size-xs … --size-3xl |
| Spacing | --space-1 … --space-24 |
| Corner radius | --radius-sm, --radius-md |
| Column widths | --layout-measure, --layout-content, --layout-wide |
If a value you need is not in the scale, use the nearest one. Do not invent
padding: 13px.
Components
Read src/pages/kitchen-sink.astro for the current inventory. At time of
writing:
BaseLayout— every page starts here. Takestitleanddescription.Hero— one per page, at the top.headlineplus optionalstandfirst.Section— the main building block.title,width(content|wide),sunkto tint the background.Callout—noteorwarning. For things a reader would otherwise miss.CodeBlock—langorfilelabel.ComparisonTable—columns,rows, and a requiredcaption.Figure— wraps a diagram or screenshot, requires acaption.Steps— numbered sequence. Only when the content really is a sequence.CallToAction—primaryorsecondary.
Building something new
Only when nothing above fits. Then:
- Put it in
src/components/as a.astrofile with a typedPropsinterface and a doc comment per prop. - Style it in the component's own
<style>block, scoped, using tokens only. - Add a case to
kitchen-sink.astro. - Tell the person you added a component and why nothing existing worked.
Layout
- Running text stays within
--layout-measure(68ch). Do not widen it. - Sections handle their own vertical rhythm. Do not add margins between them.
- Test at 375px wide. Tables scroll horizontally; nothing else should.
What not to do
- No new colours outside the token file
- No page-level
<style>blocks - No decorative gradients, drop shadows, or hover animations on every card
- No all-caps eyebrow labels above headings
- No numbered markers unless the content is a sequence
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.