agentleFS
a-ng-da-ng-d/claude-ui-color-palette/skills/ui-color-palette-build-color-system/SKILL.md

ui-color-palette-build-color-system

Skill1 starsChanged 8 months agoMITView on GitHub

Define a semantic color system taxonomy and resolve bindings against a palette using get_color_system. Use when the user wants to map semantic token names (role, prominence, state…) to primitive color shades. Produces a SystemData object for use in semantic code generation or design tool deployment.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the ui-color-palette MCP tool get_color_system to resolve a semantic token taxonomy against a generated palette and produce a …

    line 9
  2. Distinctive:

    Before asking any questions, check the conversation context for existing slots.

    line 17
  3. Distinctive:

    Do not call the tool until all required answers are collected.

    line 35
  4. Distinctive:

    Ask what to do next:

    line 162
  5. Very specific:

    source of truth for shade stops and color ids: always read from the primitive palette (PaletteData or base config).

    line 185

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Build Color System

Use the ui-color-palette MCP tool get_color_system to resolve a semantic token taxonomy against a generated palette and produce a SystemData object.

Semantic code export from the system is handled by ui-color-palette-generate-semantic-code.


Pre-flight — Check session state

Before asking any questions, check the conversation context for existing slots.

If SystemData is already in context

Show a summary (token count, bound / unbound / excluded). Ask: reuse, rebuild, or adjust bindings.

If SystemConfiguration is already in context

Skip Step 0. Call get_color_system directly with the existing base, themes, and system values.

If PaletteData or base + themes are already in context

Skip the palette questions in Step 0.


Step 0 — Gather parameters

Do not call the tool until all required answers are collected.

Required

1. Palette inputs — confirm base and themes are available. If not, run ui-color-palette-scale-palette first.

2. Taxonomy groups — ask for the semantic dimensions that structure the token names.

Each group has an id, a name, and members (each with id and name). The system generates the cartesian product of all groups: 2 groups × 3 members each = 6 tokens; 3 groups × 3 members = 27 tokens.

Common patterns:

PatternGroupsTypical members
Role × Staterole, statebrand / neutral / danger ; default / hover / active / disabled
Role × Prominence × Staterole, prominence, state— ; default / subtle / strong ; —
Surface × Contentsurface, contentbackground / border ; primary / secondary / inverse

3. Theme strategy — before defining bindings, confirm which strategy the user wants:

StrategyDescriptionoverrides in bindings
A — Primitive modes (recommended)Themes handled at the primitive level. Semantic tokens use a single binding. get_palette already carries the correct per-theme values at each shade stop.Almost never — only for deliberate per-theme shade deviations
B — Semantic modesThemes handled at the semantic level. Each token has an explicit binding per theme via overrides. Semantic variable collection has one mode per theme.Expected on most tokens that differ across themes

Record the strategy before defining bindings. It determines the binding format and how the semantic collection will be structured in design tools.

4. Bindings (iterative — start with the most important ones) — map token paths to primitive shade refs.

Format: [memberId, memberId, …] → colorId:shadeName (e.g. [brand, default] → blue:500).

Optional per-binding fields:

FieldDescription
descriptionOptional label for the token
overridesPer-theme alternative ref: { themeId: "colorId:shadeName" } — use for Strategy B, or for deliberate deviations in Strategy A
isExcludedtrue → token stays in SystemData but is skipped during code generation

Step 1 — Call get_color_system

Tool: get_color_system

ParameterTypeRequiredDescription
baseobjectYesBaseConfiguration — same schema as get_palette
themesarrayYesArray of ThemeConfiguration objects
systemobjectYesSystemConfiguration — schema + optional bindings

system.schema

FieldTypeDescription
groupsarrayOrdered list of taxonomy groups (order defines the path depth)

Each group:

FieldTypeDescription
idstringGroup identifier (e.g. "role")
namestringDisplay name (e.g. "Role")
membersarrayList of { id: string, name: string }

system.bindings (optional)

Each binding:

FieldTypeDescription
pathstring[]Ordered member ids (one per group), e.g. ["brand", "default"]
descriptionstringOptional token description
refstringDefault primitive ref: "colorId:shadeName" (e.g. "blue:500")
overridesRecord<string, string>Per-theme overrides: { themeId: "colorId:shadeName" }
isExcludedbooleantrue → present in SystemData, excluded from code generation

Returns: a SystemData object with schema, tokens, and type: "system".

Each token in tokens:

FieldDescription
pathMember id path (e.g. ["brand", "default"])
pathNamesDisplay name path (e.g. ["Brand", "Default"])
descriptionOptional description from the binding
isExcludedWhether excluded from code generation
refs{ themeId, shadeId }[] — shadeId is "themeId:colorId:shadeName" or null if unbound

Step 2 — Display the token matrix

After calling get_color_system, produce a readable token matrix. Do not display raw SystemData JSON. Store the raw response opaquely as the SystemData slot — never read, print, or reason from the raw object. The only purpose of SystemData is to be passed as-is to downstream tools (semantic code generation, design tool deployment).

Format — one row per token, one column per theme:

Token                           | Light              | Dark
--------------------------------|--------------------|--------------------
brand / default                 | blue:500           | blue:400
brand / subtle                  | blue:200           | blue:700
neutral / default               | slate:600          | slate:300
neutral / subtle                | — unbound —        | — unbound —
neutral / disabled   [excluded] | —                  | —

Legend:

  • colorId:shadeName → resolved ref for this theme
  • — unbound — → no binding or ref not found in palette
  • [excluded] → binding has isExcluded: true

Finish with a one-line summary: e.g. 12 tokens — 9 bound, 2 unbound, 1 excluded.


Workflow

  1. Confirm base and themes are available (from context or ui-color-palette-scale-palette).
  2. Gather taxonomy groups and members from the user.
  3. Choose theme strategy — ask before defining bindings:
    • Strategy A — Primitive modes: single binding per token, no overrides. get_palette carries per-theme values at the primitive level.
    • Strategy B — Semantic modes: explicit overrides per theme. Semantic collection has one mode per theme in the design tool.
  4. Gather bindings (iterative — start with a subset, refine after preview).
  5. Call get_color_system.
  6. Session state: store result as SystemData slot, store the input system config as SystemConfiguration slot. Also record the chosen strategy (A or B) — it is needed by deploy steps.
  7. Display the token matrix.
  8. Ask what to do next:
    • Adjust bindings — add, change, or exclude specific tokens, then rebuild
    • Generate semantic code → ui-color-palette-generate-semantic-code
    • Export to Figma as a semantic variable collection → ui-color-palette-figma — pass strategy: A = single flat mode on the semantic collection; B = one mode per theme on the semantic collection.
    • Export to Penpot as semantic token sets → ui-color-palette-penpot — pass strategy: A = single flat set (systemName); B = one set per theme (systemName/themeName).
    • Export to Sketch as semantic swatches → ui-color-palette-sketch — one swatch per theme per token, names encode systemName/themeName/tokenPath.
    • Export to Framer as semantic color styles → ui-color-palette-framer — first theme maps to light, second to dark.

Arguments

$ARGUMENTS can describe the taxonomy structure or the project context.

  • /ui-color-palette:build-color-system role × state for a design system
  • /ui-color-palette:build-color-system brand + neutral × prominence × interaction

Tips

  • ref format: colorId is the color's id field from PaletteData, not its display name.
  • partial bindings are fine: unbound tokens appear in SystemData with shadeId: null. They show as — unbound — in the matrix.
  • isExcluded vs unbound: isExcluded is an explicit design decision (token exists but is intentionally disabled); unbound is a missing binding.
  • overrides vs primitive cascade: get_palette resolves all theme variations at the primitive level — the same shade ref is correct for all themes. Do not add shade-index overrides unless a token intentionally requires a different shade index in a specific theme.
  • source of truth for shade stops and color ids: always read from the primitive palette (PaletteData or base config). Never assume shade names.

Recommended subagents

  • palette-color-systemer — guided color system design: pattern suggestion, intelligent binding proposals, iterative refinement, get_color_system submission. Use this instead of running the skill manually when the user needs step-by-step guidance.
  • uicper — orchestrates the full source → palette → system → deploy workflow
  • palette-codegen — generates semantic code files from base + themes + system

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.