microsoft/v9-component
Scaffold a new v9 component with all required files following Fluent UI patterns (hook, styles, render, types, tests, stories, conformance)
npx skills add https://github.com/microsoft/fluentui --skill v9-component
Create a new v9 component named $ARGUMENTS using the repo's Nx generators.
Use the react-component generator:
yarn nx g @fluentui/workspace-plugin:react-component --name $ARGUMENTS --project <project-name>
Where <project-name> is the Nx project (e.g., react-button). This generates all required files: component, types, hook, styles, render, index barrel, and conformance test.
Use the react-library generator first, then add the component:
# Create the package (will prompt for owner team)
yarn create-package
# Or non-interactively:
yarn nx g @fluentui/workspace-plugin:react-library --name <package-name> --owner "<team>"
# Then add the component inside it:
yarn nx g @fluentui/workspace-plugin:react-component --name $ARGUMENTS --project <package-name>
use${ARGUMENTS}Styles.styles.ts using design tokens: import { makeStyles } from '@griffel/react';
import { tokens } from '@fluentui/react-theme';
yarn nx run <project>:generate-api
ForwardRefComponent with React.forwardRef — never React.FC@fluentui/react-theme — never hardcoded colors/spacing/typographyclassName as the LAST argument in mergeClasses()_unstable suffix on exported hooks: use$ARGUMENTS_unstable, use${ARGUMENTS}Styles_unstable, render${ARGUMENTS}_unstablewindow/document/navigator access with canUseDOM() from @fluentui/react-utilities| Generator | Command | Purpose |
| --------------------------------- | ---------------------------------------------------------------------- | --------------------------------------------------- |
| react-component | yarn nx g @fluentui/workspace-plugin:react-component | Add component to existing package |
| react-library | yarn nx g @fluentui/workspace-plugin:react-library | Create new v9 package |
| recipe-generator | yarn nx g @fluentui/workspace-plugin:recipe-generator | Create a v9 recipe |
| prepare-initial-release | yarn nx g @fluentui/workspace-plugin:prepare-initial-release | Prepare package for release (compat/preview/stable) |
| bundle-size-configuration | yarn nx g @fluentui/workspace-plugin:bundle-size-configuration | Setup bundle-size tracking |
| cypress-component-configuration | yarn nx g @fluentui/workspace-plugin:cypress-component-configuration | Setup Cypress component tests |
Take microsoft/v9-component from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.