跳到正文
cccskills
免费在 GitHub 公开中文介绍

icons

创建或审查适用于IntelliJ New UI的SVG图标,整理浅色和深色主题版本,并按界面用途检查画布尺寸、配色、图形、文件位置及旧图标映射。

原文查看原文说明

Create or review IntelliJ New UI SVG icons and theme variants.

JetBrains/intellij-community星标 20,685(GitHub 20,685 + cccskills 0)

实测评分 未实测

查看安装方法

适用场景

  • 制作New UI图标
  • 检查浅色和深色SVG版本
  • 设置Classic图标替换映射

中文介绍

功能

此技能协助创建或审查IntelliJ New UI使用的SVG图标。它会根据图标用途检查画布尺寸、文件位置、文件名以及线条和图形的绘制方式,并帮助按照官方调色板准备浅色和深色版本。替换Classic UI图标时,也会说明保留旧文件并在*IconMappings.json中添加映射的步骤。对于工具窗口图标,还会检查不同尺寸的文件是否采用相同的视觉主题。

适用场景

为IntelliJ插件或平台添加图标、审查现有图标的主题适配或New UI显示,或者希望按规范确认SVG配色和尺寸的处理方式时,可以使用此技能。

使用示例

  • “请检查这个SVG是否符合New UI图标规范。”
  • “请审查从浅色版本制作深色版本时的差异。”
  • “请说明如何用New UI图标替换现有的Classic图标。”

注意事项

图标应使用SVG制作,不使用图像、渐变、滤镜或嵌入字体。请保留Apache 2.0版权注释。颜色和文件位置等细节可参考palette.md等附带文件。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

文档检查

AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。

安全性发送数据、删除文件、执行命令等是否有说明
A良好说明SVG制作规范,未描述删除或向外部发送操作。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足要求参考`palette.md`等附带资料,但未提供安装步骤。

不计入评分。 由 AI(OpenAI Codex)于 2026年10月28日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(3)

  • SKILL.md12.1 KB
  • examples.md8.5 KB
  • palette.md5.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

<!-- Generated by community/.ai/render-guides.mjs; edit community/.agents/skills/icons/SKILL.md -->

IntelliJ Platform New UI Icons

Guidance for authoring SVG icons for the New UI.

Background: the IDE maintains Classic UI and New UI in parallel. Code branches with ExperimentalUI.isNewUI(); icons follow the same split. Old icons stay in their original resource folders for Classic-UI compatibility. New-UI icons live under expui/ folders and are substituted for the old ones at runtime by icon mappers.

Golden rules

  1. Always ship two SVGs — one for the light theme (e.g. addFile.svg) and one for the dark theme with the _dark suffix (addFile_dark.svg). Geometry must be identical between them; only the palette swaps.
    • Tool-window icons ship as a quartet, not a pair. When a tool window has both a 16×16 base (name.svg / name_dark.svg) and a 20×20 New-UI stripe variant (name@20x20.svg / name@20x20_dark.svg), they must share the same metaphor. The stripe is only one surface — the 16×16 base also appears in Search Everywhere, Find Action, context menus, the Services tool window, recent locations, and the View ▸ Tool Windows menu. Changing only the @20x20 leaves users seeing two different icons for the same tool window depending on where they encounter it. Always update all four files together (and the same applies to plugin-local icons like toolWindowChat.svg + toolWindowChat@20x20.svg).
  2. Only use colors from the canonical palette. See palette.md. Picking a one-off color breaks theming and contrast.
  3. One canvas size per icon role. See Icon roles. Do not invent new sizes or pad with empty space — IntelliJ scales the canvas as a single unit.
  4. No raster, no gradients, no filters, no embedded fonts. Path geometry only (<path>, <rect>, <circle>, <line>, <polyline>, <polygon>). Text must be converted to outlines.
  5. Use fill="none" on the root <svg> and set fill / stroke explicitly per shape — never rely on CSS or currentColor.
  6. Strokes use stroke-width="1", stroke-linecap="round", stroke-linejoin="round" (or stroke-miterlimit="10" for hard joins). Heavier strokes are reserved for hero glyphs inside a circle badge (e.g. status checkmarks) and use stroke-width="1.5" or "2".
  7. Pixel-grid align: keep stroke axes on half-pixel centers (x.5) and fills on whole pixels so the icon stays crisp at 1× rendering.
  8. Preserve the Apache 2.0 copyright comment as line 1. Match the year of contribution.
  9. File names use camelCase matching the action/node ID and stay ASCII-only.

Icon roles

RoleCanvasFilename patternReference dir
Action icons (menus, popups, toolbars)16×16name.svg + name_dark.svgexpui/actions/, expui/general/
Tree node icons (PSI, structure view)16×16name.svg + name_dark.svgexpui/nodes/
Tool-window stripe icons (legacy/16)16×16name.svg + name_dark.svgexpui/toolwindows/
Tool-window stripe icons (New UI)20×20name@20x20.svg + name@20x20_dark.svgexpui/toolwindows/
Main toolbar (New UI)20×20name@20x20.svg + name@20x20_dark.svgexpui/general/, expui/run/, expui/toolbar/
Editor gutter icons14×14 (small marks 12×12, 9×9)name.svg + name_dark.svgexpui/gutter/
Status bar / inline status16×16name.svg + name_dark.svgexpui/status/, expui/inline/
Breakpoint marks14×14 (12×12 for sub-marks)name.svg + name_dark.svgexpui/breakpoints/
Run-config tags & disclosure chevrons16×16 (chevron*.svg may be 9×9 to 16×16)name.svg + name_dark.svgexpui/run/, expui/general/
Welcome/onboarding & logos (system)16, 20, 28, 48 (per surface)name.svg + name_dark.svgexpui/ide/, expui/welcome/

When in doubt, find a sibling icon in the same folder and copy its width / height / viewBox.

Where the SVGs live

Two placements exist and both are valid — pick based on whether a Classic-UI icon already exists:

  • Only New UI needed → put the SVG (and its _dark sibling) under an expui/<role>/ resource root. Callers reference it directly through the plugin's generated <Plugin>Icons class.
  • Replacing an existing Classic-UI icon → keep the Classic file at its old path, put the New UI SVG under the matching expui/<role>/ path, and add a mapping entry to the nearest *IconMappings.json. At runtime, when ExperimentalUI.isNewUI() is true, the mapper substitutes the New UI file for the Classic one so no caller has to change its icon reference.

Mapping-file shape (excerpt from community/platform/icons/src/PlatformIconMappings.json):

{
  "expui": {
    "actions": {
      "addFile.svg": "actions/addFile.svg",
      "checked.svg": ["actions/checked.svg", "actions/setDefault.svg"]
    }
  }
}

Key = path relative to the expui/ root (the New UI file). Value = the Classic path(s) that should resolve to it. A single New UI icon may back multiple Classic paths.

SVG skeleton

<!-- Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
  <!-- shapes, ordered back-to-front -->
</svg>

The dark variant is the same file with light-palette colors swapped for their dark-theme partner — see palette.md. Never change geometry between the two.

Composition rules

  • One semantic meaning per icon. A status badge, an accent dot, or a "+" overlay is fine; two unrelated glyphs in one icon is not.
  • Optical centering, not geometric. Plus/arrow/refresh glyphs sit slightly above center; round badges (class, method, status) are centered on (cx=8, cy=8) for 16×16 and (cx=10, cy=10) for 20×20.
  • Outer keep-out: leave at least 1 px of empty padding on each side of a 16×16 icon (so meaningful geometry lives within 1..15). For 20×20 use 2 px of padding. Stripe icons must stay visually balanced inside their 20×20 cell.
  • Stroke + fill pairing for node-style icons (e.g. nodes/class.svg): a light-tinted fill at radius 6.5 with a stroke in the accent color, plus a glyph filled with the same accent.
    • Light: <circle cx="8" cy="8" r="6.5" fill="<accent-bg-light>" stroke="<accent-light>"/> then glyph fill="<accent-light>".
    • Dark: same circle with fill="<accent-bg-dark>" stroke="<accent-dark>" and glyph filled with <accent-dark>.
  • Stroke-only icons (chevrons, refresh, edit pencil): a single-color path using the neutral stroke (#6C707E light / #CED0D6 dark) at stroke-width="1". Use #818594 (light) / #6F737A (dark) for "secondary" stroke glyphs like dropdown chevrons.
  • Status badges (error/warning/success/info) follow this template:
    • Light: filled circle/triangle in the accent color, glyph painted in white.
    • Dark: filled circle/triangle in the dark accent color, glyph painted in the matching muted dark fill (e.g. #5E4D33 inside #F2C55C warning) — never plain white.
  • Two-tone action icons (e.g. actions/addFile.svg): the base glyph uses the neutral gray, and the small "modifier" (+, ✕, ↻, gear) uses the primary blue accent. Light gray + blue accent → dark gray + blue accent in the dark variant.
  • Disabled / stroke-only variants (e.g. *_stroke.svg): outline-only, same neutral stroke color, no fills.

Palette quick reference

The full lookup is in palette.md. Most icons only need:

RoleLightDark
Primary stroke / fill#6C707E#CED0D6
Secondary stroke#818594#6F737A
Disabled / faint fill#EBECF0#43454A
Accent — Blue#3574F0#548AF7
Accent — Blue (bg)#EDF3FF / #E7EFFD#25324D
Accent — Red#DB3B4B#DB5C5C
Accent — Red (bg)#FFF7F7#402929
Status — Error fill#E55765#DB5C5C
Status — Warning fill#FFAF0F#F2C55C
Status — Success fill#55A76A#57965C
Accent — Green#208A3C#57965C
Accent — Green (bg)#F2FCF3#253627
Accent — Orange#E66D17#C77D55
Accent — Orange (bg)#FFF4EB#45322B
Accent — Yellow/Gold#FFAF0F / #C27D04#F2C55C / #D6AE58
Accent — Purple#834DF0#B589EC
Accent — Purple (bg)#FAF5FF#2F2936
White on dark badgewhitematching muted-dark fill (e.g. #5E4D33)

Do not use plain #000000 or off-the-palette grays.

Generation workflow

  1. Pick the role and canvas size from the table above. Find at least two visually similar siblings under community/platform/icons/src/expui/<role>/ and read their SVG sources. Mirror their stroke/fill mix.
  2. Lay out geometry on the pixel grid (whole-pixel fills, half-pixel stroke centers). Optical-center the glyph.
  3. Apply the canonical light palette from palette.md. Never invent colors.
  4. Save the light SVG with the Apache 2.0 header, width/height/viewBox matching the role, and fill="none" on <svg>.
  5. Duplicate to the _dark filename and swap each color for its dark-theme partner from the palette mapping. Keep paths byte-identical otherwise.
  6. Place and wire the file:
    • Fresh New UI icon → drop into the matching expui/<role>/ resource folder; reference it from the plugin's <Plugin>Icons class.
    • Replacement for a Classic icon → keep the Classic file untouched, add the New UI file under expui/<role>/, add a mapping entry to the nearest *IconMappings.json. Callers keep referencing the old path.
  7. Verify visually in both themes via the image preview in the IDE, or run the IDE and toggle View ▸ Appearance ▸ New UI to compare. Check selection states for stripe icons.

Common mistakes

  • Off-palette colors (e.g. importing from Figma without remapping). They will not theme correctly and reviewers will reject the PR.
  • Different geometry between light and dark variants — selection animations and HiDPI overlays will glitch.
  • A 16-px glyph saved into a 20×20 canvas without re-balancing. Tool-window/main-toolbar icons need geometry tuned for 20×20, not a 16×16 reused with extra whitespace.
  • Using currentColor, CSS, or <style> blocks. The IntelliJ icon loader requires explicit colors on every shape so it can do palette-based recoloring.
  • Forgetting the _dark variant. The icon will look fine in Light theme then turn invisible in Dark.
  • Pure-black (#000) or pure-white (#FFF) fills outside the status-badge glyph pattern. They break under accent recoloring.
  • Adding a New UI SVG without a *IconMappings.json entry when replacing a Classic icon — the Classic icon will keep showing in New UI mode.

References

  • palette.md — full color palette with light↔dark mapping.
  • examples.md — annotated SVG snippets for each icon role, copied from the live icon set.
  • Canonical example tree: community/platform/icons/src/expui/ — when reviewing, diff your new icon against a sibling there.
  • Repo-level Icons guidelines.svg is a design sheet (visual reference only; not machine-readable). When it disagrees with the folder, trust the folder.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

actions

免费有简介

实现或修改 IntelliJ `AnAction`,并在 `plugin.xml` 中注册。将显示名称和说明写入消息资源文件,按需设置图标,并通过事件协程作用域启动挂起任务,避免同步处理阻塞 IDE。

  • 为 IDE 菜单添加操作
  • 修改操作注册或图标
  • 整理操作名称和说明
JetBrains/intellij-community2.1万2026年10月29日 更新

bazel-test-migration

免费有简介

将 IntelliJ JPS 测试模块迁移到 Bazel,并排查仅在 Bazel 中出现的失败。根据症状检查依赖、插件、测试数据和 runfiles,重新生成并验证目标。

  • 将 JPS 测试模块迁移到 Bazel
  • 排查仅在 Bazel 中失败的测试
  • 检查测试依赖和数据配置
JetBrains/intellij-community2.1万2026年10月29日 更新

code-style

免费有简介

按 IntelliJ 项目规范编写或审查 Kotlin 和 Java 代码,涵盖语言选择、格式、密封类型、线程注解及控制流异常处理。

  • 按 IntelliJ 规范编写 Kotlin
  • 审查 Java 代码
  • 检查异常处理和密封类型分支
JetBrains/intellij-community2.1万2026年10月29日 更新

commits

免费有简介

本指南帮助您按 IntelliJ 项目规则拆分更改并撰写提交信息:有工单时使用编号和变更说明,无工单时使用标签与子系统名,并在需要时说明原因和决定。

  • 按项目格式编写带工单号的提交信息
  • 整理测试或文档提交并选择合适标签
  • 按规则修改已有提交信息
JetBrains/intellij-community2.1万2026年10月29日 更新

使用多个 Python 类型检查器比较代码片段或文件的类型推断和报错判断,并汇总各工具的结论、耗时与诊断信息,可保存为 Markdown 报告。

  • 比较不同检查器的类型推断
  • 确认代码是否会被判为类型错误
  • 查看多个工具的诊断差异
JetBrains/intellij-community2.1万2026年10月29日 更新

整理 Compose Desktop 界面中的状态和副作用,让可组合函数负责绘制,由展示器或协调器处理应用决策。了解状态归属、Effect、可复用组件接口、延迟列表键、动画和性能,适用于单项界面修改。

  • 分离界面绘制与展示器决策
  • 整理界面状态的归属
  • 检查 Effect 键和协程用法
JetBrains/intellij-community2.1万2026年10月29日 更新

查看 JetBrains 的全部技能

报告此技能的问题