/pigment:designing-pigment-framesfrom Pigment
Applies Pigment's visual design system (colors, typography, spacing, motion tokens) to new or existing Frames via CSS variables and base stylesheet. Use when a Frame should look native to Pigment rather than generic.
Ships in Pigment. 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.
Read when SKILL.md points to them.
Give a Frame, new or existing, the visual language of the Pigment platform. You tend to converge toward generic, "on distribution" output, which users find off-putting. The reference files here exist so that you do not have to invent anything.
Use this skill when the Pigment design is needed: the user asks for a Frame that looks native to Pigment, or gives no other design requirements. Do not use it when the user gives their own brand, palette, screenshots or a look to match. Follow the user's design instead.
Always start with the base stylesheet: the contents of
references/styles/stylesheet.md in the
styles section. It gives the Frame Pigment's color, spacing, radius and motion
tokens as CSS variables, so the Frame does not look generic. Type styles and every component's own
CSS come from their own recipe file, in the design passes.
A Frame body is one pure-JS file, not an HTML document: the host loads it as a script into #app
in a sandboxed iframe (allow-scripts, opaque origin). There is no <body>, no <head> you author,
no second file, and no network — so no Google Fonts, no <link>, no @import. The JS creates every
style itself.
Emit the base stylesheet once, into one marked block — this is the token file only, not any component's CSS:
// SECTION: styles
const style = document.getElementById('pg-styles') || document.createElement('style');
style.id = 'pg-styles';
style.textContent = `
/* stylesheet.md, verbatim — never re-encoded, never subset by hand */
`;
document.head.appendChild(style);
root.style.cssText =
'position:fixed;inset:0;width:100%;height:100%;overflow:auto;' +
'font-family:var(--font-sans);-webkit-font-smoothing:antialiased;background:var(--color-white);';
// SECTION: styles end
The id lookup makes the block idempotent, so a hot reload does not stack a second sheet. A template
literal is right here despite the build skill's advice against them: the CSS holds no backtick and
no ${, and the alternative is tens of thousands of escaped characters.
Every later pass appends to this same block with a targeted tool:edit_file call — paste the CSS
straight out of whichever recipe file that pass opened, right before the closing `. Never
rewrite the whole block: a Frame only ships CSS for the components it actually uses.
Change styles with targeted tool:edit_file calls against this block. prefer to read Frame code in small batches when reading style content. Also prefer to edit it in small incremental edits.
Run these in order, pushing the file with tool:update_frame after each one so the user sees the
result. Each pass ends with its own checks. Fixing a fault in pass 1 is cheap;
finding the same fault in a finished artifact is not.
Every reference file is small and single-purpose. Open only what the pass in front of you needs
— never the whole references/ tree. There is no index file to read first; this table is the index.
Three kinds of file live under references/:
foundations/ — the rules: which color, which type style, which spacing, which radius.design-system/ and patterns/ — copy-pasteable recipes for one component or composition,
markup and CSS together.styles/stylesheet.md — every design token as a CSS variable
(colors, spacing, radius, shadows, motion, breakpoints), and nothing component-specific. This is
the single source of truth for those values, and the only file you emit whole.Prefer a recipe over deriving a look from the foundation tables: re-deriving by hand is where weight, sizing and motion violations creep in.
Before pass 1, once: foundations/overview.md for what the
system is, and foundations/one-off-interfaces.md for
the starting shape of the page type you are building (dashboard, form, report, infographic).
| Need | File |
|---|---|
| The stylesheet you emit | styles/stylesheet.md |
| Which type style goes where, and the weight rules | foundations/typography.md |
| Copy-paste type classes, if you need one on its own | design-system/typography.md |
| Need | File |
|---|---|
| 4px grid, page canvas, safe area, row/column composition, widget grid | foundations/layout-and-spacing.md |
| Page title row | patterns/page-headers.md |
| Section titles | patterns/section-headers.md |
| Page background | patterns/gradient-backgrounds.md |
Open foundations/depth-radius-motion.md once for
this pass — it carries the surface idiom, radius and motion rules that every component needs — then
one component file at a time:
| Styling | File |
|---|---|
| Cards, KPI tiles, widget surfaces | design-system/cards.md |
| Buttons | design-system/buttons.md |
| Icon-only actions | design-system/icon-buttons.md |
| Pill toggles, filter pills, button groups | design-system/toggle-buttons.md |
| Fieldsets, text inputs, search, selects | design-system/inputs.md |
| Status chips, tags, chart legends | design-system/chips.md |
| List rows | design-system/lists.md |
| Avatars | design-system/avatars.md |
| Tooltips | design-system/tooltips.md |
| Table header, filter row, table surface and rows | patterns/table-headers.md |
| Checkbox, radio, switch, segmented toggle, slider, tabs, modal, toast, badge, icons | design-system/spec-only-components.md |
Add foundations/colors.md when the component carries color you
have to choose: a status chip or banner, a chart series, a per-entity categorical color, or an
editorial gradient.
| Need | File |
|---|---|
| The whole-output rules | foundations/dos-and-donts.md |
The audit checklist below is in this file — you do not need to open anything to run it.
-regular and
-heavy or picking another style — not with <strong>.animation-delay)
delights more than scattered micro-interactions.The reference files will not have every component you need. When you must build one, do not derive its look from token tables in isolation. Run it through these questions first, in order:
Is this content, an action, or a status?
<div> to look clickable outside these two components.10-bg/90-text semantic pairing. Never a bare
colored dot or unpaired color.What's its surface idiom: bordered, filled or elevated?
Pick one, not multiple. Default to bordered (white + 1px border, no shadow) unless the component
needs to read as "floating" or "clickable-and-lifts," in which case use elevated (no border,
shadows.card → shadows.cardHover). This single decision resolves most "does this need a
shadow" uncertainty.
What's its density tier — and which role does each number play? Don't treat a tier as "a range to pick a number from." Each spacing token is tied to a specific structural role — gap between sibling elements, or padding/gutter inside a container — and you use whichever discrete value matches the role, not anything in between. The grid only has fixed stops (4/8/12/16/24/32/48px); there's no legal 18px or 20px.
8px (icon-to-text, tight list-row internals) · padding: 12px (table-row
vertical padding, compact card interior). Use for anything that repeats many times on screen at
once — table rows, dense list items — where legibility-at-scale trades off against breathing room.16px (space between two related-but-distinct elements: a label and its
field, two buttons in a row) · padding: 24px (a card's interior, or the page gutter — space
between a container's border and its content, or between content and the page edge). This is the
default for most non-repeating surfaces: a card, a form section, a panel.32px (separating unrelated blocks) · padding: 48px (empty-state
interior). Rare and deliberate — hero moments, empty states, report covers — not everyday UI.
Decide the tier first using the repetition-count heuristic above, then within that tier ask "is
this space between two elements, or space inside a container around its content?" — that
answer picks the specific number.Is it primary or supporting in its context?
Only one element per page/section gets the strongest visual weight (primary button, primary-50
accent, heaviest available type). Everything else defaults to secondary/ghost treatments or
text-secondary color. If two things in your new component both feel like they need emphasis,
that's a sign the component's information hierarchy isn't resolved yet — fix the hierarchy, don't
give both of them a strong style.
Before finalizing: name its closest relative.
State explicitly which existing references/design-system component or references/patterns
pattern this new one is closest to (e.g. "this notification-rail item is closest to a list-item
row + status chip"), and inherit that relative's spacing/radius/border values by default. Only
deviate if you can point to a specific reason in one of the references/foundations files. Never
deviate without reasoning.
The audit is mandatory and blocking, not optional feedback for when the user asks. Each pass ends with its own checks, run against what that pass produced. If any box fails, fix it before moving on — do not describe the fix, apply it.
--font-sans (sans-serif) for text and --font-mono (monospace)
for code and formulas. The bare generics are the whole stack: name no family, and add no
system-font fallback such as -apple-system or 'Segoe UI'. The skill bundles no face on
purpose, so every viewer gets the same platform generic and the rendering stays predictable.font-weight in your output. Only 600 on an element styled as
section-title is allowed. Everything else must be 400 or 500. No 700, no bold, no
<strong>.@font-face — there must be none, because the skill
bundles no face to embed. Grep for fonts.googleapis / <link font references and confirm
there are none either: the sandbox has no network, so a fetched font can only fail.px value used for sizing/spacing (widths, heights, padding, gap,
margin, border-radius). Each must be a multiple of 4 (exceptions only allowed for the
documented cases).Re-run the pass 1 type greps and the pass 2 grid grep over the CSS this pass added, then:
transition and animation. Only 150ms ease-in (snappy) and
200ms ease-in-out (soft) durations/easings are allowed as the curve itself. animation-delay
offsets for stagger are fine; a third distinct duration+easing pair is not.-10 shade as
background with the -90 shade as text — never -50 as text-on-light or as a large fill.4px (or 6px for modals); round
markers/avatars/pills = fully circular. Nothing in between.24px horizontal gap between cells, not per-cell
horizontal padding (12px vertical padding is correct).references/design-system
has that exact component. If yes and your CSS differs from it, that difference is a bug unless
justified.class="..." value
referenced in the generated markup/JS must have a matching CSS rule shipped in the output. A
class used but never defined fails silently. Extract every class name used in the markup,
extract every class name defined in the CSS, and diff them: anything used-but-not-defined is a
bug.min-height, never a capped height with overflow: hidden — confirm content taller than one
viewport isn't clipped and the trailing 36px is reachable by scrolling to the true bottom.card-header-row kicker is not a
substitute for this. That header sits 12px above its content (a table header above its table
is the same rule), and unrelated sections are separated by 48px.references/design-system/avatars.md (opens in a new tab)references/design-system/buttons.md (opens in a new tab)references/design-system/cards.md (opens in a new tab)references/design-system/chips.md (opens in a new tab)references/design-system/icon-buttons.md (opens in a new tab)references/design-system/inputs.md (opens in a new tab)references/design-system/lists.md (opens in a new tab)references/design-system/spec-only-components.md (opens in a new tab)references/design-system/toggle-buttons.md (opens in a new tab)references/design-system/tooltips.md (opens in a new tab)references/design-system/typography.md (opens in a new tab)references/foundations/colors.md (opens in a new tab)references/foundations/depth-radius-motion.md (opens in a new tab)references/foundations/dos-and-donts.md (opens in a new tab)references/foundations/layout-and-spacing.md (opens in a new tab)references/foundations/one-off-interfaces.md (opens in a new tab)references/foundations/overview.md (opens in a new tab)references/foundations/typography.md (opens in a new tab)references/patterns/gradient-backgrounds.md (opens in a new tab)references/patterns/page-headers.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
39 skills in this plugin
/aggregating-view-dataExecution skill. Use when a View needs totals or subtotals, when a value must roll up with something other than Sum (average, min, max, count, last), when a snapshot metric adds up across time instead of holding, or when a ratio, percentage, margin, growth or variance metric is added to a Table View or shows a wrong total (e.g. a row for margin as a percent of revenue). Covers metric default aggregators, pivot versus hidden-dimension aggregation, the aggregator reference per value type, and Advanced Aggregators on Table Views./architecting-multi-application-solutionsPlanning skill. Use when deciding how to split work across Pigment applications, designing Hub-and-spoke data flows, or planning Test & Deploy across environments./auditing-a-pigment-applicationExecution skill. Use when auditing, reviewing, or health-checking a Pigment application. Covers the structured audit checklist, severity classification, and output format. Also triggers on requests to clean up, find unused blocks, assess model quality, or find what is wrong with an application./building-a-full-applicationPlanning skill. Use when building a complete Pigment application from scratch or when the request spans multiple modeling phases. This skill, together with any other planning skill the request calls for, is sufficient to produce the full architecture spec; do not load execution skills until the spec is approved and you begin building blocks./building-pigment-framesUse this skill whenever you're building, updating, or troubleshooting a Pigment Frame — a full-page, custom-coded visualisation (JavaScript, canvas, or inline SVG) that reads Pigment data through the PigmentSDK. Reach for it any time a native View (Grid, Chart, KPI) or Board can't produce what's being asked for - a bespoke chart, a custom canvas drawing, an interactive widget, or a standalone page in the left navigation that behaves like a small app. Also use it if a Frame you've already built shows up blank or broken and needs debugging./building-versions-and-planning-cyclesExecution skill. Use when implementing versions, planning cycles, or actuals vs forecast separation, and whenever realized data is extended into a plan or budget — loading actuals then planning the remaining periods, forecasting forward from actuals, Actual/Budget/Plan layering, plan vs actual variance — even when the request never uses the word version. Covers Version Dimensions, Switchover patterns, Actual/Forecast layering, Native Scenarios, and Snapshots.Other plugins' skills for the same job
npx claudepluginhub gopigment/ai-plugins --plugin pigment