v9-component

Создайте каркас нового компонента v9 со всеми необходимыми файлами, следуя паттернам Fluent UI (hook, styles, render, types, tests, stories, conformance)

npx skills add https://github.com/microsoft/fluentui --skill v9-component

Scaffold a V9 Component

Create a new v9 component named $ARGUMENTS using the repo's Nx generators.

Steps

Adding a component to an existing package

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.

Creating a new package + component

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>

After scaffolding

  1. Review generated files against docs/architecture/component-patterns.md and fill in component-specific logic.

  2. Add styles in use${ARGUMENTS}Styles.styles.ts using design tokens:

    import { makeStyles } from '@griffel/react';
    import { tokens } from '@fluentui/react-theme';
    
  3. Create a default story at the appropriate stories package location if not generated.

  4. Update API docs after adding exports:

    yarn nx run <project>:generate-api
    

Critical Rules

  • Always use ForwardRefComponent with React.forwardRef — never React.FC
  • Always use design tokens from @fluentui/react-theme — never hardcoded colors/spacing/typography
  • Always preserve user className as the LAST argument in mergeClasses()
  • Use _unstable suffix on exported hooks: use$ARGUMENTS_unstable, use${ARGUMENTS}Styles_unstable, render${ARGUMENTS}_unstable
  • Guard any window/document/navigator access with canUseDOM() from @fluentui/react-utilities
  • Do not add dependencies on other Tier 3 component packages (see docs/architecture/layers.md)

Available Generators Reference

GeneratorCommandPurpose
react-componentyarn nx g @fluentui/workspace-plugin:react-componentAdd component to existing package
react-libraryyarn nx g @fluentui/workspace-plugin:react-libraryCreate new v9 package
recipe-generatoryarn nx g @fluentui/workspace-plugin:recipe-generatorCreate a v9 recipe
prepare-initial-releaseyarn nx g @fluentui/workspace-plugin:prepare-initial-releasePrepare package for release (compat/preview/stable)
bundle-size-configurationyarn nx g @fluentui/workspace-plugin:bundle-size-configurationSetup bundle-size tracking
cypress-component-configurationyarn nx g @fluentui/workspace-plugin:cypress-component-configurationSetup Cypress component tests

Больше skills от microsoft

oss-growth
microsoft
Персона OSS-хакера роста
agent-framework-azure-ai-py
microsoft
Создание агентов Azure AI Foundry с использованием Microsoft Agent Framework Python SDK (agent-framework-azure-ai). Используйте при создании постоянных агентов с AzureAIAgentsProvider, применении размещенных инструментов (интерпретатор кода, поиск файлов, веб-поиск), интеграции MCP-серверов, управлении потоками бесед или реализации потоковых ответов. Охватывает функциональные инструменты, структурированные выходные данные и агентов с несколькими инструментами.
development
airunway-aks-setup
microsoft
Настройка AI Runway на AKS — от пустого кластера до работающей модели. Охватывает проверку кластера, установку контроллера, оценку GPU, настройку провайдера и первое развертывание. КОГДА: «настроить AI Runway», «подключить кластер AKS», «установить AI Runway», «airunway setup», «развернуть модель на AKS», «GPU-инференс на AKS», «настройка KAITO на AKS», «запуск LLM на AKS», «vLLM на AKS», «настройка обслуживания моделей на AKS», «контроллер AI Runway».
devops
appinsights-instrumentation
microsoft
Guidance for instrumenting webapps with Azure Application Insights. Provides telemetry patterns, SDK setup, and configuration references. WHEN: how to instrument app, App Insights SDK, telemetry patterns, what is App Insights, Application Insights guidance, instrumentation examples, APM best practices.
devops
applicationinsights-web-ts
microsoft
Инструментируйте браузерные/веб-приложения с помощью JavaScript SDK Application Insights (@microsoft/applicationinsights-web). Используйте для мониторинга реальных пользователей (RUM) — просмотры страниц, клики, зависимости AJAX/fetch, исключения, пользовательские события и трассировки агентов GenAI на стороне браузера, коррелируемые с бэкенд-трассировками OpenTelemetry. Охватывает скрипт загрузчика SDK и настройку npm, расширения фреймворков (React, React Native, Angular), Click Analytics, инициализаторы телеметрии и семантические конвенции OTel GenAI для спанов агента/инструмента/модели, генерируемых из браузера.
devops
azure-ai-anomalydetector-java
microsoft
Создавайте приложения для обнаружения аномалий с помощью Azure AI Anomaly Detector SDK для Java. Используйте при реализации одномерного/многомерного обнаружения аномалий, анализа временных рядов или мониторинга на основе ИИ.
development
azure-ai-language-conversations-py
microsoft
Реализация понимания разговорного языка (CLU) с использованием Python SDK azure-ai-language-conversations. Используйте при работе с ConversationAnalysisClient для анализа намерений и сущностей в разговоре, создании NLP-функций или интеграции языкового понимания в приложения.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 для Python. Используется для рабочих областей ML, заданий, моделей, наборов данных, вычислений и конвейеров. Триггеры: "azure-ai-ml", "MLClient", "workspace", "model registry", "training jobs", "datasets".
development