Seeds a design system foundation on a greenfield Bricks site, creating color palettes, spacing/typography scales, theme styles, and base classes in dependency order.
Ships in bricks. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill when bricks/get-design-context returns an empty or near-empty editable system and the user wants a real foundation before any page authoring. Fresh Bricks installs can have no saved theme style, custom scale, classes, or components. Bricks provides a default palette fallback. Create editable tokens before authoring pages.
When bricks-commit-site-foundation is available and the brief also includes a homepage and global header/footer, use that compound greenfield route instead of executing this manual sequence. This skill remains the fallback for a greenfield design-system-only task or older ability surfaces. For an existing or partial system, use bricks-design-systems to fill the requested gaps without reseeding.
If a
bricks/*ability is not available as a direct tool: first check whether it is outside the fast path and call it throughmcp-adapter-execute-abilitywithability_name: "bricks/<name>". If the dispatcher also rejects it, callbricks-list-ability-statusto check whether a site admin disabled it under Bricks > AI.
For the requested foundation, create only needed resources in dependency order. The names, palette size and scales below are defaults to adapt to the brief:
create-color-palette (named container).create-color for each brand/neutral base.generate-color-shades light + dark (+ transparent if needed).generate-scale-variables.generate-scale-variables again (same ability, different category).button, card, container, stack: referencing the new variables.Choose deliberately:
2xs, xs, s, m, l, xl, 2xl) or numeric. Pick one and use it for both spacing and typography: do not mix.brand-primary, brand-secondary, neutral, success, warning, danger is a common set. Confirm the brand has a second accent color or if one primary is enough.When the user delegated the design direction or asked for autonomous implementation, choose coherent defaults and continue without a confirmation round trip. Ask only when the naming or scale choice would conflict with supplied brand requirements or materially change an existing system.
list-color-palettes -> capture ownership
create-color-palette (name: "Brand", expectedOwnership: ownership)
-> returns palette.id and new ownership
Capture the returned palette.id and ownership. Every subsequent palette/color write
uses this paletteId and the latest returned resource ownership.
The create-color ability accepts: paletteId, light (required), dark (optional), raw (optional CSS variable reference like var(--brand-primary)), parent, type. There is no name field on individual colors: colors are identified by their CSS variable name (raw) and shown in the picker by value.
create-color (paletteId, light: "#2B6CB0", raw: "var(--brand-primary)", expectedOwnership: latestOwnership)
create-color (paletteId, light: "#ED64A6", raw: "var(--brand-secondary)", expectedOwnership: latestOwnership)
create-color (paletteId, light: "#1A202C", raw: "var(--neutral-900)", expectedOwnership: latestOwnership)
create-color (paletteId, light: "#F7FAFC", raw: "var(--neutral-100)", expectedOwnership: latestOwnership)
# ... etc for each base
After every call, replace latestOwnership with that response's ownership.
Do not fan these writes out in parallel: each append changes the palette graph.
The raw value matters: the shade generator emits var(--{baseName}-{l|d|t}-{n}) derived from the variable name in raw. If you skip raw or baseVariable, generated shades keep the same raw base value instead of creating predictable CSS variable references.
For each base color (skip pure neutrals if you're using explicit neutral-100 through neutral-900):
lightPreview = generate-color-shades (paletteId, colorId, shadeType: "light", steps: 4, save: false)
generate-color-shades (paletteId, colorId, shadeType: "light", steps: 4, save: true, expectedOwnership: lightPreview.saveOwnership)
darkPreview = generate-color-shades (paletteId, colorId, shadeType: "dark", steps: 4, save: false)
generate-color-shades (paletteId, colorId, shadeType: "dark", steps: 4, save: true, expectedOwnership: darkPreview.saveOwnership)
Pass both shadeType and steps.
Result: a ramp like brand-primary-l-1..l-4 (lighter than base) and brand-primary-d-1..d-4 (darker).
Transparent shades are opt-in: use them when you need translucent overlays (e.g. backdrop scrims). Format is brand-primary-t-1..t-N with decreasing alpha.
Both spacing and typography scale generation resolve rem values against the current
HTML font size. Determine the intended root size from the brief or existing site and
default to 100% when neither specifies one. Create a minimal root theme style before
either scale and capture its ID. Set <root-font-size> below to that value and use
the same basis for both scales.
create-theme-style (
label: "Root",
conditions: [{ main: "any" }],
settings: { typography: { typographyHtml: "<root-font-size>" } }
)
Re-read the theme style and design context before continuing.
generate-scale-variables({
category: {
id: "preview-space",
name: "Spacing",
scale: {
scaleScope: "spacing",
scaleType: "tshirt",
scaleNames: ["2xs", "xs", "s", "m", "l", "xl", "2xl", "3xl"],
prefix: "space-",
minFontSize: 16,
minScaleRatio: 1.25,
minScaleRatioSelect: 1.25,
maxFontSize: 20,
maxScaleRatio: 1.333,
maxScaleRatioSelect: 1.333,
baseline: "m"
}
},
scaleRange: { from: -3, to: 4 },
save: false
})
Output names use Bricks t-shirt steps: --space-2xs, --space-xs, --space-s, --space-m (baseline), --space-l, --space-xl, --space-2xl, --space-3xl.
scaleNames must list exactly the steps scaleRange produces, in order — eight names here for from: -3, to: 4. The builder generates one variable per scaleNames entry, and regenerateVariables() reads a variable's step from its index in that list. A short or misaligned list silently rewrites every value at the wrong step the next time the html font size or screen widths change.
Review with the user and adjust the ratios. generate-scale-variables rejects
save: true; preview with save: false, then persist the returned rows as described
below. First create or update the complete category list with
set-global-variable-categories, passing the
latest categoryOwnership as expectedOwnership and the same read's
variableOwnership as expectedVariableOwnership. Then preview by saved
categoryId and persist the returned generated rows through set-global-variables
with fresh expectedVariableOwnership and expectedCategoryOwnership. Preserve all
existing categories in the category replacement. Do not hand-author static
space-* variables.
Use generate-scale-variables with a typography category.
generate-scale-variables({
category: {
id: "preview-text",
name: "Typography",
scale: {
scaleScope: "typography",
scaleType: "tshirt",
scaleNames: ["xs", "s", "m", "l", "xl", "2xl", "3xl", "4xl"],
prefix: "text-",
minFontSize: 16,
minScaleRatio: 1.2,
minScaleRatioSelect: 1.2,
maxFontSize: 20,
maxScaleRatio: 1.333,
maxScaleRatioSelect: 1.333,
baseline: "m"
}
},
scaleRange: { from: -2, to: 5 },
save: false
})
Output names use the same t-shirt naming model: --text-xs, --text-s, --text-m, --text-l, --text-xl, --text-2xl, --text-3xl, --text-4xl.
The generator uses the same root basis established in Step 5. If that basis changed, stop and regenerate both spacing and typography scales from a fresh read.
Do not create static text-*, fs-*, or matching typography-prefix variables by hand when the category has a scale config.
As with spacing, generate-scale-variables is preview-only. Persist its exact rows
through ownership-guarded set-global-variables; do not retry save: true.
update-theme-style (
id: <root-theme-style-id>,
expectedOwnership: <fresh root theme-style itemOwnership>,
conditions: [{ main: "any" }],
settings: {
typography: {
typographyHtml: "<root-font-size>",
typographyBody: {
"font-family": "...",
"color": "var(--neutral-900)",
"font-size": "var(--text-m)"
},
typographyHeadings: {
"font-family": "...",
"color": "var(--neutral-900)"
},
typographyHeadingH1: { "font-size": "var(--text-4xl)" },
typographyHeadingH2: { "font-size": "var(--text-3xl)" }
}
}
)
Critical: conditions: [{ main: "any" }]. Use any, not entireWebsite. A theme style with no conditions is silently ignored.
If the user wants per-CPT overrides later, create a second theme style with conditions: [{ main: "postType", postType: ["product"] }]. By default, Bricks uses the highest-scoring matching theme style, so this post-type style beats the broader any style on product pages.
After tokens are in place, create the minimum viable class library:
.container: max-width + horizontal padding using --space-*..stack: vertical rhythm using --space-* gap..cluster: horizontal wrap using --space-* gap..button: padding, background var(--brand-primary), hover var(--brand-primary-d-1)..card: padding, background, border-radius, subtle shadow.Don't pre-create modifier classes (.button-lg, .button-danger). Add them when a page needs them.
Use authoritative mutation readback when it contains the complete affected resource. Otherwise run the matching read below. Render only the representative token behavior needed to verify the system:
list-color-palettes (filter to the new paletteId).list-global-variables: confirm category present and step count matches.get-theme-styles with the returned id: confirm conditions and settings round-trip.clamp() rule and computed spacing at narrow and wide viewports.background: var(--brand-primary): confirm the emitted CSS references the variable, not a hardcoded hex.If the read doesn't match what you wrote, stop and surface the discrepancy to the user: don't keep building on a broken foundation.
Use this only for fully fresh installs. If get-design-context returns partial state (e.g. two colors and a half-built scale), do not wipe and re-seed. Instead:
create-color-palette, update-color-palette (rename), delete-color-palette: palette CRUD.create-color, update-color, delete-color: single color CRUD.generate-color-shades: auto-derive light/dark/transparent ramps.set-global-variables (ownership-guarded upsert) and
delete-global-variable: variable CRUD; category replacement is separate.generate-scale-variables: fluid scale generator.list-theme-styles, get-theme-styles, create-theme-style, update-theme-style: theme style CRUD.list-global-classes, create-global-class, update-global-class: class CRUD.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/bricks:bricks-seed-design-systemfrom bricks
npx claudepluginhub codeerhq/bricks-skills --plugin bricks46 skills in this plugin
/bricks-agent-repositoryHandle complex existing-site Bricks edits through advertised repository/workspace workflows when focused abilities cannot express the change./bricks-ai-tabDiagnose Bricks AI connection setup, ability toggles, dispatcher availability and disabled actions. Use for connection/availability problems./bricks-audit-design-systemAudit Bricks classes, variables, palettes and components, or carry out requested cleanup. Report-only audits do not authorize fixes.Other plugins' skills for the same job