Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计提醒

material-3材料 3

Agent Skill

material-3 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,023

周安装

41

GitHub Stars

825

下载量

331
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:material-3(材料 3)
来源仓库:https://github.com/hamen/material-3-skill
仓库路径:skills/material-3
安装命令:
npx skills add https://github.com/hamen/material-3-skill --skill material-3
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hamen/material-3-skill --skill material-3

简介

material-3 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于需要根据关键词或任务场景进行信息定位的研究与检索任务。
  • 通过 npx skills add 命令从 GitHub 仓库安装并使用该技能。
  • 安装前需确认权限范围、维护状态及是否触发联网或文件操作。
  • 建议结合原始 README 和仓库内容进一步核验具体用法。

SKILL.md

Material Design 3

This skill guides implementation of Google's Material Design 3 (MD3) — a personal, adaptive, expressive design system. MD3 uses dynamic color, tonal surfaces, rounded shapes, and spring-based motion to create UIs that feel alive and personal.

Philosophy

MD3 is built on three principles:

  • Personal: Dynamic color adapts UI to the user's wallpaper or content. Theming is individual, not one-size-fits-all.
  • Adaptive: Layouts transform across 5 window size classes. Components resize, reposition, and change form factor responsively.
  • Expressive: Shape morphing, spring physics, and emphasized typography create moments of delight without sacrificing usability.

Key differences from MD2:

  • Tonal surfaces replace elevation shadows as the primary depth cue
  • Dynamic color generates full schemes from a single seed color
  • Fully rounded corners by default (not slightly rounded)
  • Spring-based motion physics replace fixed easing curves for components
  • 3 levels of user-controlled contrast (standard/medium/high)

Relationship with frontend-design skill: When both skills are active, MD3 provides the design system (tokens, components, layout rules) and frontend-design provides creative direction within those constraints. MD3 rules take precedence for component structure and token usage. Note: Roboto/Roboto Flex IS the correct default typeface in MD3 — the frontend-design guidance to avoid Roboto does not apply when implementing MD3.

Decision Tree

What are you building?

Full app scaffold        → See "Common Patterns: App Shell" + references/layout-and-responsive.md
Single component         → See "Component Quick Reference" table → references/component-catalog.md
Custom theme             → See references/theming-and-dynamic-color.md
Form / input layout      → See references/component-catalog.md § Input Components
Navigation structure     → See references/navigation-patterns.md
Data display             → See references/component-catalog.md § Data Display

What platform?

Jetpack Compose          → Primary: androidx.compose.material3, MaterialTheme, references/*
Flutter                  → useMaterial3: true in ThemeData, ColorScheme.fromSeed()
Web (vanilla JS)         → @material/web (limited; maintenance mode) + CSS custom properties
Web (React/Vue/Svelte)   → CSS custom properties + wrapper components (no official React lib)
Web (CSS-only)           → MD3 token values as CSS custom properties (no <md-*> elements)

Design Token System

All MD3 tokens use the md.sys namespace. Jetpack Compose maps roles to MaterialTheme.colorScheme, MaterialTheme.typography, and MaterialTheme.shapes (same semantic roles as the spec). On the web, these map to CSS custom properties (--md-sys-*):

Color Tokens (--md-sys-color-*)

TokenPurpose
primaryHigh-emphasis fills, text, icons against surface
on-primaryText/icons on primary
primary-containerStandout fill for key components (FAB, etc.)
on-primary-containerText/icons on primary-container
secondary / on-secondaryLess prominent accents
secondary-container / on-secondary-containerRecessive components (tonal buttons)
tertiary / on-tertiaryContrasting accents
tertiary-container / on-tertiary-containerComplementary containers
error / on-errorError states (static — doesn't change with dynamic color)
error-container / on-error-containerError container fills
surfaceDefault background
on-surfaceText/icons on any surface
on-surface-variantLower-emphasis text/icons on surface
surface-container-lowestLowest-emphasis container
surface-container-lowLow-emphasis container
surface-containerDefault container (nav areas)
surface-container-highHigh-emphasis container
surface-container-highestHighest-emphasis container
surface-dim / surface-brightMaintain relative brightness across light/dark
inverse-surface / inverse-on-surface / inverse-primaryContrasting elements (snackbars)
outlineImportant boundaries (text field borders)
outline-variantDecorative elements (dividers)

Full details: references/color-system.md

Typography Tokens (--md-sys-typescale-*)

ScaleSizesUse
DisplayL / M / SHero text, large numbers
HeadlineL / M / SSection headers
TitleL / M / SSmaller headers, card titles
BodyL / M / SParagraph text, descriptions
LabelL / M / SButtons, chips, captions

Each style has tokens for: -font, -weight, -size, -line-height, -tracking Plus 15 emphasized variants (higher weight) via --md-sys-typescale-emphasized-*

Full details: references/typography-and-shape.md

Shape Tokens (--md-sys-shape-corner-*)

TokenValueExample components
none0dp
extra-small4dpChips, snackbars
small8dpText fields, menus
medium12dpCards
large16dpFABs, navigation drawer
large-increased20dp(Expressive)
extra-large28dpDialogs, bottom sheets
extra-large-increased32dp(Expressive)
extra-extra-large48dp(Expressive)
full9999pxButtons, chips, badges

Elevation Levels

LevelDPTonal offsetUse
00dpNoneFlat surfaces, most components at rest
11dp+5% primaryElevated cards, modal sheets
23dp+8% primaryMenus, nav bar, scrolled app bar
36dp+11% primaryFAB, dialogs, search, date/time pickers
48dp+12% primary(hover/focus increase only)
512dp+14% primary(hover/focus increase only)

Elevation in MD3 is communicated through tonal surface color, not shadows. Shadows are only used when needed for additional protection against busy backgrounds.

Motion

MD3 Expressive (May 2025) introduced spring-based motion physics for components. The legacy easing/duration system is still used for transitions (enter/exit/shared-axis):

EasingDurationTransition type
Emphasized500msBegin and end on screen
Emphasized decelerate400msEnter the screen
Emphasized accelerate200msExit the screen
Standard300msBegin and end on screen (utility)
Standard decelerate250msEnter screen (utility)
Standard accelerate200msExit screen (utility)

CSS easing values:

  • Emphasized: cubic-bezier(0.2, 0, 0, 1)
  • Emphasized decelerate: cubic-bezier(0.05, 0.7, 0.1, 1)
  • Emphasized accelerate: cubic-bezier(0.3, 0, 0.8, 0.15)
  • Standard: cubic-bezier(0.2, 0, 0, 1)
  • Standard decelerate: cubic-bezier(0, 0, 0, 1)
  • Standard accelerate: cubic-bezier(0.3, 0, 1, 1)

Component Quick Reference

ComponentWeb ElementKey VariantsCategory
Buttonmd-filled-button, md-outlined-button, md-text-button, md-elevated-button, md-filled-tonal-buttonFilled, Outlined, Text, Elevated, Tonal; 5 sizes (XS–XL); toggleActions
Button groupmd-button-groupStandard, connectedActions
Extended FABmd-extended-fabSurface, Primary, Secondary, TertiaryActions
FABmd-fabSmall, Medium, LargeActions
FAB menuActions
Icon buttonmd-icon-button, md-filled-icon-button, md-filled-tonal-icon-button, md-outlined-icon-buttonStandard, Filled, Filled Tonal, OutlinedActions
Segmented buttonSingle-select, Multi-selectActions
Split buttonActions
BadgeSmall (dot), Large (count)Communication
Loading indicatorLinear, CircularCommunication
Progress indicatormd-linear-progress, md-circular-progressLinear, Circular; determinate/indeterminateCommunication
SnackbarSingle-line, Two-line, ActionCommunication
TooltipPlain, RichCommunication
CardFilled, Outlined, ElevatedContainment
CarouselMulti-browse, Uncontained, HeroContainment
Dialogmd-dialogBasic, Full-screenContainment
Bottom sheetStandard, ModalSheets
Side sheetStandard, ModalSheets
Dividermd-dividerFull-width, InsetContainment
Checkboxmd-checkboxInput
Chipsmd-chip-set, md-assist-chip, md-filter-chip, md-input-chip, md-suggestion-chipAssist, Filter, Input, SuggestionInput
Date pickerDocked, Modal, RangeInput
Menumd-menu, md-menu-itemInput
Radio buttonmd-radioInput
Slidermd-sliderContinuous, Discrete, RangeInput
Switchmd-switchWith/without iconInput
Text fieldmd-filled-text-field, md-outlined-text-fieldFilled, OutlinedInput
Time pickerDocked, ModalInput
App bar (top)Center-aligned, Small, Medium, LargeNavigation
Navigation barmd-navigation-barNavigation
Navigation drawermd-navigation-drawerStandard, ModalNavigation
Navigation railNavigation
SearchSearch bar, Search viewNavigation
Tabsmd-tabs, md-primary-tab, md-secondary-tabPrimary, SecondaryNavigation
ToolbarNavigation
Listmd-list, md-list-itemOne-line, Two-line, Three-lineData Display

Note: Components marked with for web element don't have @material/web implementations yet. Use CSS custom properties with standard HTML for these. Compose mappings and examples live in references/component-catalog.md.

Full component details with code examples: references/component-catalog.md

Jetpack Compose (primary)

Use androidx.compose.material3 with MaterialTheme and Material 3 composables (Scaffold, Button, NavigationBar, top app bars, etc.).

  • Theming: MaterialTheme(colorScheme = …, typography = …, shapes = …). Prefer dynamicLightColorScheme / dynamicDarkColorScheme on Android 12+ (API 31+) when dynamic color is desired; otherwise lightColorScheme / darkColorScheme or generated theme code from Material Theme Builder.
  • Adaptive UI: Window size classes, list-detail and supporting-pane layouts, foldables — see references/layout-and-responsive.md and references/navigation-patterns.md.
  • Edge-to-edge & insets: Lay out content with WindowInsets / scaffold padding so bars and IME behave correctly — see references/layout-and-responsive.md.
  • Experimental APIs: Some Material 3 APIs require @OptIn(ExperimentalMaterial3Api::class) or expressive opt-ins; match your BOM and compiler.
MaterialTheme(
    colorScheme = colorScheme, // from dynamicLightColorScheme / lightColorScheme / etc.
    typography = Typography(),
    shapes = Shapes(),
) {
    // M3 content — prefer references for Scaffold, navigation, text fields
}

Web (limited): @material/web

Important: Per Material Design 3 for Web, Material Web Components are in maintenance mode and M3 Expressive is not implemented on Web. Use @material/web for token-backed web UIs when appropriate, but do not treat it as equivalent to Compose for current Expressive features.

Setup

npm install @material/web

Import Components Individually

Always import only the components you use — importing the entire package bloats the bundle:

// Good — individual imports
import '@material/web/button/filled-button.js';
import '@material/web/button/outlined-button.js';
import '@material/web/textfield/outlined-text-field.js';
import '@material/web/icon/icon.js';

// Bad — never do this
import '@material/web'; // imports everything

Basic Usage

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Flex:wght@400;500;700&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined" rel="stylesheet">
</head>
<body>
  <md-filled-button>Get started</md-filled-button>
  <md-outlined-text-field label="Email" type="email"></md-outlined-text-field>

  <script type="module">
    import '@material/web/button/filled-button.js';
    import '@material/web/textfield/outlined-text-field.js';
  </script>
</body>
</html>

Theming with CSS Custom Properties

Apply a custom theme by setting CSS custom properties on :root or any ancestor:

:root {
  /* Color scheme (generate with @material/material-color-utilities) */
  --md-sys-color-primary: #6750A4;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: #EADDFF;
  --md-sys-color-on-primary-container: #21005D;
  --md-sys-color-secondary: #625B71;
  --md-sys-color-on-secondary: #FFFFFF;
  --md-sys-color-secondary-container: #E8DEF8;
  --md-sys-color-on-secondary-container: #1D192B;
  --md-sys-color-surface: #FEF7FF;
  --md-sys-color-on-surface: #1D1B20;
  --md-sys-color-surface-container: #F3EDF7;
  --md-sys-color-outline: #79747E;
  --md-sys-color-outline-variant: #CAC4D0;

  /* Typography */
  --md-sys-typescale-body-large-font: 'Roboto Flex', sans-serif;
  --md-sys-typescale-body-large-size: 1rem;
  --md-sys-typescale-body-large-weight: 400;
  --md-sys-typescale-body-large-line-height: 1.5rem;

  /* Shape */
  --md-sys-shape-corner-full: 9999px;
  --md-sys-shape-corner-medium: 12px;
}

Component-Level Overrides

Override individual component tokens for specific customization:

md-filled-button {
  --md-filled-button-container-color: var(--md-sys-color-primary);
  --md-filled-button-label-text-color: var(--md-sys-color-on-primary);
  --md-filled-button-container-shape: var(--md-sys-shape-corner-full);
  --md-filled-button-container-height: 40px;
}

md-outlined-text-field {
  --md-outlined-text-field-container-shape: var(--md-sys-shape-corner-small);
  --md-outlined-text-field-focus-outline-color: var(--md-sys-color-primary);
}

Dark Theme

Apply dark theme by overriding color tokens on a class or media query:

@media (prefers-color-scheme: dark) {
  :root {
    --md-sys-color-primary: #D0BCFF;
    --md-sys-color-on-primary: #381E72;
    --md-sys-color-primary-container: #4F378B;
    --md-sys-color-on-primary-container: #EADDFF;
    --md-sys-color-surface: #141218;
    --md-sys-color-on-surface: #E6E0E9;
    --md-sys-color-surface-container: #211F26;
    --md-sys-color-outline: #938F99;
    --md-sys-color-outline-variant: #49454F;
  }
}

Full theming guide: references/theming-and-dynamic-color.md

Common Patterns

App Shell

Standard MD3 app with responsive navigation + top app bar + content area:

<div class="md3-app">
  <nav class="md3-nav-rail" aria-label="Main navigation">
    <!-- Navigation rail for medium+ screens -->
    <md-fab size="small" aria-label="Compose">
      <md-icon slot="icon">edit</md-icon>
    </md-fab>
    <md-navigation-bar>
      <md-navigation-tab label="Home">
        <md-icon slot="active-icon">home</md-icon>
        <md-icon slot="inactive-icon">home</md-icon>
      </md-navigation-tab>
      <md-navigation-tab label="Search">
        <md-icon slot="active-icon">search</md-icon>
        <md-icon slot="inactive-icon">search</md-icon>
      </md-navigation-tab>
    </md-navigation-bar>
  </nav>
  <main class="md3-content">
    <header class="md3-top-app-bar">
      <h1 class="md3-top-app-bar__title" style="font: var(--md-sys-typescale-title-large)">
        Page Title
      </h1>
    </header>
    <div class="md3-body">
      <!-- Content here -->
    </div>
  </main>
</div>
.md3-app {
  display: flex;
  min-height: 100vh;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
}

.md3-nav-rail {
  width: 80px;
  background: var(--md-sys-color-surface);
  border-right: 1px solid var(--md-sys-color-outline-variant);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
  gap: 12px;
}

.md3-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.md3-top-app-bar {
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  background: var(--md-sys-color-surface);
}

.md3-body {
  padding: 24px;
  flex: 1;
}

/* Responsive: switch to bottom nav on compact */
@media (max-width: 599px) {
  .md3-app { flex-direction: column; }
  .md3-nav-rail {
    order: 1;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    border-right: none;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    padding: 0;
  }
}

Card Grid

<div class="md3-card-grid">
  <div class="md3-card md3-card--outlined">
    <img src="image.jpg" alt="Description" class="md3-card__media">
    <div class="md3-card__content">
      <h3 style="font: var(--md-sys-typescale-title-medium)">Card Title</h3>
      <p style="font: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant)">
        Supporting text for this card.
      </p>
    </div>
    <div class="md3-card__actions">
      <md-text-button>Learn more</md-text-button>
      <md-filled-tonal-button>Action</md-filled-tonal-button>
    </div>
  </div>
</div>
.md3-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.md3-card--outlined {
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium, 12px);
  background: var(--md-sys-color-surface);
  overflow: hidden;
}

.md3-card__content { padding: 16px; }
.md3-card__actions { padding: 8px 16px 16px; display: flex; gap: 8px; justify-content: flex-end; }
.md3-card__media { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

Form Layout

<form class="md3-form">
  <md-outlined-text-field label="Full name" required></md-outlined-text-field>
  <md-outlined-text-field label="Email" type="email" required></md-outlined-text-field>
  <md-outlined-text-field label="Message" type="textarea" rows="4"></md-outlined-text-field>
  <div class="md3-form__actions">
    <md-text-button type="reset">Cancel</md-text-button>
    <md-filled-button type="submit">Submit</md-filled-button>
  </div>
</form>
.md3-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 560px;
}

.md3-form__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

More patterns: references/navigation-patterns.md, references/layout-and-responsive.md

Anti-Patterns

Never do these when implementing MD3:

  • Mix MD2 and MD3 libraries: Don't use @material/mdc-* (MD2) alongside @material/web (MD3). They have incompatible APIs and styling.
  • Hardcode colors: Always use var(--md-sys-color-*) tokens, never raw hex/rgb values. Hardcoded colors break dynamic theming, dark mode, and contrast adjustment.
  • Ignore tonal pairing: Only combine colors in their intended pairs (e.g., primary + on-primary, surface-container + on-surface). Arbitrary pairings break contrast in dynamic color and high contrast modes.
  • Use outline for dividers: Use outline-variant for dividers. outline is for important boundaries like text field borders.
  • Import all of @material/web: Always import individual component modules. Barrel imports include every component and destroy bundle size.
  • Use border-radius directly: Use shape tokens (var(--md-sys-shape-corner-medium)) so shapes stay consistent with theming.
  • Use shadows for elevation by default: MD3 communicates elevation through tonal surface color, not shadows. Only add shadows when elements need extra separation from busy backgrounds.
  • Apply frontend-design "avoid Roboto" rule: On Android, Roboto is the default Material typeface; web often uses Roboto or Roboto Flex with MD3 tokens. Replace only when intentionally customizing the type scale.
  • Assume SSR compatibility: @material/web uses Web Components (custom elements) which require JavaScript to render. They won't produce meaningful HTML in SSR without additional hydration strategies.
  • Ignore foldables and large screens: MD3 is designed for all screen sizes. Don't ship phone-only layouts — use canonical layouts, multi-pane at 600dp+, and test on foldable/tablet emulators. Place no interactive content across the fold/hinge.
  • Stretch content to fill wide screens: On Large (1200dp+) and Extra-large (1600dp+) windows, constrain content to a max width (840–1040dp). Endless-width text lines are unreadable.

Platform Notes

Flutter

MaterialApp(
  theme: ThemeData(
    useMaterial3: true,
    colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
  ),
);

Jetpack Compose

See Jetpack Compose (primary) above. Use LocalContext.current with dynamicLightColorScheme / dynamicDarkColorScheme only when Build.VERSION.SDK_INT >= Build.VERSION_CODES.S and dynamic color is enabled; otherwise supply static light/dark schemes.

Component Name Mapping

ConceptWebFlutterCompose
Filled buttonmd-filled-buttonFilledButtonButton
Outlined text fieldmd-outlined-text-fieldOutlinedTextFieldOutlinedTextField
FABmd-fabFloatingActionButtonFloatingActionButton
Navigation barmd-navigation-barNavigationBarNavigationBar
Switchmd-switchSwitchSwitch

M3 Expressive (May 2025)

The Expressive update adds visual richness while maintaining usability. Availability differs by platform — do not assume one stack implements everything.

CapabilityJetpack ComposeFlutterWeb (@material/web)
Spring / motion physicsSupported in Material 3 (see MotionScheme, expressive APIs per BOM)Varies by Flutter Material versionNot in Material Web; use easing/duration or custom motion
Emphasized typographyVia theme / type scaleVia themeToken/CSS only; no full Expressive component set
Shape morphingCompose-first in Google’s expressive rolloutCheck current Flutter docsNot in @material/web
New button sizes (XS–XL), toggleFollow Compose Material3 componentsFollow Flutter MD3Height/CSS approximations only
Extra corner tokens (e.g. large-increased)MaterialTheme.shapes / tokensTheme shapesCSS --md-sys-shape-*
3 contrast levelsScheme builders / systemPlugins / manualSchemeContent contrast parameter in JS utilities

Web: Material Web is maintenance-only; M3 Expressive is not on Web. Use CSS easing/duration tokens as fallback for motion, not spring parity.

Legacy easing/duration remains valid for transitions (enter/exit/shared-axis) where the spec still references them; see the Motion table below.

MD3 Compliance Audit

When invoked with audit as the argument (e.g., /material-3 audit), or when asked to audit/review MD3 compliance, analyze the target app or page and produce a compliance report.

Audit Procedure

  1. Identify the target: The user provides a URL (use browser tools to inspect), file paths (read source), or a running app.
  2. Inspect the following categories and score each 0–10:
CategoryWhat to check
Color tokensWeb: --md-sys-color-* / generated CSS. Compose: MaterialTheme.colorScheme roles (no arbitrary Color(...) for surfaces without reason). Proper tonal pairing (onX on X). Dark theme. Flutter: ColorScheme roles.
TypographyMD3 type scale: Compose MaterialTheme.typography; web typescale tokens; correct roles (Display, Headline, Title, Body, Label).
ShapeCompose MaterialTheme.shapes / component Shape; web var(--md-sys-shape-*). Buttons: full; cards: medium; avoid magic numbers.
ElevationTonal elevation (Surface tonal/shadow as appropriate). Web: hover/focus where relevant.
ComponentsCompose: Material3 composables (Button, Scaffold, etc.). Web: @material/web or spec-aligned HTML/CSS. Correct variants.
LayoutCanonical layouts; Compose window size class / adaptive APIs; readable max width on large widths; foldable hinge avoidance.
NavigationBar / rail / drawer / drawers+Compose NavHost patterns per size class; predictive back where applicable.
MotionCompose MotionScheme / expressive APIs when used; transitions may still use easing/duration. Web: CSS motion tokens fallback.
AccessibilityMD3 roles help, but verify contrast: UI components often need 3:1 for large text/borders and 4.5:1 for normal text (WCAG 2.x). TalkBack/semantics (Compose), focus order, touch targets (~48dp). Web: ARIA, keyboard.
ThemingCompose: MaterialTheme + light/dark/dynamic as designed. Web: CSS custom properties on :root or subtree. Flutter: ThemeData + ColorScheme.
  1. Generate the report:
# MD3 Compliance Audit Report

Target: [URL or file path]
Date: [date]
Overall Score: [X/100]

## Scores by Category
| Category       | Score | Status |
|----------------|-------|--------|
| Color tokens   | X/10  | [pass/warn/fail] |
| Typography     | X/10  | [pass/warn/fail] |
| Shape          | X/10  | [pass/warn/fail] |
| Elevation      | X/10  | [pass/warn/fail] |
| Components     | X/10  | [pass/warn/fail] |
| Layout         | X/10  | [pass/warn/fail] |
| Navigation     | X/10  | [pass/warn/fail] |
| Motion         | X/10  | [pass/warn/fail] |
| Accessibility  | X/10  | [pass/warn/fail] |
| Theming        | X/10  | [pass/warn/fail] |

## Critical Issues
[List items scoring 0-3 with specific file:line references and fixes]

## Warnings
[List items scoring 4-6 with recommendations]

## Passing
[List items scoring 7-10 with notes on what's done well]

## Recommended Fixes (Priority Order)
1. [Most impactful fix first]
2. ...

Audit Methods

For a live URL (browser or devtools):

  • Inspect computed styles and CSS variables (--md-sys-*)
  • Resize viewport or use responsive mode for breakpoints
  • Capture screenshots at key widths if helpful

For source code (file paths provided):

  • Compose/Kotlin: .kt files — MaterialTheme, composables, Color(0x…) abuse, hard-coded Dp, missing Modifier.semantics where needed
  • Flutter: .dartThemeData, ColorScheme
  • Web: HTML/JSX/Vue/Svelte; CSS/SCSS for tokens
  • Check web imports for @material/web vs @material/mdc-* (MD2)

Quick checks (adapt paths to your stack):

# Web: hardcoded colors
grep -rn '#[0-9a-fA-F]\{3,8\}' --include='*.css' --include='*.scss'

# Compose: raw Color(...) audits (sample — tune for your codebase)
grep -rn 'Color(0x' --include='*.kt'

# MD2 on web
grep -rn '@material/mdc-' --include='*.js' --include='*.ts'

Browser automation (if your environment exposes MCP browser tools): navigate, snapshot DOM/CSS variables, resize for breakpoints — optional, not required.

Scoring Guide

  • 9-10: Fully MD3 compliant, uses correct tokens and patterns
  • 7-8: Mostly compliant, minor issues (e.g., a few hardcoded values)
  • 4-6: Partially compliant, some MD3 patterns but significant gaps
  • 1-3: Major violations, mostly non-MD3 or MD2 patterns
  • 0: Not applicable or completely absent

Status thresholds: pass (7+), warn (4-6), fail (0-3)

Reference Documents

  • references/color-system.md — Color roles, tonal palettes, dynamic color, Compose + CSS mapping
  • references/typography-and-shape.md — Type scale, shape corners, elevation, motion, Expressive notes
  • references/component-catalog.md — Components: Compose + @material/web where applicable
  • references/navigation-patterns.md — Navigation selection, Compose-first adaptive patterns
  • references/layout-and-responsive.md — Breakpoints, canonical layouts, insets, foldables
  • references/theming-and-dynamic-color.md — Theming: Compose first, then Flutter and web

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.72%
按下载量换算115

Claude

29.95%
按下载量换算99

Cursor

20.3%
按下载量换算67

Gemini CLI

10.13%
按下载量换算34

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/hamen/material-3-skill --skill material-3 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills