material-ui-styling

A guide for choosing how to style Material UI components, from local sx rules and reusable styled wrappers to theme-wide overrides and global CSS. Material UI is a React component library with several styling options.

In plain words
What is it for?
Use it when styling a component, creating reusable wrappers, changing every instance through the theme, overriding slots or states, or deciding between local and global CSS.
Why use it?
It prevents styling rules from being broader than necessary and helps avoid unsafe overrides of component slots or states. It also clarifies the differences between sx and styled usage.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mui/material-ui/material-ui-styling
Any agent
npx skills add mui/material-ui --skill material-ui-styling
Clone the repo
git clone --depth 1 https://github.com/mui/material-ui

Made for: Claude Code, Codex.

Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 356 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00052 $0.00356
Opus 5 $0.00026 $0.00178
Sonnet 5 $0.00010 $0.00071
Haiku 4.5 $0.00005 $0.00036

Measured today against content hash d7d46b3b0a33, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

material-ui-styling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/material-ui-styling/SKILL.md · 36 lines

What it actually says

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 sxstyled → 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 for the complete instructions, examples, and doc links.

Supplementary tables: reference.md.

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 36 lines · 52 tokens per session scan A d7d46b3b0a33

Subscribe to this mod's changes

material-ui-styling is a skill published in the GitHub repository mui/material-ui (98,975 stars, last pushed today), licensed MIT. It adds 52 tokens to every session and 356 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

chakra-ui-migrate

Migrate Chakra UI projects from v2 to v3, covering package changes, codemods, provider setup, color mode, prop renaming, compound components, theming, recipes, and Next.js updates. Use this skill whenever a user is upgrading Chakra UI versions, encountering breaking changes after an upgrade, converting old v2 patterns…

chakra-ui/chakra-ui · 137 tokens

chakra-ui-builder

Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…

chakra-ui/chakra-ui · 214 tokens

chakra-ui-refactor

Review, convert, and improve UI code using Chakra UI v3. Use this skill whenever a user wants to review Chakra UI code for issues, convert plain HTML/CSS, Tailwind, CSS Modules, or styled-components to Chakra UI, clean up messy Chakra components, fix layout structure or token usage, or asks anything like "is this…

chakra-ui/chakra-ui · 139 tokens

fast-typescript-check

Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…

internet-development/www-sacred · 84 tokens

port-sacred-terminal-ui-to-python

Take a React Window.tsx (or any sacred component) and produce a terminal CLI screen written in Python that uses Simulacrum's Python mirror in scripts/python/sacredcli/. Simulacrum is the sacred CLI framework — the JavaScript half lives in scripts/cli/lib/, the Python half is a one-to-one snakecase mirror.

internet-development/www-sacred · 0 tokens

port-sacred-terminal-ui-to-hostile-react-codebase

Take a sacred React component (or a sacred screen that mirrors a Simulacrum CLI surface) and graft it into a foreign React codebase that already ships its own design system, build pipeline, and CSS toolchain — without breaking the host or polluting it with sacred-specific globals.

internet-development/www-sacred · 0 tokens