New to Claude Skills? Learn how to install them →

mui on GitHub

Material UI Next.js

Free

Seamlessly integrate Material UI with Next.js apps.

by mui98.7k stars on mui/material-ui
1 views
Updated Aug 7, 2026
Get this skill

Free · Opens the source repo

What Material UI Next.js does

The Material UI Next.js skill provides developers with essential guidance for integrating Material UI into Next.js applications. This skill focuses on the specific requirements for using Material UI with both the App Router and Pages Router in Next.js, ensuring that styles are applied correctly and that components function as intended. It covers critical aspects such as server-side rendering (SSR), cache providers, and the use of CSS layers alongside Tailwind or CSS Modules.

With this skill, users can address common issues that arise when setting up Material UI in Next.js, such as styles appearing in the wrong order or missing altogether. It also provides insights into using the next/font package in conjunction with Material UI's ThemeProvider and createTheme, allowing for a cohesive styling approach. The skill includes practical examples and detailed explanations of how to implement features like the Button component with Next.js's Link, as well as managing URL state with useSearchParams and Suspense boundaries.

This skill is particularly useful for developers who are either starting new Next.js applications or troubleshooting existing ones that utilize Material UI. By following the guidelines outlined in this skill, users can ensure that their applications maintain a consistent and performant user interface while leveraging the full capabilities of both frameworks. The accompanying AGENTS.md file serves as a comprehensive guide, providing step-by-step instructions and additional documentation links for deeper exploration.

When to use it

Use this skill when setting up a new Next.js app with Material UI or when troubleshooting existing implementations.

When not to use it

This skill may not be suitable for projects that do not use Next.js or Material UI, or for those requiring advanced customizations not covered here.

What you can build with it

Setting Up a New Next.js Project

When creating a new Next.js application, this skill guides you through integrating Material UI effectively.

Debugging Styling Issues

If your Material UI styles are not rendering correctly, this skill provides solutions to common problems.

Utilizing App Router Features

Learn how to leverage the App Router with Material UI components, ensuring proper URL state management.

How to install Material UI Next.js

View source

1. Install with the skills CLI

npx skills add mui/material-ui/material-ui-nextjs --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by mui

Material UI and Next.js

Agent skill for Next.js + Material UI wiring (SSR/streaming, cache providers, fonts, layers, Link, App Router URL state). SKILL.md is the entry; AGENTS.md is the full guide.

When to apply

  • New App Router or Pages Router app using @mui/material
  • Styles missing, wrong order, or in body instead of head
  • next/font + ThemeProvider / createTheme
  • Tailwind or CSS Modules + MUI (enableCssLayer)
  • Button + component={Link} or Next.js v16 client boundary errors
  • useSearchParams / URL-driven MUI views and Suspense boundaries

Sections in AGENTS.md

AreaTopics
App RouterAppRouterCacheProvider, @emotion/cache, options, useSearchParams + <Suspense>
Pages Router_document, _app, DocumentHeadTags, AppCacheProvider
Fonts'use client' theme, next/font, CSS variables on html
CSS variablescssVariables, SSR flicker docs
CSS layersenableCssLayer, Tailwind / other CSS
LinkClient wrapper, routing guide, examples repo

Full guide

Read AGENTS.md for complete steps and doc links.

reference.md lists import paths and provider shape.

Frequently asked questions about Material UI Next.js

Similar skills