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 rshankras/claude-code-apple-skills 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:
development
Build, install, and launch an iOS app on a physical iPhone or iPad entirely from the command line (no Xcode GUI), using xcodebuild + devicectl. Use when the user wants to run, test, or screenshot their app on a real device without opening Xcode.
development
Comprehensive iOS development guidance including Swift best practices, SwiftUI patterns, UI/UX review against HIG, and app planning. Use for iOS code review, best practices, accessibility audits, or planning new iOS apps.
development
Build, install, launch, and screenshot an iOS app in the Simulator to verify a change visually. Use when the user wants to run the app, see a change live, screenshot the running app, or confirm a UI fix actually works (not just that it compiles).
development
Audits skills in this repo for consistency, API drift, and structural gaps. Produces a prioritized report grouped by severity (Critical/High/Medium/Low). Use when asked to "audit skills", "check the skill repo for drift", or when planning bulk skill cleanup. Read-only — does not apply fixes.