---
name: jetbrains-icon-resources
description: "Manage IntelliJ icons, generated Icons classes, and icon-robots rules."
license: "NOASSERTION"
metadata:
  decimalai-skill-id: "426fb5c2-d819-4b09-bf0d-5e6128617ebf"
  decimalai-version-id: "0210260a-4c9c-4cb4-abda-d4a71da8d00c"
  decimalai-version: "6"
  decimalai-body-sha256: "23992186f2aa8f97db2dae4af3ec39d34bae969d170a23675fe27cfb8e6e0d8f"
  decimalai-name: "jetbrains/icon-resources"
  decimalai-format: "1"
  decimalai-invocation: "model"
  decimalai-category: "coding"
  decimalai-source: "https://app.decimal.ai/s/jetbrains-icon-resources@6/SKILL.md"
---
<!-- 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.cmd 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.
