icons

GitHub

提供 Fluent UI 图标选型、命名及打包规范。指导在 TSX 中通过 CLI 搜索已安装包或在线仓库获取图标,推荐动态缩放图标并演示 bundleIcon 用法。

starters/coreai/.agents/skills/icons/SKILL.md github/replica

触发场景

需要选择或更换图标名称 在 TSX 文件中添加或修改图标 需要将图标打包为组合组件

安装

npx skills add github/replica --skill icons -g -y
更多选项

非标准路径

npx skills add https://github.com/github/replica/tree/main/starters/coreai/.agents/skills/icons -g -y

不安装直接使用

npx skills use github/replica@icons

指定 Agent (Claude Code)

npx skills add github/replica --skill icons -a claude-code -g -y

安装 repo 全部 skill

npx skills add github/replica --all -g -y

预览 repo 内 skill

npx skills add github/replica --list

SKILL.md

Frontmatter
{
    "name": "icons",
    "description": "Conventions for picking, sizing, and bundling Fluent icons. USE WHEN: adding or changing an icon in a `*.tsx` file, or picking an icon name."
}

Icon Usage

When looking for icon names,

  • Prefer searching the installed @fluentui/react-icons exports so the names match the version the app actually uses. Run this from this app's directory, replacing the search expression with the concept you need:
node -e "const icons = require('@fluentui/react-icons'); console.log(Object.keys(icons).filter(name => /document.*add/i.test(name) && !/\d/.test(name) && /(?:Regular|Filled)$/.test(name)).join('\n'));"

The example searches document-add icons, excludes numbered-size exports, and keeps filled/regular styles.

  • As an alternate, search the icon repo names for discovery or visual previews: https://github.com/microsoft/fluentui-system-icons/blob/main/icons_regular.md or https://github.com/microsoft/fluentui-system-icons/blob/main/icons_filled.md.
  • After choosing an icon through an alternate method, verify that its exact export name exists in the installed @fluentui/react-icons package; the online catalog may include icons from newer versions.

Prefer using the unsized icons without the number suffix, e.g. TextBulletListTreeFilled instead of TextBulletListTree20Filled. This allows the icon to scale dynamically within buttons and other components.

When adding icons to Fluent components, use the bundleIcon utility from @fluentui/react-icons to combine filled and regular icons. For example:

const TraceIcon = bundleIcon(TextBulletListTreeFilled, TextBulletListTreeRegular);

<Button icon={<TraceIcon />} />;

版本历史

  • f19c050 当前 2026-11-07 08:51

同 Skill 集合

.github/extensions/replica-prototype/skills/replica-pick-and-polish/SKILL.md
.github/extensions/replica-prototype/skills/replica-publish-prototype/SKILL.md
.github/extensions/replica-prototype/skills/review-hub-feedback/SKILL.md
.github/skills/code-review/SKILL.md
.github/skills/write-tests/SKILL.md
starters/coreai/.agents/skills/coreai-ds-fluentui-react/SKILL.md
starters/coreai/.agents/skills/css-styling/SKILL.md
starters/coreai/.agents/skills/interpreting-html/SKILL.md
starters/coreai/.agents/skills/lint/SKILL.md
starters/coreai/.agents/skills/new-variant/SKILL.md
starters/coreai/.agents/skills/react-components/SKILL.md
starters/coreai/.agents/skills/routing/SKILL.md
starters/coreai/.agents/skills/start-app/SKILL.md
starters/coreai/.agents/skills/state-management/SKILL.md
starters/shared/.agents/context-templates/SKILL.md
starters/shared/.agents/skills/accessibility-audit/SKILL.md
starters/shared/.agents/skills/add-seed-data/SKILL.md
starters/shared/.agents/skills/agent-browser/SKILL.md
starters/shared/.agents/skills/browser-canvas-validation/SKILL.md
starters/shared/.agents/skills/component-design-system-review/SKILL.md
starters/shared/.agents/skills/create-prototype/SKILL.md
starters/shared/.agents/skills/developer-handoff/SKILL.md
starters/shared/.agents/skills/prepare-feedback-proposals/SKILL.md
starters/shared/.agents/skills/product-design/SKILL.md
starters/shared/.agents/skills/prototype-controls/SKILL.md
starters/shared/.agents/skills/responsive-audit/SKILL.md
starters/shared/.agents/skills/review-hub-feedback/SKILL.md
starters/shared/.agents/skills/setup-skills/SKILL.md
starters/shared/.agents/skills/visual-design-review/SKILL.md
starters/coreai/.agents/skills/features-variants/SKILL.md

元信息

文件数
0
版本
f19c050
Hash
c2195172
收录时间
2026-11-07 08:51

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-09 02:07
浙ICP备14020137号-1