/utopia-design:tokensfrom Utopia Design
Edit or rebrand a consumer app's design/tokens.json - the DTCG design-tokens document that is the single source of truth for the Utopia Design Protocol on top of utopia_ui. Applies when: bootstrapping design/tokens.json from the packaged utopia_ui default theme; changing theme colors, the spacing/radius scale (rescaling the base unit x), typography (textStyle roles and their textStyle-colors siblings), or semantic theme.* slots; running validate_tokens after an edit. Without utopia_ui resolved it stops at its usage gate and surfaces install guidance. Does NOT cover regenerating the Flutter theme or the HTML twin (-> utopia-design:sync), importing external design sources (Figma exports, foreign tokens.css / Tailwind @theme files, handoff bundles) (-> utopia-design:import), building screens from a design (-> utopia-design:screen), or editing utopia_ui library internals. Layered on the upstream utopia-hooks plugin - silent on Screen/State/View, hooks, and Dart conventions.
Ships in Utopia Design. 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.
The Utopia Design Protocol keeps one artifact as the single source of truth
for an app's visual theme: design/tokens.json, a
DTCG document. The
Flutter theme (UtopiaThemeData) and the HTML twin's CSS are both
generated from it - this skill owns editing that one file; it does not
own the generation step or anything downstream of it. See the frontmatter
description above for the exact positive/negative boundary.
Before touching anything, confirm the project actually resolves utopia_ui:
pubspec.yaml declares utopia_ui: directly, or pubspec.lock resolves it
transitively. This mirrors the plugin's own SessionStart / PostToolUse
hook gate - the protocol is meaningless without the library present.
flutter pub add utopia_ui
flutter pub get
Only proceed with the rest of this skill once the project resolves the
package.This is the first-hour make-or-break step - do it before any other edit.
If design/tokens.json does not exist yet, create it by copying the
packaged default theme from the resolved utopia_ui pub cache: read
.dart_tool/package_config.json to find utopia_ui's rootUri, then copy
<root>/tokens/utopia.tokens.json to design/tokens.json. Once it exists,
it is consumer-owned - a package upgrade never overwrites it (SPEC.md
section 1) - so this step runs at most once per project.
The exact resolution + copy commands are in getting-started.md - read that before bootstrapping, don't guess the pub-cache path.
Where SPEC.md / VERSIONING.md live: the protocol documents ship inside
the utopia_ui package under protocol/ (hence the protocol/SPEC.md
citations), alongside the protocol/schemas/ the validators check against.
Resolve the installed copy the same way this skill resolves every packaged
artifact: read .dart_tool/package_config.json for utopia_ui's rootUri
(snippet in getting-started.md), then open
<root>/protocol/. If it does not resolve, treat every SPEC.md /
VERSIONING.md citation in this skill as background rationale and continue -
never block on the missing file.
design/tokens.json for the first time in a project that
resolves utopia_uitheme.* semantic slotsvalidate_tokens after any of the abovetokens.css /
Tailwind @theme, a handoff bundle, a DESIGN.md) -> use
utopia-design:import first, then this skill's edit looputopia_ui library internals - this skill only ever touches the
consumer's design/tokens.json| Priority | Reference | Impact | Description |
|---|---|---|---|
| 1 | getting-started.md | CRITICAL | The first-hour flow: usage gate, resolving packaged artifacts via .dart_tool/package_config.json, bootstrapping design/tokens.json, the edit -> validate -> regenerate loop |
| 2 | token-profile.md | CRITICAL | The closed canonical tree - every valid path, $type, and constraint; the color.* group; the typography wrinkle; the io.utopiasoft.design extension namespace |
| 3 | rebranding.md | HIGH | Why-first rules for editing values safely: colors, the x rescale + derivation, theme.* aliases vs literals, textStyle siblings, extension round-trip |
| 4 | validation.md | HIGH | The validate_tokens CLI contract, the five validation gates, profileVersion compatibility, hook vs CLI |
utopia_ui resolves before editing anything (the usage gate
above) - there is nothing to rebrand without the library.design/tokens.json is consumer-owned. A package upgrade never
overwrites it (SPEC.md section 1); don't regenerate or reset it as part of
an unrelated upgrade.., {, } or start with $. Dotted
identifiers like spacing.md are reference paths expressed as nested JSON
groups, not literal token names.$extensions["io.utopiasoft.design"].derivation
as "x*<n>" and MUST satisfy value == x * n. Rebranding x means
re-deriving every derivation-carrying token, not just x itself
(SPEC.md 2.5; see rebranding.md).textStyle.<role> has a sibling textStyle-colors.<role> and
records the binding via colorToken (SPEC.md 2.4).$extensions MUST round-trip. Never drop unknown extension data -
including foreign vendor namespaces - on an edit (SPEC.md 2.1, 2.6).validate_tokens after any edit. Never hand-edit generated theme
Dart or twin CSS - those are regenerated by utopia-design:sync.$extensions["io.utopiasoft.design"].profileVersion at the
document root in sync with the protocol version the document targets
(VERSIONING.md).After any edit to design/tokens.json, verify:
derivation-carrying token still satisfies value == x * n.textStyle.<role> still has its textStyle-colors.<role> sibling,
with colorToken pointing at it.hex still matches its components.$extensions data - including anything this skill doesn't recognize - is
preserved.validate_tokens passes (or every reported finding has been addressed).profileVersion is set at the document root.Built on utopia_ui and the Utopia Design Protocol, by UtopiaSoftware.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub utopia-uss/utopia-flutter-skills --plugin utopia-design5 skills in this plugin
/componentTurn a reported component GAP (or any need for a custom component) into a LIVE manifest id: scaffold it from utopia_ui primitives, write its overlay YAML (design/overlay/<local-part>.yaml), regenerate the project + merged manifests (generate_manifest), validate, and hand back the namespaced id. Applies when: scaffolding a custom component, registering one in the project manifest, making something reusable, turning a utopia-design:screen gap report's component-spec seed into a live id. Without utopia_ui resolved it stops at its usage gate and surfaces install guidance. Does NOT cover deciding whether something is a gap, or building screens (-> utopia-design:screen); editing design/tokens.json (-> utopia-design:tokens); regenerating the theme or the HTML twin (-> utopia-design:sync); widget-authoring and state conventions (-> utopia-hooks); or contributing it UPSTREAM into utopia_ui. Layered on the upstream utopia-hooks plugin - silent on Screen/State/View, hooks, and Dart conventions.
/importBring an external design source into a utopia_ui project's design/tokens.json: a Figma DTCG export, a foreign tokens.css / Tailwind @theme, a Claude Design handoff bundle, or a DESIGN.md. Applies when: identifying the source type and parsing its values; mapping them onto the closed utopia token tree; showing a proposal and diff before any write, then applying via the tokens skill's edit loop; reporting unmapped external tokens or uncovered utopia slots as gaps; running a re-import 3-way diff against already-synced values. Without utopia_ui resolved it stops at its usage gate and surfaces install guidance. Does NOT cover hand-editing design/tokens.json with no external source (-> utopia-design:tokens), regenerating the theme or the HTML twin (-> utopia-design:sync), building screens (-> utopia-design:screen), or a Figma write-API sync (out of scope; Figma only via DTCG export). Layered on the upstream utopia-hooks plugin - silent on Screen/State/View, hooks, and Dart conventions.
/screenBuild or update a Flutter screen from an outside design input using ONLY components from the utopia_ui component manifest (the merged manifest when the project registers custom components). Applies when: implementing or recreating an HTML mockup, a screenshot, a handoff bundle, a DESIGN.md, or the packaged HTML twin gallery; deciding which utopia_ui component a design element maps to; reporting an unmappable element as a gap instead of hand-rolling it. Without utopia_ui resolved it stops at its usage gate and surfaces install guidance. Does NOT cover editing design/tokens.json (-> utopia-design:tokens); importing external design VALUES such as colors or spacing (-> utopia-design:import - VALUES onto tokens there, STRUCTURE onto components here); regenerating the theme or the HTML twin (-> utopia-design:sync); or state management, screen scaffolding, navigation (-> utopia-hooks). Layered on the upstream utopia-hooks plugin - silent on Screen/State/View, hooks, and Dart conventions.
/syncRegenerate every generated surface of the Utopia Design Protocol from design/tokens.json after it changes: the Flutter theme code (generate_theme) and the HTML twin (generate_twin: tokens.css, tokens.tailwind.css, DESIGN.md front matter, and gallery.html when the twin composes one). Runs validate_tokens first and never regenerates from a failing token document; runs a packageVersion drift check (validate_manifest); optionally runs validate_twin after. Applies when: design/tokens.json was just edited or imported and the surfaces need to catch up. Without utopia_ui resolved it stops at its usage gate and surfaces install guidance. Does NOT cover editing or rebranding design/tokens.json itself (-> utopia-design:tokens), importing an external design source (-> utopia-design:import), building screens (-> utopia-design:screen), or hand-editing the generated theme Dart or twin CSS (regenerated, never hand-patched). Layered on the upstream utopia-hooks plugin - silent on Screen/State/View, hooks, and Dart conventions.