skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
b-open-io/gemskills79 installs

generate-icon

This skill should be used when the user asks to "generate an icon", "create a favicon", "make an app icon", "create iOS icon", "create Android icon", "generate PWA icons", "make desktop app icon", "create Windows icon", "create macOS icon", "app store icon", "Play Store icon", "App Store icon", or needs AI-generated icons with platform-specific sizing.

How do I install this agent skill?

npx skills add https://github.com/b-open-io/gemskills --skill generate-icon
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill generates icons using AI services and local image processing tools. It interacts with external APIs (OpenAI, Gemini, Replicate) and executes local commands (ImageMagick, iconutil) to process and bundle images. It also uses dynamic imports to locate its own resources within the plugin environment.

  • Socketpass

    No alerts

  • Snykfail

    Risk: CRITICAL · 1 issue

  • Runlayerwarn

    2/7 files flagged

What does this agent skill do?

Generate Icon Skill

Generate professional icons for any platform using OpenAI GPT Image 2.6 or Gemini (auto-picked by available key) with automatic background removal, cropping, and multi-size export.

Quick Start

# Favicon for website
bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/generate-icon/scripts/generate.ts "modern tech startup logo letter S" --preset favicon --output ./icons/favicon

# iOS App Store icons
bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/generate-icon/scripts/generate.ts "meditation app lotus flower" --preset apple-app-icon --output ./icons/ios

# Android Play Store + adaptive icons
bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/generate-icon/scripts/generate.ts "fitness tracker flame icon" --preset android-app-icon --output ./icons/android

# PWA manifest icons
bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/generate-icon/scripts/generate.ts "productivity app checkmark" --preset pwa --output ./icons/pwa

# macOS desktop app
bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/generate-icon/scripts/generate.ts "code editor brackets symbol" --preset macos-icns --output ./icons/macos

# Windows desktop app
bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/generate-icon/scripts/generate.ts "music player note icon" --preset windows-ico --output ./icons/windows

# General UI icons
bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/generate-icon/scripts/generate.ts "settings gear" --preset ui-icons --output ./icons/ui

Presets

PresetDescriptionSizesBundle
apple-app-iconiOS/iPadOS App Store18 sizes (1024-20px)No
android-app-iconGoogle Play + adaptive layers11 sizes + foregroundNo
faviconBrowser tab icons8 sizes + ICOYes (.ico)
pwaProgressive Web App11 sizes + maskableNo
macos-icnsmacOS desktop10 sizesYes (.icns)
windows-icoWindows desktop7 sizesYes (.ico)
ui-iconsIn-app icons9 sizes (512-16px)No

Pipeline

  1. Generate - Creates master icon at high resolution via Gemini
  2. Remove Background - Uses Replicate rembg for clean edges
  3. Crop & Center - Trims whitespace, centers on square canvas with 5% padding
  4. Resize - Exports all preset sizes with lanczos3 interpolation
  5. Bundle - Creates ICO/ICNS bundles where needed

Options

bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/generate-icon/scripts/generate.ts "prompt" --preset <name> --output <dir> [options]

Required:
  --preset <name>       Platform preset (see table above)
  --output <dir>        Output directory

Optional:
  --input <image>       Reference image for style guidance
  --master-image <path> Use existing master instead of generating
  --skip-generate       Skip AI generation (requires --master-image)
  --skip-remove-bg      Skip background removal
  --bg-color <hex>      Background color for non-transparent presets

Examples

Using a reference image

bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/generate-icon/scripts/generate.ts "clean app icon version" --preset pwa --input ./existing-logo.png --output ./icons

Using an existing master

bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/generate-icon/scripts/generate.ts "" --preset ui-icons --master-image ./my-icon.png --skip-generate --output ./icons

iOS with custom background color

bun run --cwd ${CLAUDE_PLUGIN_ROOT} ${CLAUDE_PLUGIN_ROOT}/skills/generate-icon/scripts/generate.ts "weather app sun" --preset apple-app-icon --bg-color "#0066CC" --output ./icons/ios

Icon Design Tips

DO:

  • Simple, bold, recognizable silhouette
  • Single focal point
  • High contrast
  • Clean edges
  • Works at 16x16px

DON'T:

  • Fine details that disappear at small sizes
  • Text (unreadable at icon sizes)
  • Complex gradients (banding issues)
  • Multiple competing elements
  • Photos or realistic images

Environment Variables

VariableRequiredDescription
GEMINI_API_KEYYesGoogle AI Studio API key
REPLICATE_API_TOKENYesReplicate API token for background removal

Output Structure

output/
├── master-raw.png        # Original generated image
├── master-nobg.png       # Background removed
├── master-cropped.png    # Cropped and centered
├── master-final.png      # With background (iOS only)
├── favicon.ico           # ICO bundle (favicon preset)
├── AppIcon.icns          # ICNS bundle (macos preset)
├── icon-512.png          # Size variants...
├── icon-256.png
└── ...

Context Discipline

Do not read generated icon images back into context. The script outputs file paths for all generated sizes. Ask the user to visually inspect the results. Icon sets produce many files across multiple sizes - reading them back would quickly exhaust the context window.

Troubleshooting

IssueSolution
"GEMINI_API_KEY not set"Export your API key: export GEMINI_API_KEY=your-key
"REPLICATE_API_TOKEN not set"Export your token: export REPLICATE_API_TOKEN=your-token
ICO not generatedInstall ImageMagick: brew install imagemagick
ICNS not generatedOnly works on macOS (requires iconutil)
Background not removed cleanlyTry a simpler prompt with solid background
Icon too complexSimplify prompt, avoid "detailed" or "realistic"

Provider support

The master image comes from OpenAI gpt-image-2.6-sunburst or Gemini. With no flag, auto-pick prefers OpenAI when OPENAI_API_KEY is set and falls back to the only key present. Force one with --provider openai|gemini. --model sunburst|flare selects the OpenAI variant and implies --provider openai. A --input reference image goes through the OpenAI edits endpoint or the Gemini reference path. xAI is not supported (its image model has no reference images). Background removal needs REPLICATE_API_TOKEN regardless of provider; --skip-remove-bg skips it. A missing provider key stops the script with the exact env var to set.

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/b-open-io/gemskills/generate-icon">View generate-icon on skillZs</a>