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

icon-resources

管理 IntelliJ Java 资源目录中的图标,更新生成的图标类或排除规则,并按步骤生成、验证结果及检查调用处;生成字段改变公开 API 时更新 API 转储。

原文查看原文说明

Manage IntelliJ icons, generated Icons classes, and icon-robots rules.

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

实测评分 未实测

查看安装方法

适用场景

  • 添加或改名图标并更新生成类
  • 修复生成图标类不一致
  • 将图标排除在类生成之外

中文介绍

功能

本技能介绍如何在 IntelliJ 的 Java 资源目录中添加、改名、移动、删除和引用图标,并说明生成的 *Icons.java 类及 icon-robots.txt 规则的用法。应该进入生成类的图标,应由生产代码和测试直接使用生成字段;不要为此另建 IconLoader.getIcon(...) 包装器。若要有意排除某个图标,应更新资源附近的 icon-robots.txt 规则。指南还说明如何通过 IDE 运行配置生成类;如果该配置不可用,则运行图标类测试并应用测试打印出的准确差异,之后再次运行测试,确认生成文件没有过期。

适用场景

新增图标没有出现在生成类中,或图标移动、改名后需要整理引用时,可以使用本技能。它也说明了如何检查受影响模块的测试或编译,以及生成字段改变模块公开 API 时如何更新 API 转储。

使用示例

  • “告诉我如何添加这个图标并更新生成类。”
  • “设置规则,让这个图标不进入生成类。”
  • “整理修改图标字段后需要做的检查。”

注意事项

指南使用 IDE 运行配置或 bt.cmd。文档说明 Bazel 没有用于生成图标类的可运行目标。生成字段发生变化时,需要更新受影响模块的 API 转储。

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

文档检查

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

安全性发送数据、删除文件、执行命令等是否有说明
A良好资料说明应用生成差异和更新 API 转储;未提及外发或删除操作。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足需要 IDE 运行配置或 `bt.cmd` 及测试,但未说明其安装条件。

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

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

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

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

包含的文件(1)

  • SKILL.md2.4 KB

SKILL.md(原文)

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

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

Icon Resources

Use this skill when adding, renaming, moving, deleting, or referencing icons under a Java resource root, or when a failure mentions generated icon classes or icon-robots.txt.

Generated Icon Classes

  • Icons under resource roots are normally represented by generated *Icons.java classes.
  • Do not add local IconLoader.getIcon(...) wrappers for icons that should be in a generated icon class. Use the generated field directly from production code and tests.
  • If an icon should intentionally be excluded from class generation, add or update an icon-robots.txt rule near the icon resources instead of creating an ad hoc loader.
  • Generated classes include cache keys derived from normalized SVG content. Do not guess cache keys.

How To Update

  1. Prefer running the IDE run configuration Icons processing | Generate icon classes when available.
  2. If the run configuration is unavailable, run the icon-class test and apply the exact generated diff it prints for the affected class: bt.cmd --module intellij.platform.images.build.tests --filter org.jetbrains.intellij.build.images.CommunityIconClassesTest
  3. After applying the generated output, rerun the same test to confirm there are no stale generated icon classes.
  4. Also run the affected module tests or compilation for production call-site changes; the icon-class test validates generated files but does not necessarily compile every icon consumer.
  5. A new or renamed field in a generated icon class changes the public API. Update the API dumps of each module with a changed icon class. In the monorepo, use the api-dump skill to run ApiCheckTest. For AllIcons, update these modules:
    • intellij.platform.util.ui for AllIcons
    • intellij.platform.icons for AllIconDescriptors
    • intellij.platform.jewel.ui for AllIconsKeys

Bazel Status

As of this guide, icon class generation is not exposed as a Bazel runnable target. The package @community//platform/build-scripts/icons contains library and test targets, but no binary target:

bazel query 'kind(".*binary.*", @community//platform/build-scripts/icons:all)'

Use bt.cmd for verification. If a generator binary target is added later, prefer that documented Bazel target over the IDE run configuration.

评价

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

评论

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

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

提交后会立即公开。请勿填写邮箱、电话等个人信息。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 的全部技能

报告此技能的问题