Favicon icon generator

From kennyzir/7deer_skills · View interactive version

Favicon icon generator is an AI agent skill from the GitHub repository kennyzir/7deer_skills. 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.

How to use this skill

Skill file

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

What This Skill Does

1. Icon Design & Creation

2. Configuration Setup

3. Automation Tools

4. Documentation

Icon Design Principles

Visual Elements

  1. Primary Symbol: Main icon representing the app's core purpose
  1. Color Scheme
  1. Accent Elements

Technical Requirements

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

  1. Identify the core theme/purpose
  2. Review existing branding (colors, style)
  3. Determine key visual elements to represent
  4. Check current icon configuration (if any)

Step 2: Design the Icon

  1. Create main SVG icon (512x512)
  1. Create favicon version (32x32)

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)
Generation Script (generate-icons.js)
Testing Pages

Step 5: Documentation

  1. Create detailed setup guide (ICON_SETUP.md)
  2. Create quick reference (ICON_QUICK_REFERENCE.md)
  3. Create deployment checklist
  4. Document troubleshooting steps

Step 6: Testing & Validation

  1. Run verification script
  2. Test in development environment
  3. Check browser tab display
  4. Test on mobile devices
  5. Validate PWA installation
  6. 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

SEO Benefits (24-48 hours)

Long-term Benefits

Troubleshooting

Icon Not Displaying in Browser

  1. Clear browser cache (Ctrl+Shift+Delete)
  2. Hard refresh (Ctrl+F5)
  3. Check file paths are correct
  4. Verify SVG syntax is valid
  5. Check browser console for errors

Icon Not in Google Search Results

  1. Ensure deployed to production
  2. Wait 24-48 hours for re-crawl
  3. Request re-index in Google Search Console
  4. Check robots.txt doesn't block icons
  5. Verify icon files are publicly accessible

PWA Installation Issues

  1. Verify manifest.json is valid JSON
  2. Check icon sizes are correct
  3. Ensure HTTPS is enabled
  4. Test on different devices
  5. 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

  1. Keep it simple - icons should be recognizable at 16x16
  2. Use brand colors consistently
  3. Ensure good contrast
  4. Test at multiple sizes
  5. Make it memorable and unique

Technical

  1. Use SVG for scalability
  2. Keep file sizes small (< 5KB)
  3. Validate configuration before deployment
  4. Test on multiple browsers and devices
  5. Document the icon system

Maintenance

  1. Version control all icon files
  2. Document design decisions
  3. Keep backup of original designs
  4. Test after any updates
  5. Monitor search result display

Integration with Other Tools

Next.js

PWA

SEO Tools

Example Use Cases

1. Gaming Website

2. Calculator/Tool Website

3. E-commerce Site

4. Blog/Content Site

Resources

Design Tools

Conversion Tools

Testing Tools

Documentation

Skill Outputs

When this skill is applied, you will receive:

  1. Icon Files
  1. Configuration Files
  1. Automation Scripts
  1. Documentation
  1. Testing Tools

Success Metrics

Technical Metrics

Business Metrics

Maintenance Schedule

Immediate (After Implementation)

Short-term (1-7 days)

Long-term (Monthly)


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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.