icon-generator
Generate Android and iOS app icon sets from one source image with a bundled Pillow script. Use when Codex needs to create mobile app launcher icons, iOS AppIcon.appiconset assets, Android mipmap icons, adaptive icon foreground/background/XML files, extra square sizes, or rounded-corner icon exports from a logo or artwork file.
How do I install this agent skill?
npx skills add https://github.com/anhao/icon-generator-skill --skill icon-generatorIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The icon-generator skill is a safe utility for automating the creation of Android and iOS app icons from a source image. It uses a bundled Python script and the reputable Pillow library to process images locally. No malicious patterns, data exfiltration, or security vulnerabilities were identified.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- ZeroLeakspass
Score: 93/100 · 2 sections analyzed
What does this agent skill do?
Icon Generator
Overview
Use the bundled script to turn one source image into Android and iOS app icon assets. Prefer this skill when the task is deterministic icon export rather than manual image editing.
Quick Start
- Confirm the input image path.
- Run
python3 scripts/icon_generator.py <input-image> -o <output-dir>. - Inspect the generated
android/andios/AppIcon.appiconset/folders.
Install Pillow first if needed:
python3 -m pip install 'Pillow>=10.0.0'
Workflow
Choose output behavior
- Use the default
containmode when the full logo must stay visible and padding is acceptable. - Use
coverwhen the icon must fill the square and center-cropping is acceptable. - Use
--backgroundto control padding color for non-square sources. - Use
--corner-radiuswhen the exported icons should already include rounded corners. - Use
--extra-sizeswhen the user wants additional square PNGs beyond the built-in Android and iOS sizes. - Use
--android-adaptivewhen the user explicitly needs Android adaptive icon resources.
Run the script
Basic export:
python3 scripts/icon_generator.py input.png -o output_icons
Export with crop, white padding, extra sizes, and rounded corners:
python3 scripts/icon_generator.py input.png \
-o output_icons \
--mode cover \
--background '#FFFFFFFF' \
--extra-sizes 256 384 \
--corner-radius 18
Export Android adaptive icons too:
python3 scripts/icon_generator.py input.png \
-o output_icons \
--android-adaptive \
--adaptive-background '#FFFFFF'
Validate Result
- Check
android/mipmap-*for launcher PNGs. - Check
android/play-store/play_store_icon.pngfor the 512px store asset. - Check
ios/AppIcon.appiconset/Contents.jsonplus the generated PNG files. - If adaptive icons were requested, check
android/mipmap-anydpi-v26/for the XML files andic_launcher_foreground.png/ic_launcher_background.png.
Troubleshooting
- If the script exits with a Pillow import error, install Pillow and rerun.
- If colors fail to parse, pass
#RRGGBBor#RRGGBBAA. - If the source image is missing, stop and confirm the path before regenerating.
- If the user asks for non-square outputs or hand-tuned retouching, this skill is the wrong tool; use an image editing workflow instead.
Resources
- Use
scripts/icon_generator.pyfor the actual export. - Read
references/usage.mdfor argument details, size lists, and output structure.
How can the creator link this skill?
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/anhao/icon-generator-skill/icon-generator">View icon-generator on skillZs</a>