Token导航 LogoToken导航

Agent Skill · 前端设计

fluent2-design-system(Fluent2 设计系统)

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

fluent2-design-system 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 7,000。

总安装 432周安装 18GitHub Stars 1下载 144核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:fluent2-design-system(Fluent2 设计系统)
来源仓库:https://github.com/dodatech/approved-skills
仓库路径:skills/fluent2-design-system
安装命令:
npx skills add https://github.com/dodatech/approved-skills --skill fluent2-design-system
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dodatech/approved-skills --skill fluent2-design-system

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

fluent2-design-system 用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。

使用时需结合现有品牌、设计系统和用户任务,避免只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。安装前需确认权限范围、维护状态,注意是否触发联网、命令执行或文件读写。

来源仓库内路径:skills/fluent2-design-system

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dodatech/approved-skills --skill fluent2-desig…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

fluent2-design-system 怎么安装?

在终端执行 npx skills add https://github.com/dodatech/approved-skills --skill fluent2-design-system。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

fluent2-design-system 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

fluent2-design-system 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/dodatech/approved-skills --skill fluent2-design-system 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

fluent2-design-system 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

fluent2-design-system 用的人多吗?

公开数据是累计安装 432 次,近一周安装 18 次,下载 144 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

fluent2-design-system 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
fluent2-design-system

Fluent2 设计系统 · 本页

4321执行命令未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Fluent 2 Design System

Build production-grade interfaces using Microsoft's Fluent 2 design system with @fluentui/react-components (v9).

Quick Start

Every Fluent 2 React app requires a FluentProvider wrapping the component tree with a theme:

import {
  FluentProvider,
  webLightTheme,
  webDarkTheme,
  Button,
  tokens,
  makeStyles,
  mergeClasses,
} from "@fluentui/react-components";

export default function App() {
  return (
    <FluentProvider theme={webLightTheme}>
      <Button appearance="primary">Hello Fluent 2</Button>
    </FluentProvider>
  );
}

Install: npm install @fluentui/react-components

Core Architecture

Theming

  • Built-in themes: webLightTheme, webDarkTheme, teamsLightTheme, teamsDarkTheme, teamsHighContrastTheme
  • Custom branding: Use createLightTheme(brandRamp) / createDarkTheme(brandRamp) with a BrandVariants object (keys 10–160)
  • Nesting: FluentProvider can nest for sub-trees with different themes
  • Theme values are emitted as CSS custom properties on the provider element

Styling with Griffel

Use makeStyles (from @fluentui/react-components) — never inline styles or external CSS for token-aware styling.

const useStyles = makeStyles({
  root: {
    backgroundColor: tokens.colorNeutralBackground1,
    color: tokens.colorNeutralForeground1,
    display: "flex",
    gap: tokens.spacingHorizontalM,
    padding: tokens.spacingVerticalM,
  },
  active: {
    backgroundColor: tokens.colorBrandBackground,
    color: tokens.colorNeutralForegroundOnBrand,
  },
});

function MyComponent({ isActive }) {
  const styles = useStyles();
  return (
    <div className={mergeClasses(styles.root, isActive && styles.active)}>
      Content
    </div>
  );
}

Critical rules:

  • Define makeStyles outside components (module scope)
  • Use mergeClasses() to compose classes — never concatenate strings
  • Use tokens.* for all colors, spacing, typography, radii, shadows — never hardcode hex/px values
  • CSS shorthands (border, borderRadius, padding, etc.) are not supported — use shorthands.* helper or longhand properties
  • Pseudo-selectors use nested objects: ":hover": {color: tokens.colorBrandForeground1}
  • Media queries use nested objects: "@media (min-width: 768px)": {flexDirection: "row"}

Component Model

All v9 components follow a consistent pattern:

  • Slots: Named sub-parts (e.g., root, icon, content) that accept props or JSX
  • Appearance variants: "primary", "secondary", "subtle", "transparent", "outline"
  • Size variants: "small", "medium", "large"
  • Shape variants: "rounded", "circular", "square"

Override component styles via className with makeStyles/mergeClasses.

Design Tokens

Tokens are the bridge between design intent and code. Always use tokens.* — never raw values.

For complete token reference tables (color, typography, spacing, elevation, stroke, corner radius), see references/tokens.md.

Token Categories at a Glance

CategoryPrefixExample
Neutral colorscolorNeutral*tokens.colorNeutralBackground1
Brand colorscolorBrand*tokens.colorBrandBackground
Status colorscolorPalette{Color}*tokens.colorPaletteRedForeground1
TypographyfontFamily*, fontSize*, fontWeight*, lineHeight*tokens.fontSizeBase300
SpacingspacingHorizontal*, spacingVertical*tokens.spacingHorizontalM
Border radiusborderRadius*tokens.borderRadiusMedium
Stroke widthstrokeWidth*tokens.strokeWidthThin
Shadowshadow*tokens.shadow4
Durationduration*tokens.durationNormal
Easingcurve*tokens.curveEasyEase

Two-Layer Token System

  1. Global tokens — context-agnostic raw values (e.g., colorBlue60, fontSize300)
  2. Alias tokens — semantic meaning applied to globals (e.g., colorBrandBackground → blue, colorNeutralForeground1 → dark gray)

In code, consume alias tokens via the tokens object.

Layout

  • Grid: Use CSS Grid/Flexbox — Fluent 2 v9 has no Stack component
  • Spacing scale: 4px base unit. Values: XXS(2), XS(4), S(8), M(12), L(16), XL(20), XXL(24), XXXL(32)
  • Column grid: 12-column framework recommended for web; use CSS grid
  • Alignment: Use tokens.spacingHorizontal* and tokens.spacingVertical* for consistent spacing

Typography

  • Primary typeface: Segoe UI (web), Segoe UI Variable (Windows), SF Pro (macOS/iOS), Roboto (Android)
  • Font stack: tokens.fontFamilyBase = Segoe UI → system fallbacks → sans-serif
  • Monospace: tokens.fontFamilyMonospace
  • Text presets: Use <Text> component with preset variants — Caption1, Body1, Body1Strong, Subtitle1, Subtitle2, Title1, Title2, Title3, LargeTitle, Display
  • Alignment: Left-align for LTR; Fluent handles RTL automatically via Griffel

Color System

Three palettes:

  1. Neutral — blacks, whites, grays for surfaces, text, layout
  2. Brand — accent colors reinforcing identity (default Microsoft brand = blue)
  3. Shared/Status — cross-product colors: red (danger), green (success), yellow (warning), blue (informational)

Interaction states: rest → hover (darker) → pressed (darkest). Focus adds a thicker stroke, not a color change.

Accessibility

  • All components include ARIA roles, keyboard navigation (via Tabster), and focus management
  • High contrast: use teamsHighContrastTheme or handle @media (forced-colors: active) with system colors (ButtonText, Highlight, etc.)
  • Focus indicators are visible by default — never remove them
  • Ensure WCAG contrast via semantic token pairing (e.g., colorNeutralForeground1 on colorNeutralBackground1)

Component Inventory

For the full categorized component list with usage notes, see references/components.md.

Most-Used Components

Actions: Button, CompoundButton, SplitButton, ToggleButton, MenuButton, Link Inputs: Input, Textarea, Select, Combobox, Dropdown, Checkbox, RadioGroup, Switch, Slider, SpinButton, DatePicker, TimePicker Layout: Card, Divider, Drawer, Dialog, Popover, Tooltip Data Display: Table, DataGrid, Tree, Accordion, Badge, Avatar, AvatarGroup, Tag, Persona Navigation: TabList, Breadcrumb, Nav (preview) Feedback: Toast, MessageBar, ProgressBar, Spinner, Skeleton Surfaces: Menu, Toolbar, Overflow

Common Patterns

App Shell Layout

const useStyles = makeStyles({
  app: {
    backgroundColor: tokens.colorNeutralBackground1,
    display: "grid",
    gridTemplateColumns: "1fr",
    gridTemplateRows: "auto 1fr auto",
    height: "100vh",
    width: "100%",
  },
  header: {
    borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
    paddingTop: tokens.spacingVerticalS,
    paddingBottom: tokens.spacingVerticalS,
    paddingLeft: tokens.spacingHorizontalM,
    paddingRight: tokens.spacingHorizontalM,
  },
  content: {
    display: "grid",
    gridTemplateColumns: "280px 1fr",
    overflow: "hidden",
  },
  nav: {
    borderRight: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
    overflowY: "auto",
  },
  main: {
    overflowY: "auto",
    paddingLeft: tokens.spacingHorizontalL,
    paddingRight: tokens.spacingHorizontalL,
    paddingTop: tokens.spacingVerticalL,
    paddingBottom: tokens.spacingVerticalL,
  },
});

Custom Brand Theme

import { createLightTheme, createDarkTheme } from "@fluentui/react-components";

const myBrand = {
  10: "#020305", 20: "#111723", 30: "#16263D",
  40: "#193253", 50: "#1B3F6A", 60: "#1B4C82",
  70: "#18599B", 80: "#1267B4", 90: "#3174C2",
  100: "#4F82C8", 110: "#6790CF", 120: "#7F9ED5",
  130: "#96ADDC", 140: "#ADBCE3", 150: "#C4CBE9",
  160: "#DBDBF0",
};

const lightTheme = createLightTheme(myBrand);
const darkTheme = createDarkTheme(myBrand);

Dark Mode Toggle

function App() {
  const [isDark, setIsDark] = useState(false);
  return (
    <FluentProvider theme={isDark ? webDarkTheme : webLightTheme}>
      <Switch
        label="Dark mode"
        checked={isDark}
        onChange={(_, data) => setIsDark(data.checked)}
      />
    </FluentProvider>
  );
}

Anti-Patterns

  • ❌ Hardcoded colors (color: "#333") — use tokens.colorNeutralForeground1
  • ❌ CSS shorthand properties in makeStyles (border: "1px solid red") — use longhand or shorthands.*
  • ❌ String concatenation of classNames — use mergeClasses()
  • ❌ Inline style props for token-based values — use makeStyles with tokens
  • ❌ Importing from @fluentui/react (v8) in v9 projects — use @fluentui/react-components
  • ❌ Using v8 Stack — use CSS Grid or Flexbox
  • ❌ Overriding CSS custom properties from the color system directly in CSS — the adaptive color system is JS-driven
  • ❌ Removing focus indicators — accessibility requirement

平台分布

Codex

34.75%
按下载量换算50

Claude

30.75%
按下载量换算44

Cursor

17.37%
按下载量换算25

Gemini CLI

9.69%
按下载量换算14

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/dodatech/approved-skills --skill fluent2-design-system 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills