--- name: compose-app-icon description: Author and validate Apple Icon Composer `.icon` packages (Icon Composer 1.x and 2.x). Use this when the user asks to generate an app icon, scaffold a `.icon` from parameters, set up light/dark/tinted appearance variants (specializations), change any field of an existing `icon.json` (fills, blend modes, shadows, translucency, Liquid Glass Mode/Specular/Blur Material/Refractivity, right-to-left asset mirroring, layer layouts, asset filenames), or validate/diagnose a `.icon` package or standalone `icon.json` against the bundled JSON Schema. license: Apache-2.0 --- # Apple Icon Composer `.icon` packages A `.icon` is a directory (macOS document package) containing a declarative `icon.json` and an `Assets/` folder. This skill **authors** new packages, **edits** existing ones in place, and **validates** them against the bundled JSON Schema. All three workflows share one bundled `uv` project. ## Icon Composer 1.x vs 2.0 The schema covers both generations. Icon Composer 2.0 (Xcode 27) added Liquid Glass controls and a forward-compatibility gate; everything a 1.x document contains still validates. | Area | Icon Composer 1.x | Icon Composer 2.0 | |---|---|---| | Document capability gate | — | `features: ["refractivity", "specular-location"]` | | Group blur | `blur` | **`blur-material`** (`blur` is ignored by 2.0) | | Refractivity | — | `refractivity: { enabled, strength, depth }` | | Specular placement | — | `specular-highlight-placement: automatic \| inside \| outside` | | Per-appearance shadow / translucency | nested keys | whole-object `shadow-specializations` / `translucency-specializations` | | Specialization slot | `appearance` | `appearance` + `idiom` + `localization` | | RTL mirroring | — | `implicit-asset-mirroring`, `asset-mirroring: { mirrorable }` | | Group is required to carry `shadow`/`translucency` | yes | **no** — omit either when it is specialized or left at its default | `features` is a hard gate, not a hint: Icon Composer refuses to open a document listing a feature it does not recognize ("This document uses features from a newer version of Icon Composer"). That is the point — it stops Icon Composer 1.x from silently dropping a 2.0-only effect. So **whenever a group carries any `refractivity*` key, the document must declare `features: ["refractivity"]`**, and any `specular-highlight-placement*` key requires `"specular-location"`. The bundled schema enforces both. ## Preflight: confirm `uv` is installed Before running any commands, execute `which uv`. If it exits non-zero (no `uv` on PATH), stop and report the error to the user — this skill requires `uv`. Do not fall back to a system `python3`; the bundled `pyproject.toml` pins `requires-python = ">=3.9"` and dependency versions via `uv.lock`. ## Running the bundled CLIs The two Python CLIs (`create_icon.py`, `validate_icon.py`), the `icon-schema.json` they validate against, and the `pyproject.toml` / `uv.lock` that pin their dependencies all live together in this skill's **`scripts/`** directory, which is a self-contained `uv` project. Run every command from inside it: ```bash # Claude Code / Codex plugin install: cd "${CLAUDE_PLUGIN_ROOT}/skills/compose-app-icon/scripts" # gh skill install: cd into the scripts/ directory next to this SKILL.md instead. uv sync # once, to populate .venv from uv.lock uv run python create_icon.py ... # author a new .icon uv run python validate_icon.py ... # validate a .icon or icon.json ``` The rest of this document shows commands as `uv run python