一键导入
v9-component
Scaffold a new v9 component with all required files following Fluent UI patterns (hook, styles, render, types, tests, stories, conformance)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffold a new v9 component with all required files following Fluent UI patterns (hook, styles, render, types, tests, stories, conformance)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Review a PR for correctness, pattern compliance, testing, accessibility, and safety. Produces a confidence score for merge readiness.
Triage newly-filed GitHub issues on the Fluent UI repo (microsoft/fluentui) following the Shield triage guidelines. Fetches open issues labeled `Needs: Triage :mag:` via the `gh` CLI, classifies each (bug vs feature, product area, partner ask, repro quality, a11y), recommends label changes and area-owner assignment, and then applies the approved changes. Use this skill whenever the user asks to triage issues, run shield triage, go through the triage queue, process needs-triage, or any variation -- even if they don't mention "Fluent UI" or "GitHub" explicitly, since that's the project context here.
Visually verify a component by launching its Storybook story and taking a screenshot with playwright-cli. Use after making visual changes to a component.
Create a beachball change file for the current changes. Determines change type (patch/minor) and generates a description from the diff.
Run lint on affected packages, parse errors, and auto-fix common issues (design tokens, React.FC, SSR safety, import restrictions)
Quick lookup for a Fluent UI package — path, dependencies, owner team, Nx project details, and relevant docs
| name | v9-component |
| description | Scaffold a new v9 component with all required files following Fluent UI patterns (hook, styles, render, types, tests, stories, conformance) |
| disable-model-invocation | true |
| argument-hint | <ComponentName> |
| allowed-tools | Read Write Bash Glob Grep |
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>
Review generated files against docs/architecture/component-patterns.md and fill in component-specific logic.
Add styles in use${ARGUMENTS}Styles.styles.ts using design tokens:
import { makeStyles } from '@griffel/react';
import { tokens } from '@fluentui/react-theme';
Create a default story at the appropriate stories package location if not generated.
Update API docs after adding exports:
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 |