material-ui-styling — Claude Code skill for choosing MUI styling
Helps the agent pick the right Material UI styling layer: sx, styled(), theme components, or global CSS. Use it when edits pile up and you need to avoid extra wrapper nesting.
npx skills add mui/material-ui --skill material-ui-styling -a claude-codeWhat material-ui-styling does
The skill pushes the agent to choose styling from narrow to wide: sx for one-off local changes, then styled() for reusable wrappers, then createTheme({ components }) overrides, and global styles last.
Two files do the work: SKILL.md is the entry point and index, AGENTS.md holds the full guide with examples and links to MUI docs. A separate table in reference.md compares sx vs styled() semantics — theme shortcuts, spacing behavior, and common foot-guns.
Install with npx skills add mui/material-ui --skill material-ui-styling -a claude-code. Other platforms use the same command with a different -a flag. MIT license, maintained by the MUI team, so it tracks the official docs closely.
What it helps with
- pick between sx, styled(), and theme overrides without reading all MUI docs
- override a component slot without breaking its state
- understand sx vs styled() spacing semantics
- style all instances of a component through the theme
- add global styles via GlobalStyles or CssBaseline
Example prompts for the agent
- apply the material-ui-styling skill and tell me which layer fits this `TextField`
- how do I override the `root` slot of `Button` without affecting hover state
- compare `sx` and `styled()` for a reusable `Card` using MUI guidance
How to install material-ui-styling
1Skills CLI (Vercel)
npx skills add mui/material-ui --skill material-ui-styling -a claude-code2Manually: put the files in place
~/.claude/skills/material-ui-styling/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/material-ui-styling/
1Skills CLI (Vercel)
npx skills add mui/material-ui --skill material-ui-styling -a codex2Manually: put the files in place
.agents/skills/material-ui-styling/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mui/material-ui --skill material-ui-styling -a cursor2Manually: put the files in place
.cursor/skills/material-ui-styling/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mui/material-ui material-ui-styling2Manually: put the files in place
.github/skills/material-ui-styling/SKILL.md1Skills CLI (Vercel)
npx skills add mui/material-ui --skill material-ui-styling -a gemini-cli2Platform CLI
gemini skills install https://github.com/mui/material-ui --path skills/material-ui-stylingManually: put the files in place
.devin/skills/material-ui-styling/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mui/material-ui --skill material-ui-styling -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set4
The whole set →Similar
Questions about material-ui-styling
How do I install material-ui-styling in Claude Code?
Run npx skills add mui/material-ui --skill material-ui-styling -a claude-code. The skill lands in ~/.claude/skills/material-ui-styling/SKILL.md.
What does material-ui-styling do?
It guides the agent to the right MUI styling layer: sx for one-off changes, styled() for wrappers, createTheme({ components }) for all instances, GlobalStyles and CssBaseline for globals.
How does sx differ from styled() in this skill?
sx fits local edits, styled() makes reusable wrappers. The skill ships a comparison table covering theme shortcuts, spacing behavior, and common foot-guns.
Source text
SKILL.md · MIT
---
name: material-ui-styling
description: Chooses the right Material UI styling approach (sx, styled, theme overrides, global CSS) from official MUI guidance. Use when styling @mui/material components, customizing themes, overriding slots, or comparing sx vs styled.
license: MIT
metadata:
author: mui
version: '1.0.0'
---
# Material UI styling
Agent skill for picking the correct styling layer in Material UI (narrowest scope first). SKILL.md is the entry and index; AGENTS.md is the full guide.
## When to apply
- Choosing among `sx`, `styled()`, theme `components`, or global CSS for a change
- Overriding component slots or state safely
- Comparing `sx` vs `styled()` semantics (spacing, theme shortcuts)
## Sections in AGENTS.md (by priority)
| Order | Topic | Scope |
| :---- | :----------------------------- | :------------------------------------ |
| 1 | Quick decision | Pick `sx` → `styled` → theme → global |
| 2 | `sx` prop | One-off / local |
| 3 | `styled()` | Reusable wrapper |
| 4 | `createTheme({ components })` | All instances |
| 5 | `GlobalStyles` / `CssBaseline` | HTML baseline / globals |
| 6 | `sx` vs `styled()` table | Foot-gun prevention |
## Full guide
Read [AGENTS.md](./AGENTS.md) for the complete instructions, examples, and doc links.
Supplementary tables: [reference.md](./reference.md).
© mui · MIT · mui/material-ui