SponsoredSkillry: Agent Skills with taste. Designed and tested in-house, so one prompt gives you polished slides, web pages and launch videos.Skillry: Agent Skills with taste Try free Skills
Agent Skills
  • Skills
  • Picks
  • ShopSoon
  • Solutions
  • Specification
  • Submit
Agent Skills
Agent Skills

Discover and share powerful Agent Skills for AI assistants

GitHubX (Twitter)
Skills
  • View All
  • Install Guide
  • Documentation
  • Solutions
  • Product Launch Video
  • Submit
Tools
  • Claude Code
  • Cursor
  • OpenCode
  • Codex CLI
  • Gemini CLI
Resources
  • anthropics/skills
  • awesome-claude-skills
  • vercel-labs/agent-skills
  • kepano/obsidian-skills
Company
  • About
  • Blog
  • Authors
  • Changelog
  • Privacy Policy
  • Terms of Service

Sponsored by Vectrust @ OpenDev Org & NextRouter Alliance

© 2026 EvergreenAI. Built with JimmyLv
mui - Agent Skill - Agent Skills
Home/Skills/mui

mui

109

Material-UI v7 component library patterns including sx prop styling, theme integration, responsive design, and MUI-specific hooks. Use when working with MUI components, styling with sx prop, theme customization, or MUI utilities.

Download FolderView on GitHub

CLI Install

Recommended

Use the skills CLI to install this skill with one command. Auto-detects all installed AI assistants.

Method 1 - skills CLI

npx skills i softaworks/agent-toolkit/skills/mui

Method 2 - openskills (supports sync & update)

npx openskills install softaworks/agent-toolkit

Auto-detects Claude Code, Cursor, Codex CLI, Gemini CLI, and more. One install, works everywhere.

Installation Path

Download and extract to one of the following locations:

~/.claude/skills/mui/
SKILL.md

Skill Instructions

Back

Run with Cloud Agent

No setup needed. Let our cloud agents run this skill for you.

Select Provider

Select Model

ClaudeClaude Sonnet 5.5
$0.20/task

Best for coding tasks

Join Cloud Agent Waitlist

No setup required

Before you install

Read from this skill's files on GitHub on 2026-11-09. These are facts about the files, not a review of how well the skill works.

Files
6 files, 0 scripts, SKILL.md is 1092 words
Needs on your machine
Nothing beyond the agent: no scripts or install commands found
Web addresses in its scripts
No URLs in its scripts
Worth a look before running
No sudo, rm -rf, curl | sh or shell=True in its scripts
Agent Skills spec
name and description present, name matches the folder
Last upstream change
2026-01-18

We ran this skill ourselves. Here is what went in and what came out.

Field noteRan on 2026-11-22

Claude Code 2.1.329, claude-opus-5-5, headless, 81s. Claude did not pick it from a plain prompt, so we called it by name (/skill). How we test skills

Terminal log of the run, rendered from Claude Code's stream-json output. Long steps are trimmed.
Terminal log of the run, rendered from Claude Code's stream-json output. Long steps are trimmed.

Input

Empty folder. Prompt: Vite + React + TypeScript with MUI v7, a responsive three-card pricing grid with the middle card highlighted and a dark/light toggle, and npm run build must pass.

Output

theme.ts with both color schemes, ThemeToggle.tsx, PricingCard.tsx, App.tsx. npm run build passes (re-checked).

What happened

The skill's own grid example, <Grid item xs={12}>, is syntax MUI v7 no longer accepts. Claude used size={{ xs: 12, md: 4 }} instead and flagged it. The skill only loaded when called as /mui. It did not open the app in a browser.

Use it when

MUI projects where you want sx and theme conventions applied consistently.

Skip it when

Copying its Grid examples into v7. They are from the older API.

MUI v7 Patterns

Purpose

Material-UI v7 (released March 2025) patterns for component usage, styling with sx prop, theme integration, and responsive design.

Note: MUI v7 breaking changes from v6:

  • Deep imports no longer work - use package exports field
  • onBackdropClick removed from Modal - use onClose instead
  • All components now use standardized slots and slotProps pattern
  • CSS layers support via enableCssLayer config (works with Tailwind v4)
When to Use This Skill
  • Styling components with MUI sx prop
  • Using MUI components (Box, Grid, Paper, Typography, etc.)
  • Theme customization and usage
  • Responsive design with MUI breakpoints
  • MUI-specific utilities and hooks

Quick Start
Basic MUI Component
import { Box, Typography, Button, Paper } from '@mui/material';
import type { SxProps, Theme } from '@mui/material';
 
const styles: Record<string, SxProps<Theme>> = {
  container: {
    p: 2























Styling Patterns
Inline Styles (< 100 lines)

For components with simple styling, define styles at the top:

import type { SxProps, Theme } from '@mui/material';
 
const componentStyles: Record<string, SxProps<Theme>> = {
  container: {
    p: 2,
    display: 'flex',
    flexDirection: 


















Separate Styles File (>= 100 lines)

For complex components, create separate style file:

// UserProfile.styles.ts
import type { SxProps, Theme } from '@mui/material';
 
export const userProfileStyles: Record<string, SxProps<Theme>> = {
  container: {
    p: 3,
    maxWidth: 800

















Common Components
Layout Components
// Box - Generic container
<Box sx={{ p: 2, bgcolor: 'background.paper' }}>
  Content
</Box>
 
// Paper - Elevated surface
<Paper elevation={2} sx={{ p: 3












Grid System
import { Grid } from '@mui/material';
 
// 12-column grid
<Grid container spacing={2}>
  <Grid item xs={12} md={6}>
    Left half
  </Grid>
  <Grid item xs










Typography
<Typography variant="h1">Heading 1</Typography>
<Typography variant="h2">Heading 2</Typography>
<Typography variant="body1">Body text</Typography>
<Typography variant=











Buttons
// Variants
<Button variant="contained">Contained</Button>
<Button variant="outlined">Outlined</Button>
<Button variant="text">Text</Button>
 
// Colors








Theme Integration
Using Theme Values
import { useTheme } from '@mui/material';
 
function Component() {
  const theme = useTheme();
 
  return (
    <Box
      sx={{
        p: 2,
        bgcolor: theme.palette.primary.main,
        color: theme.palette.primary.contrastText,






Theme in sx Prop
<Box
  sx={{
    // Access theme in sx
    color: 'primary.main',          // theme.palette.primary.main
    bgcolor: 'background.paper',     // theme.palette.background.paper
    p: 2,                            // theme.spacing(2)
    borderRadius: 1,                 // theme.shape.borderRadius
















Responsive Design
Breakpoints
// Mobile-first responsive values
<Box
  sx={{
    width: {
      xs: '100%',    // 0-600px
      sm: '80%',     // 600-900px
      md: '60%',     // 900-1200px
      lg: '40%',     // 1200-1536px

















Responsive Typography
<Typography
  sx={{
    fontSize: {
      xs: '1rem',
      md: '1.5rem',
      lg: '2rem',
    },
    lineHeight: {
      xs: 1.5,
      md: 1.75,
    },




Forms
import { TextField, Stack, Button } from '@mui/material';
 
<Box component="form" onSubmit={handleSubmit}>
  <Stack spacing={2}>
    <TextField
      label="Email"
      type="email"










Common Patterns
Card Component
import { Card, CardContent, CardActions, Typography, Button } from '@mui/material';
 
<Card>
  <CardContent>
    <Typography variant="h5" component="div">
      Title
    </Typography>
    <Typography variant="body2" color=






Dialog/Modal
import { Dialog, DialogTitle, DialogContent, DialogActions, Button } from '@mui/material';
 
<Dialog open={open} onClose={handleClose}>
  <DialogTitle>Confirm Action</DialogTitle>
  <DialogContent>
    Are you sure you want to proceed?
  </DialogContent>
  <





Loading States
import { CircularProgress, Skeleton } from '@mui/material';
 
// Spinner
<Box sx={{ display: 'flex', justifyContent: 'center', p: 3 }}>
  <CircularProgress />
</Box>
 
// Skeleton





MUI-Specific Hooks
useMuiSnackbar
import { useMuiSnackbar } from '@/hooks/useMuiSnackbar';
 
function Component() {
  const { showSuccess, showError, showInfo } = useMuiSnackbar();
 
  const handleSave = async () => {
    try {
      await








Icons
import { Add as AddIcon, Delete as DeleteIcon } from '@mui/icons-material';
import { Button, IconButton } from '@mui/material';
 
<Button startIcon={<AddIcon />}>Add</Button>
<IconButton onClick={handleDelete}><DeleteIcon /></IconButton

Best Practices
1. Type Your sx Props
import type { SxProps, Theme } from '@mui/material';
 
// ✅ Good
const styles: Record<string, SxProps<Theme>> = {
  container: { p: 2 },
};
 
// ❌ Avoid
const styles = {
  container: { p: 
2. Use Theme Tokens
// ✅ Good: Use theme tokens
<Box sx={{ color: 'primary.main', p: 2 }} />
 
// ❌ Avoid: Hardcoded values
<Box sx={{ color: '#1976d2', padding: '16px' }} />
3. Consistent Spacing
// ✅ Good: Use spacing scale
<Box sx={{ p: 2, mb: 3, mt: 1 }} />
 
// ❌ Avoid: Random pixel values
<Box sx={{ padding: '17px', marginBottom: '25px' }} />

Additional Resources

For more detailed patterns, see:

  • styling-guide.md - Advanced styling patterns
  • component-library.md - Component examples
  • theme-customization.md - Theme setup
,
display: 'flex',
flexDirection: 'column',
gap: 2,
},
header: {
mb: 3,
fontSize: '1.5rem',
fontWeight: 600,
},
};
function MyComponent() {
return (
<Paper sx={styles.container}>
<Typography sx={styles.header}>
Title
</Typography>
<Button variant="contained">
Action
</Button>
</Paper>
);
}
'column'
,
},
header: {
mb: 2,
color: 'primary.main',
},
button: {
mt: 'auto',
alignSelf: 'flex-end',
},
};
function Component() {
return (
<Box sx={componentStyles.container}>
<Typography sx={componentStyles.header}>Header</Typography>
<Button sx={componentStyles.button}>Action</Button>
</Box>
);
}
,
mx: 'auto',
},
header: {
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
mb: 3,
},
// ... many more styles
};
// UserProfile.tsx
import { userProfileStyles as styles } from './UserProfile.styles';
function UserProfile() {
return <Box sx={styles.container}>...</Box>;
}
}}
>
Content
</Paper>
// Container - Centered content with max-width
<Container maxWidth="lg">
Content
</Container>
// Stack - Flex container with spacing
<Stack spacing={2} direction="row">
<Item />
<Item />
</Stack>
=
{
12
} md
=
{
6
}
>
Right half
</Grid>
</Grid>
// Responsive grid
<Grid container spacing={3}>
<Grid item xs={12} sm={6} md={4} lg={3}>
Card
</Grid>
{/* Repeat for more cards */}
</Grid>
"caption"
>
Small text
</
Typography
>
// With custom styling
<Typography
variant="h4"
sx={{
color: 'primary.main',
fontWeight: 600,
mb: 2,
}}
>
Custom Heading
</Typography>
<Button variant="contained" color="primary">Primary</Button>
<Button variant="contained" color="secondary">Secondary</Button>
<Button variant="contained" color="error">Error</Button>
// With icons
import { Add as AddIcon } from '@mui/icons-material';
<Button startIcon={<AddIcon />}>Add Item</Button>
borderRadius: theme.shape.borderRadius,
}}
>
Themed box
</Box>
);
}
}}
>
Content
</Box>
// Callback for advanced usage
<Box
sx={(theme) => ({
color: theme.palette.primary.main,
'&:hover': {
color: theme.palette.primary.dark,
},
})}
>
Hover me
</Box>
xl: '30%', // 1536px+
},
}}
>
Responsive width
</Box>
// Responsive display
<Box
sx={{
display: {
xs: 'none', // Hidden on mobile
md: 'block', // Visible on desktop
},
}}
>
Desktop only
</Box>
}}
>
Responsive text
</Typography>
value
=
{email}
onChange={(e) => setEmail(e.target.value)}
fullWidth
required
error={!!errors.email}
helperText={errors.email}
/>
<Button type="submit" variant="contained">Submit</Button>
</Stack>
</Box>
"text.secondary"
>
Description
</Typography>
</CardContent>
<CardActions>
<Button size="small">Learn More</Button>
</CardActions>
</Card>
DialogActions
>
<Button onClick={handleClose}>Cancel</Button>
<Button onClick={handleConfirm} variant="contained">
Confirm
</Button>
</DialogActions>
</Dialog>
<Stack spacing={1}>
<Skeleton variant="text" width="60%" />
<Skeleton variant="rectangular" height={200} />
<Skeleton variant="text" width="40%" />
</Stack>
saveData
();
showSuccess('Saved successfully');
} catch (error) {
showError('Failed to save');
}
};
return <Button onClick={handleSave}>Save</Button>;
}
>
2
},
// No type safety
};