brand-ui-update-theme
Use when an existing brand-ui theme family should be improved from new material — updated brand guidelines, a new logo, product screenshots, a live site, feedback like "the green is off" or "match their new design system" — e.g. "update the qlik theme with these links", "refresh our theme from the new brand book", "/update-theme". For a brand with no theme yet, use brand-ui-create-theme.
- License 许可
- MIT
- 最近更新
- 2026-10-07
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- brand-ui-update-theme
- description
- Use when an existing brand-ui theme family should be improved from new material — updated brand guidelines, a new logo, product screenshots, a live site, feedback like "the green is off" or "match their new design system" — e.g. "update the qlik theme with these links", "refresh our theme from the new brand book", "/update-theme". For a brand with no theme yet, use brand-ui-create-theme.
- allowed-tools
- [ "WebSearch", "WebFetch", "Bash(node *theme-kit.mjs *)", "Bash(curl -sL *)", "Bash(pnpm check *)", "Bash(pnpm gen)" ]
- argument-hint
- <existing family> [links, file paths, what should change]
- user-invocable
- true
03 SKILL.md 正文
brand-ui-update-theme
Enhance an existing theme family from the resources the person provides — a per-token diff, each change sourced, approved before anything is edited.
REQUIRED: read the brand-ui-create-theme skill's reference/research.md and
reference/proposal.md (sibling skill directory). This skill uses the same research method,
proposal format and kit — <kit> is the absolute path of
../brand-ui-create-theme/scripts/theme-kit.mjs relative to this skill's directory.
The contract
- The existing family is the baseline. A token changes only when a source supports the change or the person asked for it. "Could be nicer" is not a source.
- Every change shows current → proposed, a source and a confidence.
- Nothing in the family is edited before the person approves the diff.
- The result passes
node <kit> audit(and in the brand-ui source repo,pnpm check --rule community-themes).
Steps
1 · Read the family as it is
Locate it: themes/<slug>/ in the brand-ui source repo, the app's theme folder otherwise.
Read every file: <slug>-light.css / <slug>-dark.css, <slug>-fonts.css, theme.ts, the
README. The README's source table is the old ledger — carry its rows forward, don't
re-derive what was already measured unless the new material contradicts it.
Run node <kit> audit on the current stylesheets first so pre-existing failures are
reported as pre-existing, not as regressions of your change.
2 · Research the new material
reference/research.md, restricted to what the person pointed at plus what it takes to
confirm it (e.g. the new guideline names a colour — check the live product uses it). New
sources get new ledger ids after the old ones.
3 · Decide the diff
For each token the new material touches, one of:
| Outcome | When |
|---|---|
| change | a source states a different value, or the person asked |
| keep, note conflict | the new source disagrees with a measured value — ask |
| change derived tokens with it | a changed primary moves its hover/pressed/ring/sidebar-primary too |
Include each changed token in proposal.json with "current" set to its value in the
family today, "mode": "update". Font changes follow reference/research.md §5. A logo is
never one of them: the logo tokens stay initial (research §4), and an existing family that
still pins logo art is fixed by resetting those tokens to initial in this pass.
4 · Draft, audit, propose — then stop
node <kit> apply --base <family>/<slug>-light.css --name <slug>-light --scheme light \
--proposal proposal.json --out <scratch>/<slug>-light.css
node <kit> audit <scratch>/<slug>-light.css <scratch>/<slug>-dark.css
node <kit> proposal proposal.json --draft light=<scratch>/<slug>-light.css \
--draft dark=<scratch>/<slug>-dark.css --out <scratch>/<slug>-update.html
Present as reference/proposal.md "Presenting it" describes, leading with how many tokens
change per mode, and ask Approve and write it / Change something / Cancel.
5 · Write (only after Approve)
- Replace the family's stylesheets with the approved drafts. With the family's own
stylesheet as
--base, the kit edits values in place, so its comments survive. - Update the README: the "reproduces" table rows and the source ledger for every changed value; keep untouched rows.
- Font changes: update the tokens in both modes, the fonts file and licence file.
- Verify:
node <kit> audit …; in the brand-ui source repo alsopnpm check --rule community-themesandpnpm gen. Read the counts, not only the exit code.
Report
How many tokens changed and the three most visible changes, in plain words; what was kept despite new material and why; open questions; under Problems every failed source and any pre-existing audit failure you did not fix.
Common mistakes
| Mistake | Instead |
|---|---|
| Re-generating the whole family from scratch | Base the drafts on the family's own stylesheets |
| Changing tokens the new material never mentions | Leave them; only sourced or requested changes |
Changing --primary but not its hover/ring/sidebar |
Move the derived tokens with it, marked derived |
| Dropping the old README ledger | Carry old rows forward; add new sources after them |
| Blaming a pre-existing contrast failure on the update | Audit the family before changing it |
04 同仓库更多 Skills
brand-ui
Build UI with the brand-ui component system (@elabs-ai/components-* packages — ui, data, ai, flow, maps, charts, marketing, editor, viewer, terminal, tokens, icons). Use when working in a project that depends on @elabs-ai/components-ui or any @elabs-ai/components-* package, when adding/composing components, building dashboards, data tables, AI/chat surfaces, React Flow canvases, MapLibre maps, code editors, file/document viewers, app shells, forms, or marketing sections, when theming with the token system, or when the user mentions brand-ui, @brand, light/dark themes, or "our design system". Provides live project context, the real component API, composition patterns, and the rules that keep components token-driven, accessible, and theme-safe.
brand-ui-theme
Create or retune a brand-ui theme (token work). Use when adding a new theme, re-branding the system to a customer's palette, adjusting global radius/spacing/surfaces, or fixing token-level contrast across themes. Use when the user says "new theme", "brand it for <customer>", "make corners less rounded", "dark theme", "adjust the tokens", or "our colors". Every change is a token in a theme stylesheet — never a hardcoded value in a component.
brand-ui-start
The front door for building UI with brand-ui — a router/concierge that asks what you want to do and hands you to the right flow. Use when someone is starting out and unsure where to begin ("help me with brand-ui", "where do I start", "I want to build something", "what can brand-ui do", "get me going"), or types /brand-ui-start. Routes to three flows — build a NEW app (brand-ui-new-app), improve/migrate an EXISTING app (brand-ui-migrate), or just help me USE brand-ui in an app that already has it (brand-ui). If the intent is already obvious (the person said "build me a dashboard" or "audit this screen"), skip the question and go straight to that flow.
brand-ui-registry
Curate the brand-ui shadcn-compatible registry (maintainer workflow). Use when deciding whether something belongs as an imported @elabs-ai/components-* primitive vs a copy-own registry block/template, when adding or editing a registry item, or when validating/building the registry for distribution. Use when the user says "add a registry item", "make this a block", "publish to the registry", or "package vs registry". For consuming registry items in an app, use the `brand-ui` skill (npx shadcn add).
brand-ui-new-app
Define-to-build — scaffold a new brand-ui app from a plain-language description (VP-02). Use when the user wants to START an app, page, or demo ("build me a sales dashboard", "I need an admin console for X", "new app", "scaffold a chat assistant", "create a landing page for a pitch") rather than add to an existing one. Runs a staged interview (quick 3-question mode or full 7-stage spec mode), writes an app-spec.md, then scaffolds from the matching template + playbook with every wiring point annotated and a starter CLAUDE.md so later agent sessions stay on-brand. For adding components to an existing app use `brand-ui`; for authoring library components use `brand-ui-component`.
brand-ui-migrate
Bring an app that already exists onto brand-ui (@elabs-ai/components-*). Use when someone wants to migrate, port, adopt or "move to" the design system in a codebase they already have ("migrate this project to brand-ui", "we use MUI, can we switch", "adopt your design system in our admin app", "replace our components with yours"). Profiles the repo, maps every component it finds to a brand-ui verdict, writes a phased migration plan, and then walks the phases with the user approving each one. Read-only until the plan is approved. For a brand-new app use `brand-ui-new-app`; for using components in an app already on brand-ui use `brand-ui`.