Index of every page on this site: llms.txt
All skills
daveebbelaar avatar

/app-icon

@22dc792
by Dave Ebbelaardaveebbelaar/bama1.9k stars
238
Run it yourself

Liquid Glass macOS app icon made as an Icon Composer file (Icon/AppIcon.icon, JSON plus SVG layers), compiled with actool, and reviewed in every look with ictool. Use when the user wants an app icon, a better icon, or a Dock icon.

Use this Skill: https://skilld.dev/gh/daveebbelaar/bama/app-icon

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

more-cases.md

≈924 tokens on demand. Your agent reads this file only when SKILL.md points to it.

App icon: more cases

Learned converting Onyx (XcodeGen, 4 icon designs, 20 color themes) to Icon Composer, October 2026.

Contents

  • Xcode or XcodeGen app
  • Convert a flat icon
  • A Dock icon that changes (themes, styles)
  • Layer tricks

Xcode or XcodeGen app

No build.sh or make_icon.sh needed: Xcode 26 compiles a .icon on its own.

  1. Put AppIcon.icon anywhere inside the target's sources (Onyx uses Onyx/Resources/AppIcon.icon). XcodeGen 2.46 adds it as a wrapper.icon resource; in Xcode, drag it into the target.
  2. Delete AppIcon.appiconset from the asset catalog. Two icons named AppIcon clash.
  3. Keep ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon.

Check: the built app's Contents/Resources has Assets.car and AppIcon.icns, and its Info.plist has CFBundleIconName = AppIcon.

Convert a flat icon

A flat icon (an .icns, PNGs, or SVGs with the body drawn in) becomes layers:

  • Keep only the shapes: the object, its parts, the accent. Drop the rounded body, drop shadows, the rim light, sheens, glows, and inner blurs. The background color moves to fill.
  • Art drawn inside the old 824 px body keeps its coordinates. Give the group "position": {"scale": 1.2427, "translation-in-points": [0, 0]} and it fills the square (1024 / 824).
  • One shape per layer when it should catch its own light (a ball and a panel in front of it). Shapes that never overlap can share a layer.

A Dock icon that changes (themes, styles)

NSApp.applicationIconImage shows a flat picture: the system adds no glass to it, and it ignores the dark, tinted, and clear looks. So:

  • The default look clears the override (NSApp.applicationIconImage = nil), and the Dock shows the real .icon with every system look.
  • Every other variant is rendered ahead of time with ictool and shipped in the bundle. Load it by name at runtime; keep a drawn fallback.
  • ictool draws the rounded square edge to edge, but Dock pictures need Apple's margin. Render at 412 px and pad to 512 px (80.5%, the 824/1024 ratio).
  • Save as HEIC: it keeps transparency at about 10 KB per 512 px icon, against 160 KB for PNG. Onyx ships 160 variants in 1.9 MB.
  • A script builds the .icon for each variant (only the colors change), renders the Default and Dark renditions, and runs them 6 at a time: 160 icons take about 15 seconds.
ictool="$(xcode-select -p)/../Applications/Icon Composer.app/Contents/Executables/ictool"
"$ictool" Variant.icon --export-image --output-file v.png --platform macOS \
  --rendition Default --width 412 --height 412 --scale 1
sips --padToHeightWidth 512 512 v.png --out v-padded.png
sips -s format heic v-padded.png --out glass-orb-onyx-light.heic
static func glassImage(design: String, theme: String, dark: Bool) -> NSImage? {
    let name = "glass-\(design)-\(theme)-\(dark ? "dark" : "light")"
    return Bundle.main.url(forResource: name, withExtension: "heic").flatMap(NSImage.init(contentsOf:))
}

Use the same pictures inside the app (a header, an icon picker) so the app shows the icon the Dock shows.

Layer tricks

  • SVG linearGradient fills render fine in a layer. Put one gradient per shape for the accent.
  • A different file per appearance: "image-name-specializations": [{"value": "card.svg"}, {"appearance": "dark", "value": "card-dark.svg"}]. Use it when grays that read on white vanish on the dark body.
  • A different background per appearance: "fill-specializations": [{"value": {...}}, {"appearance": "dark", "value": {...}}].
  • A frosted panel in front of a colored shape: a white layer at "opacity": 0.75 with glass on, listed above the colored layer.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts28d3 checks · Risk SAFE
  • Gen Agent Trust Hub28d

    This skill provides a legitimate utility for macOS developers to create app icons using the Icon Composer format. It uses standard developer tools and local scripts to automate the asset generation and review process.

  • Socket28d

    No alerts

  • Snyk28d

    Risk: LOW · No issues

Signed by skilld at 22dc792. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated last month
What it can do
Runs commands
All 1 allowed tools
Bash(tools/make_icon.sh) Bash(tools/icon_review.sh) Bash(./build.sh *) Read Edit Write

README badge

README badge for daveebbelaar/bama/app-icon