material-ui-nextjs

A setup and troubleshooting guide for using Material UI with Next.js, a React framework that can render pages on the server. It covers both the App Router and the older Pages Router, along with fonts, links, CSS layers, and URL-driven views.

In plain words
What is it for?
Use it when adding MUI to a Next.js app, configuring Emotion cache providers, combining MUI with Tailwind or CSS Modules, using next/font, or building views from URL search parameters.
Why use it?
It helps avoid missing styles, incorrect style order, server-rendering flicker, and cache-provider setup errors. It also explains where client-only routing code needs a Suspense boundary.

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-nextjs
Any agent
npx skills add mui/material-ui --skill material-ui-nextjs
Clone the repo
git clone --depth 1 https://github.com/mui/material-ui

Made for: Claude Code, Codex.

Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 439 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.00076 $0.00439
Opus 5 $0.00038 $0.00219
Sonnet 5 $0.00015 $0.00088
Haiku 4.5 $0.00008 $0.00044

Measured 2d ago against content hash 068273d6e445, 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-nextjs 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 2d ago.

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-nextjs/SKILL.md · 39 lines

What it actually says

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

Area Topics
App Router AppRouterCacheProvider, @emotion/cache, options, useSearchParams + <Suspense>
Pages Router _document, _app, DocumentHeadTags, AppCacheProvider
Fonts 'use client' theme, next/font, CSS variables on html
CSS variables cssVariables, SSR flicker docs
CSS layers enableCssLayer, Tailwind / other CSS
Link Client wrapper, routing guide, examples repo

Full guide

Read AGENTS.md for complete steps and doc links.

reference.md lists import paths and provider shape.

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. 2d ago First seen · 39 lines · 76 tokens per session scan A 068273d6e445

Subscribe to this mod's changes

material-ui-nextjs is a skill published in the GitHub repository mui/material-ui (98,975 stars, last pushed 2d ago), licensed MIT. It adds 76 tokens to every session and 439 once invoked, about $0.0004 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-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

igniteui-react-customize-theme

This skill customizes Ignite UI for React component styling using CSS custom properties and the full theming system and should be used when applying brand colors, dark mode, component-level overrides, or scoped themes in a React application.

IgniteUI/igniteui-react · 50 tokens

product-motion-design

Design, implement, audit, or repair purposeful motion for React and web interfaces, including GSAP timelines, scroll choreography, micro-interactions, and optional Three.js scenes, with cleanup, responsive behavior, reduced-motion support, and browser verification.

divyanshu-iitian/agent-website-design-skills · 52 tokens

ui-library-router

Choose among Kokonut UI, React Bits, daisyUI, Bklit UI, Anime.js, Rive, and Magic UI for frontend work. Use for pages, dashboards, landing pages, animation, data visualization, or interactive graphics; do not use when no UI/library choice is involved.

ECD5A/OrchestrUI · 64 tokens

build-recipes

Build the landing from the approved DESIGN.md and design plan on the fixed stack (Next.js + Tailwind + GSAP + Lenis, optional R3F). Use when craft/elevate invoke it after the design-plan gate, or standalone to rebuild a section. Never use before a design plan is approved.

alanvaa06/award-craft · 67 tokens

frontend-development

Use when building or structuring a React/Next.js + TypeScript + Tailwind frontend, choosing libraries, or wiring design tokens. Provides the opinionated blessed-library stack and the React-vs-Next decision, all on-token to DESIGN.md and accessible to WCAG AA.

martian56/claude-engineer · 59 tokens