Back to list
nkrebs13

asset-gen

by nkrebs13

0🍴 0📅 Jan 18, 2026

SKILL.md


name: asset-gen description: This skill should be used when generating app icons, splash screens, store assets, or marketing materials using the Gemini API. It applies when the user needs to create visual assets for Android or iOS projects, with support for iterative refinement, AI-powered evaluation, style extraction from existing projects, and automatic deployment to project directories. version: "1.0.0" author: Nathan Krebs publish: true triggers:

  • /asset-gen

Asset Generation Skill

Generate professional app assets (icons, splash screens, store graphics) using the Gemini API with iterative refinement and AI-powered evaluation.

Prerequisites

  • Environment variable GEMINI_API_KEY must be set
  • Python 3.11+ with dependencies installed

Install dependencies:

pip install -r ~/.claude/skills/asset-gen/requirements.txt

Quick Start

Run the interactive wizard:

python ~/.claude/skills/asset-gen/scripts/asset_gen.py

With options:

python ~/.claude/skills/asset-gen/scripts/asset_gen.py --project /path/to/project --iterations 3 --variants 3

Custom output directory:

python ~/.claude/skills/asset-gen/scripts/asset_gen.py --output ~/MyAssets

Resume an interrupted session:

python ~/.claude/skills/asset-gen/scripts/asset_gen.py --resume Cloudy_20260116_220000

Workflow Overview

1. Project Discovery

The skill auto-detects project type and existing assets:

  • Android: Parses build.gradle, AndroidManifest.xml, checks res/mipmap-*
  • iOS: Parses Info.plist, checks Assets.xcassets/AppIcon.appiconset
  • KMP: Detects both platforms via shared/ and platform-specific modules

2. Style Extraction

Builds a style profile from multiple sources:

  • Existing assets: Analyzes colors, shapes from current icons
  • Theme files: Extracts colors from colors.xml, Compose themes
  • Category inference: Derives defaults from app category (weather = clean, game = bold)
  • Interactive confirmation: User reviews and can modify the style profile

3. Certainty Calculation

AI determines prompt variation strategy based on style completeness:

CertaintyConditionStrategy
High (>0.8)Existing assets + colors + user confirmedConsistent prompts
Medium (0.5-0.8)Some style data availableModerate exploration
Low (<0.5)Cold start, minimal contextWide exploration

4. Iterative Generation

For each asset type:

  1. Generate N variants using certainty-adjusted prompts
  2. AI evaluates each variant against style requirements
  3. Build on learnings for next iteration
  4. Repeat for M iterations

5. Best Selection

After all iterations:

  • AI scores all variants per asset type
  • Winner marked with _best suffix in filename
  • Single best asset selected per type

6. Deployment

Copies best assets to project directories with proper resizing:

  • Android: res/mipmap-*, drawable/, Play Store icon
  • iOS: Assets.xcassets/AppIcon.appiconset/ with Contents.json

Command Arguments

ArgumentDefaultDescription
--project, -pCurrent directoryPath to project
--output, -o~/Downloads/asset-gen/{project}Output directory for generated assets
--iterations, -i3Number of generation iterations (max: 20)
--variants, -v3Variants generated per iteration (max: 10)
--asset-typesAuto-detectComma-separated: icon,splash,feature,screenshot
--resumeNoneResume from session ID
--deployTrueAuto-deploy best assets to project
--no-deploy-Skip deployment, keep assets in output folder only

Asset Types

TypeDescriptionAspect RatioResolution
iconApp launcher icon1:12K (1024x1024)
icon-adaptive-fgAndroid adaptive foreground1:12K
icon-adaptive-bgAndroid adaptive background1:12K
icon-notificationAndroid notification icon1:11K
splashSplash/launch screen9:162K
featurePlay Store feature graphic16:92K (1024x500)
screenshotStore screenshot9:162K
marketingMarketing banner16:94K

Output Structure

Assets are saved to ~/Downloads/asset-gen/{project_name}/ by default (customizable via --output):

~/Downloads/asset-gen/Cloudy/
├── session.json                    # Session state for resume
├── icon_iter1_v1.jpg
├── icon_iter1_v2.jpg
├── icon_iter1_v3.jpg
├── icon_iter2_v1.jpg
├── icon_iter2_v2.jpg
├── icon_iter2_v3_best.jpg          # Best selection marked
├── splash_iter1_v1.jpg
└── ...

Session Management

Sessions persist full state for resume support:

{
  "session_id": "Cloudy_20260116_220000",
  "project_name": "Cloudy",
  "status": "in_progress",
  "style_profile": { ... },
  "settings": { "iterations": 3, "variants": 3 },
  "iterations": { ... },
  "best_selections": { ... },
  "current_asset_type": "icon",
  "current_iteration": 2
}

Resume with: --resume {session_id}

Platform Deployment

Android Deployment

res/
├── mipmap-mdpi/ic_launcher.png      # 48x48
├── mipmap-hdpi/ic_launcher.png      # 72x72
├── mipmap-xhdpi/ic_launcher.png     # 96x96
├── mipmap-xxhdpi/ic_launcher.png    # 144x144
├── mipmap-xxxhdpi/ic_launcher.png   # 192x192
├── drawable/ic_launcher_foreground.png  # 432x432
└── drawable/ic_launcher_background.png  # 432x432

iOS Deployment

Assets.xcassets/AppIcon.appiconset/
├── Icon-App-20x20@2x.png   # 40x40
├── Icon-App-20x20@3x.png   # 60x60
├── Icon-App-29x29@2x.png   # 58x58
├── Icon-App-29x29@3x.png   # 87x87
├── Icon-App-40x40@2x.png   # 80x80
├── Icon-App-40x40@3x.png   # 120x120
├── Icon-App-60x60@2x.png   # 120x120
├── Icon-App-60x60@3x.png   # 180x180
├── Icon-App-1024x1024@1x.png  # 1024x1024
└── Contents.json

Error Handling

Rate Limits

The generator uses exponential backoff:

  1. Initial retry delay: 2 seconds
  2. Max retries: 5
  3. Max backoff: 60 seconds
  4. User notified after each retry attempt

Generation Failures

  • Failed variants are logged but do not stop the session
  • Minimum 1 variant required per iteration to continue
  • Session saves progress after each iteration for safe resume

Evaluation Criteria

Generated assets are scored on 5 criteria (0-10 scale):

CriterionWeightDescription
Brand Alignment25%Matches style profile, colors correct
Clarity25%Readable at all sizes including 48px
Professionalism20%App Store ready quality
Uniqueness15%Distinctive and memorable
Technical15%No artifacts, proper composition

See evaluation-criteria.md for full rubric.

References

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon