Communitygithub.com

Material UI と Next.js 統合スキル

Material UI を Next.js の App Router および Pages Router と統合するスキルです。@mui/material-nextjs、Emotion キャッシュプロバイダー、next/font、Tailwind/CSS Modules との CSS レイヤー、Link コンポーネントのプロップパターン、CSS テーマ変数の SSR メモ、App Router の useSearchParams と Suspense をカバーします。Next.js アプリで MUI をセットアップまたはデバッグする際に使用します。

Material UI と Next.js 統合スキル とは?

このスキルは、Next.js アプリケーションにおける Material UI(MUI)のセットアップとデバッグを支援します。具体的には、App Router と Pages Router の両方に対応し、サーバーサイドレンダリング(SSR)やストリーミング、Emotion キャッシュプロバイダー、next/font フォントの統合、Tailwind CSS や CSS Modules との CSS レイヤー設定、Link コンポーネントのプロップパターン、App Router での useSearchParams と Suspense を使った URL 状態管理など、実践的なトピックをカバーします。スタイルが欠落したり、body タグ内に挿入されてしまう問題や、next/font と ThemeProvider/createTheme の連携、Button コンポーネントでの Next.js Link 利用時のエラー、useSearchParams による動的ビューの実装など、よくある障害を解決するための具体的な手順を提供します。AGENTS.md に完全なガイドが、reference.md にインポートパスとプロバイダーの形状が記載されています。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/0xAlchemist-cs/personal-ui-system/tree/HEAD/.agents/skills/material-ui-nextjs

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Material UI と Next.js

Next.js + Material UI の連携(SSR/ストリーミング、キャッシュプロバイダー、フォント、レイヤー、Link、App Router URL 状態)のためのエージェントスキル。SKILL.md がエントリーポイントであり、AGENTS.md が完全なガイドです。

適用タイミング

  • App Router または Pages Router を使用した新しいアプリで @mui/material を使用する場合
  • スタイルが欠落している、順序が間違っている、または head ではなく body に挿入される場合
  • next/font + ThemeProvider / createTheme を使用する場合
  • Tailwind または CSS Modules + MUI(enableCssLayer)を使用する場合
  • Button + component={Link} を使用する、または Next.js v16 のクライアントバウンダリエラーが発生する場合
  • useSearchParams / URL 駆動の MUI ビューと Suspense 境界を使用する場合

AGENTS.md のセクション

エリアトピック
App RouterAppRouterCacheProvider、@emotion/cache、options、useSearchParams + <Suspense>
Pages Router_document、_app、DocumentHeadTags、AppCacheProvider
フォント'use client' テーマ、next/font、html 上の CSS 変数
CSS 変数cssVariables、SSR フリッカーに関するドキュメント
CSS レイヤーenableCssLayer、Tailwind / その他の CSS
Linkクライアントラッパー、ルーティングガイド、サンプルリポジトリ

完全ガイド

完全な手順とドキュメントリンクについては、AGENTS.md を参照してください。

reference.md にはインポートパスとプロバイダーの形状が記載されています。

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

0xAlchemist-cs/personal-ui-system

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, dashboard, navbar, card, landing section, pricing table, or layout using Chakra UI; wants to add Chakra UI to a project, set up ChakraProvider, run CLI snippets, configure color mode, or fix provider wrapping; or asks about theming — defining brand colors, design tokens, semantic tokens, dark mode values, component recipes, slot recipes, typegen, or ejecting the default theme. Trigger on any Chakra UI building, setup, or theming or charts request, however casually phrased — "add my brand colors", "make a reusable card style", "build a bar chart", "show me a line chart", "make me a login form", "build a sidebar", "add Chakra to my app".

0xAlchemist-cs/personal-ui-system

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 (ColorModeScript, useColorModeValue, styleConfig, extendTheme, isDisabled, colorScheme, @chakra-ui/icons, framer-motion dependency), fixing compound component patterns, or asking about differences between Chakra UI v2 and v3 — even if they don't say "migrate" or "upgrade" explicitly.

関連スキル