Favicon & Icon Generator Skill
Overview
A comprehensive skill for generating professional favicon and icon systems for web applications. This skill creates SVG-based icons optimized for browsers, search engines, PWAs, and mobile devices, with automated validation and testing tools.
When to Use This Skill
- Setting up icons for a new website or web application
- Fixing missing or broken favicon/icon configurations
- Improving SEO with proper icon display in search results
- Implementing PWA (Progressive Web App) icon requirements
- Creating a complete icon system for multi-platform support
What This Skill Does
1. Icon Design & Creation
- Creates professional SVG icons optimized for web use
- Designs icons that represent the core theme/purpose of the application
- Generates multiple sizes: high-resolution (512x512) and favicon (32x32)
- Uses modern design principles: gradients, proper contrast, recognizable shapes
- Ensures icons are clear and visible at small sizes
2. Configuration Setup
- Updates Next.js
layout.tsx with proper metadata configuration
- Configures PWA
manifest.json with correct icon references
- Sets up HTML head tags for maximum browser compatibility
- Implements proper icon fallbacks and alternatives
3. Automation Tools
- Creates verification script to check icon configuration
- Generates PNG conversion script (optional, requires sharp library)
- Sets up prebuild hooks for automatic validation
- Provides testing pages for visual verification
4. Documentation
- Generates comprehensive setup guides
- Creates quick reference documentation
- Provides deployment checklists
- Includes troubleshooting guides
Icon Design Principles
Visual Elements
Primary Symbol: Main icon representing the app's core purpose
- Should be simple and recognizable
- Works well at small sizes (16x16 to 512x512)
- Uses clear, bold shapes
Color Scheme
- Uses brand colors or theme colors
- Provides good contrast against backgrounds
- Implements gradients for depth and professionalism
- Dark background for dark-themed sites, light for light-themed
Accent Elements
- Secondary symbols or indicators
- Subtle details that don't clutter small sizes
- Complementary colors for visual interest
Technical Requirements
- Format: SVG (Scalable Vector Graphics) for main icons
- Sizes:
- 512x512 (high-resolution, PWA)
- 32x32 (favicon, browser tabs)
- 180x180 (Apple Touch Icon, PNG)
- Optimization: Clean code, minimal file size (< 5KB)
- Compatibility: Works in all modern browsers
File Structure
project/
├── public/
│ ├── icon.svg # Main icon (512x512)
│ ├── favicon.svg # Favicon (32x32)
│ ├── manifest.json # PWA manifest
│ ├── icon-test.html # Testing page
│ └── icon-comparison.html # Before/after comparison
├── src/app/
│ ├── layout.tsx # Next.js metadata config
│ └── apple-icon.png # iOS home screen icon
├── scripts/
│ ├── verify-icons.js # Validation script
│ └── generate-icons.js # PNG generation script
└── docs/
├── ICON_SETUP.md # Detailed guide
└── ICON_QUICK_REFERENCE.md # Quick reference
Implementation Steps
Step 1: Analyze the Application
- Identify the core theme/purpose
- Review existing branding (colors, style)
- Determine key visual elements to represent
- Check current icon configuration (if any)
Step 2: Design the Icon
Create main SVG icon (512x512)
- Primary symbol representing the app
- Brand colors and gradients
- Accent elements for distinction
- Proper viewBox and dimensions
Create favicon version (32x32)
- Simplified version of main icon
- Optimized for small size visibility
- Same color scheme and theme
Step 3: Configure Files
Next.js layout.tsx
export async function generateMetadata(): Promise<Metadata> {
return {
icons: {
icon: [
{ url: "/icon.svg", type: "image/svg+xml" },
{ url: "/favicon.svg", type: "image/svg+xml" },
],
shortcut: "/icon.svg",
apple: [
{ url: "/apple-icon.png", sizes: "180x180", type: "image/png" },
],
other: [
{
rel: "mask-icon",
url: "/icon.svg",
},
],
},
// ... other metadata
};
}
// In the HTML head
<head>
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/apple-icon.png" sizes="180x180" />
</head>
manifest.json
{
"icons": [
{
"src": "/icon.svg",
"sizes": "any",
"type": "image/svg+xml",
"purpose": "any"
},
{
"src": "/favicon.svg",
"sizes": "32x32",
"type": "image/svg+xml",
"purpose": "any"
},
{
"src": "/apple-icon.png",
"sizes": "180x180",
"type": "image/png",
"purpose": "any"
}
]
}
Step 4: Create Automation Tools
Verification Script (verify-icons.js)
- Checks all required files exist
- Validates configuration in layout.tsx and manifest.json
- Reports missing or misconfigured files
- Runs automatically before build (prebuild hook)
Generation Script (generate-icons.js)
- Converts SVG to PNG using sharp library
- Generates multiple sizes (180x180, 192x192, 512x512)
- Optional tool for better compatibility
Testing Pages
- Visual preview of all icons
- Browser tab icon testing
- Before/after comparison
- Deployment checklist
Step 5: Documentation
- Create detailed setup guide (ICON_SETUP.md)
- Create quick reference (ICON_QUICK_REFERENCE.md)
- Create deployment checklist
- Document troubleshooting steps
Step 6: Testing & Validation
- Run verification script
- Test in development environment
- Check browser tab display
- Test on mobile devices
- Validate PWA installation
- Clear cache and retest
SVG Icon Template
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<!-- Gradients for depth -->
<defs>
<linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#1e293b;stop-opacity:1" />
<stop offset="100%" style="stop-color:#0f172a;stop-opacity:1" />
</linearGradient>
<linearGradient id="primary" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color:#60a5fa;stop-opacity:1" />
<stop offset="100%" style="stop-color:#3b82f6;stop-opacity:1" />
</linearGradient>
</defs>
<!-- Background -->
<rect width="512" height="512" rx="80" fill="url(#bg)"/>
<!-- Main symbol -->
<!-- Add your primary icon element here -->
<!-- Accent elements -->
<!-- Add secondary elements here -->
<!-- Subtle effects -->
<!-- Add glow, shadow, or other effects -->
</svg>
Verification Checklist
Pre-Deployment
Post-Deployment
Expected Impact
Immediate Benefits
- ✅ Professional appearance in browser tabs
- ✅ Better user experience (easier to find tabs)
- ✅ Proper PWA support
- ✅ Mobile home screen icons
SEO Benefits (24-48 hours)
- ✅ Icon display in Google search results
- ✅ Increased click-through rate (5-15%)
- ✅ Improved brand recognition
- ✅ Enhanced professional credibility
Long-term Benefits
- ✅ Better user retention
- ✅ Stronger brand identity
- ✅ Improved user trust
- ✅ Higher engagement rates
Troubleshooting
Icon Not Displaying in Browser
- Clear browser cache (Ctrl+Shift+Delete)
- Hard refresh (Ctrl+F5)
- Check file paths are correct
- Verify SVG syntax is valid
- Check browser console for errors
Icon Not in Google Search Results
- Ensure deployed to production
- Wait 24-48 hours for re-crawl
- Request re-index in Google Search Console
- Check robots.txt doesn't block icons
- Verify icon files are publicly accessible
PWA Installation Issues
- Verify manifest.json is valid JSON
- Check icon sizes are correct
- Ensure HTTPS is enabled
- Test on different devices
- Check browser console for PWA errors
Commands Reference
# Verify icon configuration
npm run verify-icons
# Generate PNG versions (requires sharp)
npm install --save-dev sharp
npm run generate-icons
# Build with automatic verification
npm run build
# Test locally
npm run dev
# Visit http://localhost:3000/icon-test.html
Best Practices
Design
- Keep it simple - icons should be recognizable at 16x16
- Use brand colors consistently
- Ensure good contrast
- Test at multiple sizes
- Make it memorable and unique
Technical
- Use SVG for scalability
- Keep file sizes small (< 5KB)
- Validate configuration before deployment
- Test on multiple browsers and devices
- Document the icon system
Maintenance
- Version control all icon files
- Document design decisions
- Keep backup of original designs
- Test after any updates
- Monitor search result display
Integration with Other Tools
Next.js
- Automatic metadata generation
- App directory structure support
- Static export compatibility
- Image optimization integration
PWA
- Manifest.json configuration
- Service worker compatibility
- Install prompt support
- Home screen icon support
SEO Tools
- Google Search Console integration
- Structured data compatibility
- Social media preview support
- Favicon validation tools
Example Use Cases
1. Gaming Website
- Icon: Sword, controller, or game-specific symbol
- Colors: Vibrant, energetic (blue, red, purple)
- Style: Bold, dynamic, action-oriented
2. Calculator/Tool Website
- Icon: Calculator symbol, chart, or tool icon
- Colors: Professional (blue, green, gray)
- Style: Clean, modern, functional
3. E-commerce Site
- Icon: Shopping bag, cart, or product
- Colors: Trustworthy (blue, green, orange)
- Style: Friendly, approachable, clear
4. Blog/Content Site
- Icon: Letter, book, or pen
- Colors: Readable (black, blue, red)
- Style: Classic, elegant, simple
Resources
Design Tools
- Figma (free, web-based)
- Inkscape (free, desktop)
- Adobe Illustrator (paid)
- SVG editors online
Conversion Tools
- CloudConvert (SVG to PNG)
- Sharp library (Node.js)
- ImageMagick (command line)
- Online favicon generators
Testing Tools
- Browser DevTools
- Google Search Console
- Lighthouse (PWA audit)
- Real device testing
Documentation
Skill Outputs
When this skill is applied, you will receive:
Icon Files
- icon.svg (512x512)
- favicon.svg (32x32)
- Optional PNG versions
Configuration Files
- Updated layout.tsx
- Updated manifest.json
- Updated package.json
Automation Scripts
- verify-icons.js
- generate-icons.js
- Testing HTML pages
Documentation
- Setup guide
- Quick reference
- Deployment checklist
- Troubleshooting guide
Testing Tools
- Visual preview page
- Comparison page
- Verification script
Success Metrics
Technical Metrics
- ✅ All verification checks pass
- ✅ Icons display in all major browsers
- ✅ PWA installation works
- ✅ No console errors
Business Metrics
- 📈 Click-through rate increase (5-15%)
- 📈 Brand recognition improvement
- 📈 User retention increase
- 📈 Professional credibility boost
Maintenance Schedule
Immediate (After Implementation)
- Test on all target browsers
- Verify mobile display
- Check PWA installation
- Monitor for errors
Short-term (1-7 days)
- Check Google search results
- Monitor click-through rates
- Collect user feedback
- Fix any issues
Long-term (Monthly)
- Review analytics impact
- Update if branding changes
- Test on new browsers/devices
- Keep documentation current
Skill Version: 1.0
Last Updated: 2026-02-09
Compatibility: Next.js 13+, React 18+, Modern Browsers
Difficulty: Intermediate
Time to Implement: 1-2 hours
1---2name: favicon-icon-generator3description: Generate and validate favicon and application icon systems for web projects. Use when creating SVG icons, web manifests, framework metadata, or cross-platform favicon assets.4---56# Favicon & Icon Generator Skill78## Overview9A comprehensive skill for generating professional favicon and icon systems for web applications. This skill creates SVG-based icons optimized for browsers, search engines, PWAs, and mobile devices, with automated validation and testing tools.1011## When to Use This Skill12- Setting up icons for a new website or web application13- Fixing missing or broken favicon/icon configurations14- Improving SEO with proper icon display in search results15- Implementing PWA (Progressive Web App) icon requirements16- Creating a complete icon system for multi-platform support1718## What This Skill Does1920### 1. Icon Design & Creation21- Creates professional SVG icons optimized for web use22- Designs icons that represent the core theme/purpose of the application23- Generates multiple sizes: high-resolution (512x512) and favicon (32x32)24- Uses modern design principles: gradients, proper contrast, recognizable shapes25- Ensures icons are clear and visible at small sizes2627### 2. Configuration Setup28- Updates Next.js `layout.tsx` with proper metadata configuration29- Configures PWA `manifest.json` with correct icon references30- Sets up HTML head tags for maximum browser compatibility31- Implements proper icon fallbacks and alternatives3233### 3. Automation Tools34- Creates verification script to check icon configuration35- Generates PNG conversion script (optional, requires sharp library)36- Sets up prebuild hooks for automatic validation37- Provides testing pages for visual verification3839### 4. Documentation40- Generates comprehensive setup guides41- Creates quick reference documentation42- Provides deployment checklists43- Includes troubleshooting guides4445## Icon Design Principles4647### Visual Elements481. **Primary Symbol**: Main icon representing the app's core purpose49 - Should be simple and recognizable50 - Works well at small sizes (16x16 to 512x512)51 - Uses clear, bold shapes52532. **Color Scheme**54 - Uses brand colors or theme colors55 - Provides good contrast against backgrounds56 - Implements gradients for depth and professionalism57 - Dark background for dark-themed sites, light for light-themed58593. **Accent Elements**60 - Secondary symbols or indicators61 - Subtle details that don't clutter small sizes62 - Complementary colors for visual interest6364### Technical Requirements65- **Format**: SVG (Scalable Vector Graphics) for main icons66- **Sizes**: 67 - 512x512 (high-resolution, PWA)68 - 32x32 (favicon, browser tabs)69 - 180x180 (Apple Touch Icon, PNG)70- **Optimization**: Clean code, minimal file size (< 5KB)71- **Compatibility**: Works in all modern browsers7273## File Structure7475```76project/77├── public/78│ ├── icon.svg # Main icon (512x512)79│ ├── favicon.svg # Favicon (32x32)80│ ├── manifest.json # PWA manifest81│ ├── icon-test.html # Testing page82│ └── icon-comparison.html # Before/after comparison83├── src/app/84│ ├── layout.tsx # Next.js metadata config85│ └── apple-icon.png # iOS home screen icon86├── scripts/87│ ├── verify-icons.js # Validation script88│ └── generate-icons.js # PNG generation script89└── docs/90 ├── ICON_SETUP.md # Detailed guide91 └── ICON_QUICK_REFERENCE.md # Quick reference92```9394## Implementation Steps9596### Step 1: Analyze the Application971. Identify the core theme/purpose982. Review existing branding (colors, style)993. Determine key visual elements to represent1004. Check current icon configuration (if any)101102### Step 2: Design the Icon1031. Create main SVG icon (512x512)104 - Primary symbol representing the app105 - Brand colors and gradients106 - Accent elements for distinction107 - Proper viewBox and dimensions1081092. Create favicon version (32x32)110 - Simplified version of main icon111 - Optimized for small size visibility112 - Same color scheme and theme113114### Step 3: Configure Files115116#### Next.js layout.tsx117```typescript118export async function generateMetadata(): Promise<Metadata> {119 return {120 icons: {121 icon: [122 { url: "/icon.svg", type: "image/svg+xml" },123 { url: "/favicon.svg", type: "image/svg+xml" },124 ],125 shortcut: "/icon.svg",126 apple: [127 { url: "/apple-icon.png", sizes: "180x180", type: "image/png" },128 ],129 other: [130 {131 rel: "mask-icon",132 url: "/icon.svg",133 },134 ],135 },136 // ... other metadata137 };138}139140// In the HTML head141<head>142 <link rel="icon" href="/icon.svg" type="image/svg+xml" />143 <link rel="icon" href="/favicon.svg" type="image/svg+xml" />144 <link rel="apple-touch-icon" href="/apple-icon.png" sizes="180x180" />145</head>146```147148#### manifest.json149```json150{151 "icons": [152 {153 "src": "/icon.svg",154 "sizes": "any",155 "type": "image/svg+xml",156 "purpose": "any"157 },158 {159 "src": "/favicon.svg",160 "sizes": "32x32",161 "type": "image/svg+xml",162 "purpose": "any"163 },164 {165 "src": "/apple-icon.png",166 "sizes": "180x180",167 "type": "image/png",168 "purpose": "any"169 }170 ]171}172```173174### Step 4: Create Automation Tools175176#### Verification Script (verify-icons.js)177- Checks all required files exist178- Validates configuration in layout.tsx and manifest.json179- Reports missing or misconfigured files180- Runs automatically before build (prebuild hook)181182#### Generation Script (generate-icons.js)183- Converts SVG to PNG using sharp library184- Generates multiple sizes (180x180, 192x192, 512x512)185- Optional tool for better compatibility186187#### Testing Pages188- Visual preview of all icons189- Browser tab icon testing190- Before/after comparison191- Deployment checklist192193### Step 5: Documentation1941. Create detailed setup guide (ICON_SETUP.md)1952. Create quick reference (ICON_QUICK_REFERENCE.md)1963. Create deployment checklist1974. Document troubleshooting steps198199### Step 6: Testing & Validation2001. Run verification script2012. Test in development environment2023. Check browser tab display2034. Test on mobile devices2045. Validate PWA installation2056. Clear cache and retest206207## SVG Icon Template208209```xml210<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">211 <!-- Gradients for depth -->212 <defs>213 <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">214 <stop offset="0%" style="stop-color:#1e293b;stop-opacity:1" />215 <stop offset="100%" style="stop-color:#0f172a;stop-opacity:1" />216 </linearGradient>217 <linearGradient id="primary" x1="0%" y1="0%" x2="0%" y2="100%">218 <stop offset="0%" style="stop-color:#60a5fa;stop-opacity:1" />219 <stop offset="100%" style="stop-color:#3b82f6;stop-opacity:1" />220 </linearGradient>221 </defs>222 223 <!-- Background -->224 <rect width="512" height="512" rx="80" fill="url(#bg)"/>225 226 <!-- Main symbol -->227 <!-- Add your primary icon element here -->228 229 <!-- Accent elements -->230 <!-- Add secondary elements here -->231 232 <!-- Subtle effects -->233 <!-- Add glow, shadow, or other effects -->234</svg>235```236237## Verification Checklist238239### Pre-Deployment240- [ ] All icon files created (icon.svg, favicon.svg)241- [ ] Configuration files updated (layout.tsx, manifest.json)242- [ ] Verification script passes243- [ ] Icons display correctly in browser tabs244- [ ] Testing pages work correctly245- [ ] Build completes without errors246247### Post-Deployment248- [ ] Browser tab icon displays (Chrome, Firefox, Safari, Edge)249- [ ] Mobile browser icon displays (iOS Safari, Android Chrome)250- [ ] PWA installation works correctly251- [ ] Bookmarks show icon252- [ ] Google Search Console indexed (wait 24-48 hours)253- [ ] Search results show icon (wait 24-48 hours)254255## Expected Impact256257### Immediate Benefits258- ✅ Professional appearance in browser tabs259- ✅ Better user experience (easier to find tabs)260- ✅ Proper PWA support261- ✅ Mobile home screen icons262263### SEO Benefits (24-48 hours)264- ✅ Icon display in Google search results265- ✅ Increased click-through rate (5-15%)266- ✅ Improved brand recognition267- ✅ Enhanced professional credibility268269### Long-term Benefits270- ✅ Better user retention271- ✅ Stronger brand identity272- ✅ Improved user trust273- ✅ Higher engagement rates274275## Troubleshooting276277### Icon Not Displaying in Browser2781. Clear browser cache (Ctrl+Shift+Delete)2792. Hard refresh (Ctrl+F5)2803. Check file paths are correct2814. Verify SVG syntax is valid2825. Check browser console for errors283284### Icon Not in Google Search Results2851. Ensure deployed to production2862. Wait 24-48 hours for re-crawl2873. Request re-index in Google Search Console2884. Check robots.txt doesn't block icons2895. Verify icon files are publicly accessible290291### PWA Installation Issues2921. Verify manifest.json is valid JSON2932. Check icon sizes are correct2943. Ensure HTTPS is enabled2954. Test on different devices2965. Check browser console for PWA errors297298## Commands Reference299300```bash301# Verify icon configuration302npm run verify-icons303304# Generate PNG versions (requires sharp)305npm install --save-dev sharp306npm run generate-icons307308# Build with automatic verification309npm run build310311# Test locally312npm run dev313# Visit http://localhost:3000/icon-test.html314```315316## Best Practices317318### Design3191. Keep it simple - icons should be recognizable at 16x163202. Use brand colors consistently3213. Ensure good contrast3224. Test at multiple sizes3235. Make it memorable and unique324325### Technical3261. Use SVG for scalability3272. Keep file sizes small (< 5KB)3283. Validate configuration before deployment3294. Test on multiple browsers and devices3305. Document the icon system331332### Maintenance3331. Version control all icon files3342. Document design decisions3353. Keep backup of original designs3364. Test after any updates3375. Monitor search result display338339## Integration with Other Tools340341### Next.js342- Automatic metadata generation343- App directory structure support344- Static export compatibility345- Image optimization integration346347### PWA348- Manifest.json configuration349- Service worker compatibility350- Install prompt support351- Home screen icon support352353### SEO Tools354- Google Search Console integration355- Structured data compatibility356- Social media preview support357- Favicon validation tools358359## Example Use Cases360361### 1. Gaming Website362- Icon: Sword, controller, or game-specific symbol363- Colors: Vibrant, energetic (blue, red, purple)364- Style: Bold, dynamic, action-oriented365366### 2. Calculator/Tool Website367- Icon: Calculator symbol, chart, or tool icon368- Colors: Professional (blue, green, gray)369- Style: Clean, modern, functional370371### 3. E-commerce Site372- Icon: Shopping bag, cart, or product373- Colors: Trustworthy (blue, green, orange)374- Style: Friendly, approachable, clear375376### 4. Blog/Content Site377- Icon: Letter, book, or pen378- Colors: Readable (black, blue, red)379- Style: Classic, elegant, simple380381## Resources382383### Design Tools384- Figma (free, web-based)385- Inkscape (free, desktop)386- Adobe Illustrator (paid)387- SVG editors online388389### Conversion Tools390- CloudConvert (SVG to PNG)391- Sharp library (Node.js)392- ImageMagick (command line)393- Online favicon generators394395### Testing Tools396- Browser DevTools397- Google Search Console398- Lighthouse (PWA audit)399- Real device testing400401### Documentation402- [Next.js Metadata API](https://nextjs.org/docs/app/api-reference/functions/generate-metadata)403- [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest)404- [Favicon Best Practices](https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs)405406## Skill Outputs407408When this skill is applied, you will receive:4094101. **Icon Files**411 - icon.svg (512x512)412 - favicon.svg (32x32)413 - Optional PNG versions4144152. **Configuration Files**416 - Updated layout.tsx417 - Updated manifest.json418 - Updated package.json4194203. **Automation Scripts**421 - verify-icons.js422 - generate-icons.js423 - Testing HTML pages4244254. **Documentation**426 - Setup guide427 - Quick reference428 - Deployment checklist429 - Troubleshooting guide4304315. **Testing Tools**432 - Visual preview page433 - Comparison page434 - Verification script435436## Success Metrics437438### Technical Metrics439- ✅ All verification checks pass440- ✅ Icons display in all major browsers441- ✅ PWA installation works442- ✅ No console errors443444### Business Metrics445- 📈 Click-through rate increase (5-15%)446- 📈 Brand recognition improvement447- 📈 User retention increase448- 📈 Professional credibility boost449450## Maintenance Schedule451452### Immediate (After Implementation)453- Test on all target browsers454- Verify mobile display455- Check PWA installation456- Monitor for errors457458### Short-term (1-7 days)459- Check Google search results460- Monitor click-through rates461- Collect user feedback462- Fix any issues463464### Long-term (Monthly)465- Review analytics impact466- Update if branding changes467- Test on new browsers/devices468- Keep documentation current469470---471472**Skill Version**: 1.0 473**Last Updated**: 2026-02-09 474**Compatibility**: Next.js 13+, React 18+, Modern Browsers 475**Difficulty**: Intermediate 476**Time to Implement**: 1-2 hours