Agent skill Frontend
Material 3
Build or refine reusable components for a web interface.
Install the skill
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 --yesCheck 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-3Select 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 manualWhat 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- Repository
hamen/material-3-skill
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
- Map the existing action to color roles
- Set paired roles at the panel scope
- 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.
Map the existing action to color roles
Find where the settings panel sets theme scope.
Prompt · Step 1Use 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.Set paired roles at the panel scope
Use the filled button API and preserve native interaction.
Prompt · Step 2Use `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.
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.