skills/generators/app-icon-generator/SKILL.md
Generates app icons programmatically using CoreGraphics following Apple HIG. Use when user wants to create, generate, or design an app icon for macOS or iOS.
npx skillsauth add taiberium/claude_code_setting app-icon-generatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate production-quality app icons programmatically using a CoreGraphics Swift script. Produces all required sizes and installs into the Xcode asset catalog.
Use this skill when the user:
Glob: **/Assets.xcassets/AppIcon.appiconset/Contents.json
Contents.json to understand required sizesGather app information to customize the icon:
Read: .planning/APP.md (if exists — app definition)
Read: .planning/CODEBASE.md (if exists — app description)
Grep: "CFBundleName" or app name in project files
If no planning files exist, ask the user.
Ask via AskUserQuestion:
"What category best describes your app?"
"What visual style do you prefer?"
"What color palette fits your app?"
"What accent color for the focal element?"
Read apple-hig-icons.md before generating. Key rules:
Based on the user's answers (or app context), select:
Create a self-contained Swift script at scripts/generate-icon.swift that:
import AppKit and CoreGraphics (no dependencies)icon-variants/ directoryScript structure:
#!/usr/bin/env swift
import AppKit
import CoreGraphics
let size: CGFloat = 1024
// ... helper functions (gradients, glows, shapes)
// ... variant generation functions
// ... save and output
Design building blocks (combine these based on category/style):
| Building Block | Function | Use For |
|---------------|----------|---------|
| drawGradientBackground | Linear gradient fill | All icons |
| drawRadialGlow | Soft colored glow behind focal element | Adding depth |
| drawCircle | Filled/stroked circle | Record buttons, dots, orbs |
| drawRoundedRect | Rounded rectangle | Screens, cards, containers |
| drawRing | Circle outline | Borders, focus rings |
| drawBrackets | Corner bracket marks | Viewfinders, capture |
| drawMonitor | Screen + stand shape | Screen/display apps |
| drawShield | Shield outline | Security/privacy apps |
| drawGear | Gear/cog shape | Settings/utility apps |
| drawWaveform | Audio waveform bars | Audio/music apps |
| drawDocument | Page with fold corner | Document/writing apps |
| drawShine | Elliptical specular highlight | Adding polish |
| drawShadow | Drop shadow beneath element | Adding depth |
swift scripts/generate-icon.swift
Show all 3 variants to the user using the Read tool (Claude can view images). Ask the user to pick one, or request adjustments.
Once the user picks a variant:
sips (built into macOS):For macOS (10 sizes):
sips -z 16 16 master.png --out icon_16x16.png
sips -z 32 32 master.png --out [email protected]
sips -z 32 32 master.png --out icon_32x32.png
sips -z 64 64 master.png --out [email protected]
sips -z 128 128 master.png --out icon_128x128.png
sips -z 256 256 master.png --out [email protected]
sips -z 256 256 master.png --out icon_256x256.png
sips -z 512 512 master.png --out [email protected]
sips -z 512 512 master.png --out icon_512x512.png
sips -z 1024 1024 master.png --out [email protected]
For iOS (single 1024x1024):
cp master.png icon_1024x1024.png
For macOS:
{
"images": [
{ "filename": "icon_16x16.png", "idiom": "mac", "scale": "1x", "size": "16x16" },
{ "filename": "[email protected]", "idiom": "mac", "scale": "2x", "size": "16x16" },
{ "filename": "icon_32x32.png", "idiom": "mac", "scale": "1x", "size": "32x32" },
{ "filename": "[email protected]", "idiom": "mac", "scale": "2x", "size": "32x32" },
{ "filename": "icon_128x128.png", "idiom": "mac", "scale": "1x", "size": "128x128" },
{ "filename": "[email protected]", "idiom": "mac", "scale": "2x", "size": "128x128" },
{ "filename": "icon_256x256.png", "idiom": "mac", "scale": "1x", "size": "256x256" },
{ "filename": "[email protected]", "idiom": "mac", "scale": "2x", "size": "256x256" },
{ "filename": "icon_512x512.png", "idiom": "mac", "scale": "1x", "size": "512x512" },
{ "filename": "[email protected]", "idiom": "mac", "scale": "2x", "size": "512x512" }
],
"info": { "author": "xcode", "version": 1 }
}
For iOS (single size, system generates others):
{
"images": [
{ "filename": "icon_1024x1024.png", "idiom": "universal", "platform": "ios", "size": "1024x1024" }
],
"info": { "author": "xcode", "version": 1 }
}
xcodebuild build -scheme <scheme> -destination 'platform=<platform>' -quietscripts/generate-icon.swift for future regenerationicon-variants/ directory (or add to .gitignore)>_, code braces {}, or gearAfter completion, report:
Icon installed successfully!
Master: scripts/generate-icon.swift (re-run to regenerate)
Sizes: [list of sizes generated]
Location: [path to AppIcon.appiconset]
Build and run to see the icon in:
- Menu bar (macOS)
- Home screen (iOS)
- Finder / Spotlight
- About view
If the user wants changes:
swift scripts/generate-icon.swiftCommon adjustment requests:
tools
Generates multi-step onboarding flows with persistence for iOS/macOS apps. Use when user wants to add onboarding, welcome screens, or first-launch experience.
tools
Generates an offline operation queue with persistence, automatic retry on connectivity, and conflict resolution. Use when user needs offline-first behavior, queued mutations, or pending operations that sync when back online.
development
Generates offer code distribution strategies and configuration guides for subscription and IAP promotions — including partner campaigns, influencer programs, and email re-engagement. Use when setting up offer codes for distribution.
tools
Generates a protocol-based networking layer with async/await, error handling, and swappable implementations. Use when user wants to add API client, networking, or HTTP layer.