Skill library

Agent skill Frontend

Material 3

Build or refine reusable components for a web interface.

  • UI components
  • Design systems

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add hamen/material-3-skill --skill material-3 --agent claude-code --yes

Check this file in your project.claude/skills/material-3/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add hamen/material-3-skill --skill material-3

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. This example targets an existing Material Web project. The fixture used `@material/web` 2.5.0. Material Web is in maintenance mode. This walkthrough uses its published Web API.

View operation manual

What this skill helps with

  • Build or refine reusable components for a web interface.

Good for

  • Component implementation
Skill name
material-3
Scenario
Apply Material color roles to an existing web action
Deliverable
A scoped light and dark token pair, a filled primary action, and local evidence of its rendered behavior.
Skill name
material-3

Define a component task with an observable result

A request with an unclear outcome

Color the filled button directly in a global CSS rule.

Material Web draws the filled surface inside the component and resolves state colors through token mappings.

A workflow with observable results

  1. Map the existing action to color roles
  2. Set paired roles at the panel scope
  3. Verify both rendered themes

Material Design 3 operation manual

Scope Material system color tokens to one settings panel and validate the filled action in both themes.

Replace the bracketed details with your own project and target.

  1. Map the existing action to color roles

    Find where the settings panel sets theme scope.

    Prompt · Step 1
    Use the `material-3` skill for [existing Material Web settings panel]. Confirm the package version and inspect how this panel receives light and dark CSS. Identify the primary filled action and locate the paired `--md-sys-color-primary` and `--md-sys-color-on-primary` roles. Show the two intended token values for each active theme before editing.
  2. Set paired roles at the panel scope

    Use the filled button API and preserve native interaction.

    Prompt · Step 2
    Use `material-3` to update [approved Material Web panel]. Keep the individual `@material/web/button/filled-button.js` import and `md-filled-button`. Set the paired system variables in the existing theme scope, relying on the documented filled-button mapping. Retain the current action handler and disabled state. Return the component and scoped CSS paths.
  3. Verify both rendered themes

    Check rendered colors and keyboard activation.

    • The button inherits the panel theme colors in both states.
    • The enabled action responds to keyboard activation and the disabled control stays unavailable.
    Prompt · Step 3
    Use `material-3` to preview [local route] in both themes. Confirm the rendered button fill and label colors against their intended token pairs, then use Tab and Enter to activate the enabled action. Check that the disabled control cannot activate its action. Record the actual browser results and the two token pairs.

Find the relevant rule

Point the assistant to the installed Skill and a specific issue.

Find which roles control a filled buttonReference
Command or reference
SKILL.md · Web (limited): @material/web
Examples
Pair the system primary role with its on-primary foreground.

Material Design 3 troubleshooting

Why did the host background color have no effect?

Check the filled component token and its system token default. The filled surface is rendered inside the web component.