mui-cli
БесплатноБез исполняемых скриптовНе проверенCheck a Material UI theme in real renders with the `mui` CLI — asked values in every variant, state, viewport width and pointer type in one call (`verify`)…
от siriwatknp★ 2 442 звезды на GitHubОб этом скилле
Material UI with mui-cli
The CLI renders Material UI components in Chrome under the project's theme and checks what they really compute. Its data comes from one Material UI release (mui --version). If a command warns about the version, run mui doctor.
Theming loop
Write the theme your way. When unsure where MUI sets a value or which selector wins,
mui component <Name>lists slots, variants, state selectors and theme links. A base other components build on says so, and also says when it is used on its own (InputBase). Copy MUI's selector when your override must beat it.Check what the user asked for, in one call:
mui verify TextField --theme src/theme.ts \ --props variant=outlined,label=Name --props variant=filled,label=Name \ --state "" --state focused --width 390,1280 --pointer fine,coarse \ --expect InputBase.root.box.height=36px \ --expect "touch:InputBase.input.fontSize=16px" --expect "mouse:InputBase.input.fontSize=14px"- Cases: every
--props×--state×--width×--pointercombination is one case. - Expectations: each
--expectapplies to every case. Atouch:,mouse:,@<900:or@>=900:prefix limits it to some cases.slot.box.height/box.widthcheck the laid-out box. - Composites (TextField) render as used. Their parts are addressed as
Part.slot, including the bases they extend:InputBase.rootcovers every variant. - Slots: a slot the component lacks resolves to its base (
Input→InputBase.input). Theme keys a component routes to nested parts are slots too (Autocomplete'sinputRoot,input). - Exit 1 on any miss.
--valuesprints every computed value. - One call per component family, with the values the user asked for. Cover the variants, states, widths and pointers the brief names. Don't widen the matrix to every prop to feel safe: the gate covers the rest.
- Cases: every
Pass the gate:
mui verify --all --theme <file>must exit 0.- What it checks: every component the theme touches and its family, across recorded variants, states, docs compositions and real content cases (long values, typed multiline, long labels, chips, long button text).
- Rules:
- a11y: a 24×24 clickable area or WCAG 2.5.8 spacing; every painted part responds to a click; keyboard focus visibly changes something and no
overflow: hiddenparent cuts the ring. - content: text never runs under an adornment, icon or chip; never spills out (an intended ellipsis or clip is fine); typed lines stay visible; a label never sits on the value; fields that should match keep one height.
- a11y: a 24×24 clickable area or WCAG 2.5.8 spacing; every painted part responds to a click; keyboard focus visibly changes something and no
- Rerun it after every fix. A case whose theme sources didn't change since the last run reuses its result ("unchanged since the last run, from the cache"), so a rerun checks only what the edit reached. Don't add
--no-cache. - Sheet: it always prints a contact sheet of real usage (content cases, variants side by side) plus any failing case. Look at it instead of building your own preview.
- On failure: fix the theme, not the check. A docs demo's failure that plain Material UI has too is listed apart ("also have in plain Material UI") and doesn't fail the gate: it belongs to the demo, not the theme.
Read the side effects:
mui diff --theme <file>compares against the theme file at git HEAD (else vanilla;--against vanillaforces it).- Output: one line per changed component;
--full(ormui diff <Name> --full) prints every before → after. - Report anything the user didn't ask for. A
✗ … failedline means the report is incomplete; say so.
- Output: one line per changed component;
Modern options: mui recommend
When building a new theme or asked to modernize one, run mui recommend --theme <file>. It lists options the theme doesn't use (CSS variables, color schemes, native color, focus ring, reduced motion…), each checked against the project's browser targets (browserslist, Electron version or framework default; --targets to override).
+: add the printed snippet and say so.mui recommend <id> --showdiffs what it changes.✗: don't adopt it; a target browser can't run it, and the line names which one.cssVariables/colorSchemeson an existing theme: ask first. Code that readstheme.palettedirectly changes.- Design tokens (type scale, uppercase buttons, shadows, radius) are reported only. Changing them is the user's call. Typography and shadows have a Tailwind-inspired preset (
mui recommend shadows --preset tailwind, add--showfor its impact) to show the user. Never apply one unasked. - If it says targets were assumed, tell the user and suggest adding a browserslist.
Theme code
Generated themes are read and copied, so write overrides the way MUI writes its own styles. The gate fails on every rule here except the last three.
- Classes: select with imported
*Classes, never class strings: `` [`&.${outlinedInputClasses.focused} .${outlinedInputC
Установить mui-cli в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(mui:*)Bash(npx:*)Вложенные файлы
FAQ
Что делает скилл mui-cli?
Check a Material UI theme in real renders with the `mui` CLI — asked values in every variant, state, viewport width and pointer type in one call (`verify`), an accessibility gate over every component the theme touches (`verify --all`), every side effect of a theme edit (`diff`), and modern theme options checked against the project's browser targets (`recommend`); where MUI sets a style and which selector wins (`component`); docs demos for Material UI and MUI X. Use when theming MUI (createTheme, styleOverrides), when an override doesn't take effect, or to confirm a theme change worked and broke nothing else.
Как установить скилл mui-cli?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mui-cli запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic