Web asset generator skill

Generate web assets including favicons, app icons (PWA), and social media meta images (Open Graph) for Facebook, Twitter, WhatsApp, and LinkedIn.

by alonw0·MIT license·★ 512 Stars on the repo·GitHub ↗

Use now

Files of Web asset generator

alonw0/main1 file shown
SKILL.md
Show the full text767 lines
web-asset-generator/SKILL.md767 lines · 25.9 KB
Outline
RawView on GitHub

Web Asset Generator

Generate professional web assets from logos or text slogans, including favicons, app icons, and social media meta images.

Quick Start

When a user requests web assets:

  1. Use AskUserQuestion tool to clarify needs if not specified:

    • What type of assets they need (favicons, app icons, social images, or everything)
    • Whether they have source material (logo image vs text/slogan)
    • For text-based images: color preferences
  2. Check for source material:

    • If user uploaded an image: use it as the source
    • If user provides text/slogan: generate text-based images
  3. Run the appropriate script(s):

    • Favicons/icons: scripts/generate_favicons.py
    • Social media images: scripts/generate_og_images.py
  4. Provide the generated assets and HTML tags to the user

Using Interactive Questions

IMPORTANT: Always use the AskUserQuestion tool to gather requirements instead of plain text questions. This provides a better user experience with visual selection UI.

Why Use AskUserQuestion?

✅ Visual UI: Users see options as clickable chips/tags instead of typing responses ✅ Faster: Click to select instead of typing out answers ✅ Clearer: Descriptions explain what each option means ✅ Fewer errors: No typos or misunderstandings from free-form text ✅ Professional: Consistent with modern Claude Code experience

Example Flow

User request: "I need web assets"

Claude uses AskUserQuestion (not plain text):

What type of web assets do you need?                    [Asset type]
○ Favicons only - Browser tab icons (16x16, 32x32, 96x96) and favicon.ico
○ App icons only - PWA icons for iOS/Android (180x180, 192x192, 512x512)
○ Social images only - Open Graph images for Facebook, Twitter, WhatsApp, LinkedIn
● Everything - Complete package: favicons + app icons + social images

User clicks → Claude immediately knows what to generate

Question Patterns

Below are the standard question patterns to use in various scenarios. Copy the structure and adapt as needed.

Question Pattern 1: Asset Type Selection

When the user's request is vague (e.g., "create web assets", "I need icons"), use AskUserQuestion:

Question: "What type of web assets do you need?" Header: "Asset type" Options:

  • "Favicons only" - Description: "Browser tab icons (16x16, 32x32, 96x96) and favicon.ico"
  • "App icons only" - Description: "PWA icons for iOS/Android (180x180, 192x192, 512x512)"
  • "Social images only" - Description: "Open Graph images for Facebook, Twitter, WhatsApp, LinkedIn"
  • "Everything" - Description: "Complete package: favicons + app icons + social images"
Question Pattern 2: Source Material

When the asset type is determined but source is unclear:

Question: "What source material will you provide?" Header: "Source" Options:

  • "Logo image" - Description: "I have or will upload a logo/image file"
  • "Emoji" - Description: "Generate favicon from an emoji character"
  • "Text/slogan" - Description: "Create images from text only"
  • "Logo + text" - Description: "Combine logo with text overlay (for social images)"
Question Pattern 3: Platform Selection (for social images)

When user requests social images but doesn't specify platforms:

Question: "Which social media platforms do you need images for?" Header: "Platforms" Multi-select: true Options:

  • "Facebook/WhatsApp/LinkedIn" - Description: "Standard 1200x630 Open Graph format"
  • "Twitter" - Description: "1200x675 (16:9 ratio) for large image cards"
  • "All platforms" - Description: "Generate all variants including square format"
Question Pattern 4: Color Preferences (for text-based images)

When generating text-based social images:

Question: "What colors should we use for your social images?" Header: "Colors" Options:

  • "I'll provide colors" - Description: "Let me specify exact hex codes for brand colors"
  • "Default theme" - Description: "Use default purple background (#4F46E5) with white text"
  • "Extract from logo" - Description: "Auto-detect brand colors from uploaded logo"
  • "Custom gradient" - Description: "Let me choose gradient colors"
Question Pattern 5: Icon Type Clarification

When user says "create icons" or "generate icons" (ambiguous):

Question: "What kind of icons do you need?" Header: "Icon type" Options:

  • "Website favicon" - Description: "Small browser tab icon"
  • "App icons (PWA)" - Description: "Mobile home screen icons"
  • "Both" - Description: "Favicon + app icons"
Question Pattern 6: Emoji Selection

When user selects "Emoji" as source material:

Step 1: Ask for project description (free text):

  • "What is your website/app about?"
  • Use this to generate emoji suggestions

Step 2: Use AskUserQuestion to present the 4 suggested emojis:

Question: "Which emoji best represents your project?" Header: "Emoji" Options: (Dynamically generated based on project description)

  • Example: "🚀 Rocket" - Description: "Rocket, launch, startup, space"
  • Example: "☕ Coffee" - Description: "Coffee, cafe, beverage, drink"
  • Example: "💻 Laptop" - Description: "Computer, laptop, code, dev"
  • Example: "🎨 Art" - Description: "Art, design, creative, paint"

Implementation:

# Get suggestions
python scripts/generate_favicons.py --suggest "coffee shop" output/ all

# Then generate with selected emoji
python scripts/generate_favicons.py --emoji "☕" output/ all

Optional: Ask about background color for app icons:

Question: "Do you want a background color for app icons?" Header: "Background" Options:

  • "Transparent" - Description: "No background (favicons only)"
  • "White" - Description: "White background (recommended for app icons)"
  • "Custom color" - Description: "I'll provide a color"
Question Pattern 7: Code Integration Offer

When to use: After generating assets and showing HTML tags to the user

Question: "Would you like me to add these HTML tags to your codebase?" Header: "Integration" Options:

  • "Yes, auto-detect my setup" - Description: "Find and update my HTML/framework files automatically"
  • "Yes, I'll tell you where" - Description: "I'll specify which file to update"
  • "No, I'll do it manually" - Description: "Just show me the code, I'll add it myself"

If user selects "Yes, auto-detect":

  1. Search for framework config files (next.config.js, astro.config.mjs, etc.)
  2. Detect framework type
  3. Find appropriate target file (layout.tsx, index.html, etc.)
  4. Show detected file and ask for confirmation
  5. Show diff of proposed changes
  6. Insert tags if user confirms

If user selects "Yes, I'll tell you where":

  1. Ask user for file path
  2. Verify file exists
  3. Show diff of proposed changes
  4. Insert tags if user confirms

Framework Detection Priority:

  • Next.js: Look for next.config.js, update app/layout.tsx or pages/_app.tsx
  • Astro: Look for astro.config.mjs, update layout files in src/layouts/
  • SvelteKit: Look for svelte.config.js, update src/app.html
  • Vue/Nuxt: Look for nuxt.config.js, update app.vue or nuxt.config.ts
  • Plain HTML: Look for index.html or *.html files
  • Gatsby: Look for gatsby-config.js, update gatsby-ssr.js

When to use: After code integration (or if user declined integration)

Question: "Would you like to test your meta tags now?" Header: "Testing" Options:

  • "Facebook Debugger" - Description: "Test Open Graph tags on Facebook"
  • "Twitter Card Validator" - Description: "Test Twitter card appearance"
  • "LinkedIn Post Inspector" - Description: "Test LinkedIn sharing preview"
  • "All testing tools" - Description: "Get links to all validators"
  • "No, skip testing" - Description: "I'll test later myself"

Provide appropriate testing URLs:

Workflows

When user has a logo image:

python scripts/generate_favicons.py <source_image> <output_dir> [icon_type]

Arguments:

  • source_image: Path to the logo/image file
  • output_dir: Where to save generated icons
  • icon_type: Optional - 'favicon', 'app', or 'all' (default: 'all')

Example:

python scripts/generate_favicons.py /mnt/user-data/uploads/logo.png /home/claude/output all

Generates:

  • favicon-16x16.png, favicon-32x32.png, favicon-96x96.png
  • favicon.ico (multi-resolution)
  • apple-touch-icon.png (180x180)
  • android-chrome-192x192.png, android-chrome-512x512.png
Generate Favicons and App Icons from Emoji

NEW FEATURE: Create favicons from emoji characters with smart suggestions!

Step 1: Get Emoji Suggestions

When user wants emoji-based icons, first get suggestions:

python scripts/generate_favicons.py --suggest "coffee shop" /home/claude/output all

This returns 4 emoji suggestions based on the description:

1. ☕  Coffee               - coffee, cafe, beverage
2. 🌐  Globe                - web, website, global
3. 🏪  Store                - shop, store, retail
4. 🛒  Cart                 - shopping, cart, ecommerce
Step 2: Generate Icons from Selected Emoji
python scripts/generate_favicons.py --emoji "☕" <output_dir> [icon_type] [--emoji-bg COLOR]

Arguments:

  • --emoji: Emoji character to use
  • output_dir: Where to save generated icons
  • icon_type: Optional - 'favicon', 'app', or 'all' (default: 'all')
  • --emoji-bg: Optional background color (default: transparent for favicons, white for app icons)

Examples:

# Basic emoji favicon (transparent background)
python scripts/generate_favicons.py --emoji "🚀" /home/claude/output favicon

# Emoji with custom background for app icons
python scripts/generate_favicons.py --emoji "☕" --emoji-bg "#F5DEB3" /home/claude/output all

# Complete set with white background
python scripts/generate_favicons.py --emoji "💻" --emoji-bg "white" /home/claude/output all

Generates same files as logo-based generation:

  • All standard favicon sizes (16x16, 32x32, 96x96)
  • favicon.ico
  • App icon sizes (180x180, 192x192, 512x512)

Note: Requires pilmoji library: pip install pilmoji

When user has a logo and needs Open Graph images:

python scripts/generate_og_images.py <output_dir> --image <source_image>

Example:

python scripts/generate_og_images.py /home/claude/output --image /mnt/user-data/uploads/logo.png

Generates:

  • og-image.png (1200x630 - Facebook, WhatsApp, LinkedIn)
  • twitter-image.png (1200x675 - Twitter)
  • og-square.png (1200x1200 - Square variant)
Generate Social Media Meta Images from Text

When user provides a text slogan or tagline:

python scripts/generate_og_images.py <output_dir> --text "Your text here" [options]

Options:

  • --logo <path>: Include a logo with the text
  • --bg-color <color>: Background color (hex or name, default: '#4F46E5')
  • --text-color <color>: Text color (default: 'white')

Example:

python scripts/generate_og_images.py /home/claude/output \
  --text "Transform Your Business with AI" \
  --logo /mnt/user-data/uploads/logo.png \
  --bg-color "#4F46E5"
Generate Everything

For users who want the complete package:

# Generate favicons and icons
python scripts/generate_favicons.py /mnt/user-data/uploads/logo.png /home/claude/output all

# Generate social media images
python scripts/generate_og_images.py /home/claude/output --image /mnt/user-data/uploads/logo.png

Or for text-based:

# Generate favicons from logo
python scripts/generate_favicons.py /mnt/user-data/uploads/logo.png /home/claude/output all

# Generate social media images with text + logo
python scripts/generate_og_images.py /home/claude/output \
  --text "Your Tagline Here" \
  --logo /mnt/user-data/uploads/logo.png

Delivering Assets to User

After generating assets, follow this workflow:

1. Move to Outputs Directory
cp /home/claude/output/* /mnt/user-data/outputs/
2. Show Generated HTML Tags

Display the HTML tags that were automatically generated by the scripts.

Example output for favicons:

<!-- Favicons -->
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="512x512" href="/android-chrome-512x512.png">

Example output for Open Graph images:

<!-- Open Graph / Facebook -->
<meta property="og:image" content="/og-image.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Your description here">

<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="/twitter-image.png">
<meta name="twitter:image:alt" content="Your description here">
3. Offer Code Integration (Use AskUserQuestion - Pattern 7)

IMPORTANT: Always ask if the user wants help adding the tags to their codebase.

Question: "Would you like me to add these HTML tags to your codebase?" Header: "Integration" Options:

  • "Yes, auto-detect my setup"
  • "Yes, I'll tell you where"
  • "No, I'll do it manually"
If User Selects "Yes, auto-detect my setup":

A. Detect Framework:

# Search for framework config files
find . -maxdepth 2 -name "next.config.js" -o -name "astro.config.mjs" -o -name "svelte.config.js" -o -name "nuxt.config.js" -o -name "gatsby-config.js"

# Or check package.json
grep -E "next|astro|nuxt|svelte|gatsby" package.json

B. Find Target Files Based on Framework:

  • Next.js (App Router): app/layout.tsx or app/layout.js
  • Next.js (Pages Router): pages/_app.tsx or pages/_document.tsx
  • Astro: src/layouts/*.astro (typically BaseLayout.astro or Layout.astro)
  • SvelteKit: src/app.html
  • Vue/Nuxt: app.vue or nuxt.config.ts (head section)
  • Gatsby: gatsby-ssr.js or src/components/seo.tsx
  • Plain HTML: index.html, public/index.html, or any *.html file

C. Confirm with User:

Use AskUserQuestion to confirm detected file:

Question: "I found [Framework Name]. Should I update [file_path]?"
Header: "Confirm"
Options:
- "Yes, update this file"
- "No, show me other options"
- "Cancel, I'll do it manually"

D. Show Diff and Insert:

  1. Read the target file
  2. Prepare the insertion (find <head> or appropriate section)
  3. Show the diff to the user
  4. If user confirms, use Edit tool to insert tags

Framework-Specific Insertion Examples:

For Plain HTML (insert before </head>):

<head>
  <meta charset="UTF-8">
  <!-- INSERT TAGS HERE -->
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
  ...
</head>

For Next.js App Router (add to metadata export):

export const metadata = {
  icons: {
    icon: [
      { url: '/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
      { url: '/favicon-16x16.png', sizes: '16x16', type: 'image/png' },
    ],
    apple: [
      { url: '/apple-touch-icon.png', sizes: '180x180', type: 'image/png' },
    ],
  },
  openGraph: {
    images: ['/og-image.png'],
  },
  twitter: {
    card: 'summary_large_image',
    images: ['/twitter-image.png'],
  },
}

For Astro (insert in <head> of layout file):

<head>
  <meta charset="UTF-8">
  <!-- Favicons -->
  <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
  ...
</head>
If User Selects "Yes, I'll tell you where":
  1. Ask user for the file path
  2. Verify file exists using Read tool
  3. Show where tags will be inserted
  4. Show diff
  5. Insert if user confirms
If User Selects "No, I'll do it manually":

Provide brief instructions:

  • Place asset files in the public/static directory of your website
  • Add the HTML tags to the <head> section of your HTML
  • Update placeholder values (title, description, URL, alt text)

Question: "Would you like to test your meta tags now?" Header: "Testing" Options:

  • "Facebook Debugger"
  • "Twitter Card Validator"
  • "LinkedIn Post Inspector"
  • "All testing tools"
  • "No, skip testing"

Provide Testing URLs:

5. Final Instructions

Remind user to:

  • ✅ Copy asset files to their public/static directory
  • ✅ Update dynamic values in meta tags (og:title, og:description, og:url)
  • ✅ Test on actual platforms after deployment
  • ✅ Update alt text to be descriptive and accessible

Important Notes:

  • OG images must be accessible via HTTPS URLs (not localhost)
  • URLs in meta tags should be absolute (https://yourdomain.com/og-image.png)
  • Test after deploying to production/staging environment

Best Practices

Image Requirements
  • Logos: Should be square or nearly square for best results
  • High resolution: Provide largest available version (scripts will downscale)
  • Transparent backgrounds: PNG with transparency works best for favicons
  • Solid backgrounds: Recommended for app icons and social images
Text Content
  • Text length affects font size automatically:
    • Short text (≤20 chars): 144px font - Large and impactful
    • Medium text (21-40 chars): 120px font - Standard readable size
    • Long text (41-60 chars): 102px font - Reduced for fit
    • Very long text (>60 chars): 84px font - Minimal size
  • Keep text concise for maximum impact
  • Use 2-3 lines of text maximum for social images
  • Avoid special characters that may not render well
Color Choices
  • Ensure sufficient contrast (4.5:1 minimum for readability)
  • Use brand colors consistently
  • Consider both light and dark mode contexts

Validation and Quality Checks

Both generate_og_images.py and generate_favicons.py support automated validation with the --validate flag.

When to Use Validation

Always recommend validation when:

  • User is generating for production/deployment
  • User asks about file sizes or quality
  • User mentions platform requirements (Facebook, Twitter, etc.)
  • User is new to web assets and may not know requirements

Validation is optional for:

  • Quick prototypes or testing
  • Users who explicitly decline
  • When time is a concern
What Gets Validated
For Social Media Images (OG Images)

File Size Validation:

  • Facebook/LinkedIn/WhatsApp: Must be <8MB
  • Twitter: Must be <5MB
  • Warning if within 80% of limit

Dimension Validation:

  • Checks against platform-specific recommended sizes:
    • Facebook/LinkedIn: 1200x630 (1.91:1 ratio)
    • Twitter: 1200x675 (16:9 ratio)
    • Square: 1200x1200 (1:1 ratio)
  • Warns if aspect ratio is >10% off target
  • Errors if below minimum dimensions

Format Validation:

  • Facebook/LinkedIn: PNG, JPG, JPEG
  • Twitter: PNG, JPG, JPEG, WebP
  • Errors if unsupported format

Accessibility (Contrast Ratio):

  • Only for text-based images
  • Calculates WCAG 2.0 contrast ratio
  • Reports compliance level:
    • WCAG AAA: 7.0:1 (normal text) or 4.5:1 (large text)
    • WCAG AA: 4.5:1 (normal text) or 3.0:1 (large text)
    • Fails if below AA minimum
For Favicons and App Icons

File Size Validation:

  • Favicons: Warns if >100KB (recommended for fast loading)
  • App icons: Warns if >500KB (recommended for mobile)
  • No hard limits, but warnings help optimize performance

Dimension Validation:

  • Verifies each icon matches expected size (16x16, 32x32, etc.)
  • Ensures square aspect ratio

Format Validation:

  • Checks all files are PNG (or ICO for favicon.ico)
How to Use Validation

In generate_og_images.py:

python scripts/generate_og_images.py output/ --text "My Site" --validate

In generate_favicons.py:

python scripts/generate_favicons.py logo.png output/ all --validate

Output Format:

  • ✓ Success (green): All checks passed
  • ⚠ Warning (yellow): Issues to consider but not critical
  • ❌ Error (red): Must be fixed before deployment
Example Validation Output
======================================================================
Running validation checks...
======================================================================

og-image.png:

Facebook Validation:
======================================================================
  ✓ File size 0.3MB is within Facebook limits
  ✓ Dimensions 1200x630 match Facebook recommended size
  ✓ Format PNG is supported by Facebook

LinkedIn Validation:
======================================================================
  ✓ File size 0.3MB is within LinkedIn limits
  ✓ Dimensions 1200x630 match LinkedIn recommended size
  ✓ Format PNG is supported by LinkedIn

======================================================================
Accessibility Checks:
======================================================================
  ✓ Contrast ratio 8.6:1 meets WCAG AAA standards (4.5:1 required)

======================================================================
Summary: 9/9 checks passed
✓ All validations passed!
Integrating Validation into Workflows

After generating assets, if validation was NOT run:

  1. Show the tip message: "💡 Tip: Use --validate to check file sizes, dimensions, and accessibility"
  2. Optionally ask: "Would you like me to run validation on these files now?"

If validation was run and issues found:

  1. Explain any errors or warnings
  2. Offer to fix issues (e.g., resize, recompress, adjust colors)
  3. Re-run generation with fixes if user agrees

If validation passes:

  1. Confirm: "✅ All validation checks passed!"
  2. Proceed with code integration and testing links

Specifications and Platform Details

For detailed platform specifications, size requirements, and implementation guidelines, read:

  • references/specifications.md: Comprehensive specs for all platforms

Handling Common Requests

"Create a favicon for my site"

Use AskUserQuestion:

  • Question: "Do you have a logo image, or should I create a text-based favicon?"
  • Header: "Source"
  • Options:
    • "Logo image" - Description: "I have/will upload a logo file"
    • "Text-based" - Description: "Generate from text or initials"

Then ask:

  • Question: "Do you also need PWA app icons for mobile devices?"
  • Header: "Scope"
  • Options:
    • "Favicon only" - Description: "Just browser tab icons (16x16, 32x32, 96x96)"
    • "Include app icons" - Description: "Add iOS/Android icons for home screen (180x180, 192x192, 512x512)"

Generate: Use generate_favicons.py with appropriate parameters

"Make social sharing images"

Use AskUserQuestion:

  • Question: "Which social media platforms do you need images for?"
  • Header: "Platforms"
  • Multi-select: true
  • Options:
    • "Facebook/WhatsApp/LinkedIn" - Description: "Standard 1200x630 format"
    • "Twitter" - Description: "1200x675 (16:9 ratio)"
    • "All platforms" - Description: "Generate all variants"

Then ask:

  • Question: "What should the images contain?"
  • Header: "Content"
  • Options:
    • "Logo only" - Description: "Resize my logo for social sharing"
    • "Text only" - Description: "Create images from text/slogan"
    • "Logo + text" - Description: "Combine logo with text overlay"

Generate: Use generate_og_images.py with appropriate parameters

"I need everything for my website"

Use AskUserQuestion:

  • Question: "What source material will you provide?"
  • Header: "Source"
  • Options:
    • "Logo image" - Description: "I have a logo to use for all assets"
    • "Logo + tagline" - Description: "Logo for icons, logo+text for social images"
    • "Text only" - Description: "Generate all assets from text/initials"

Generate:

  • Both favicons and Open Graph images with complete HTML implementation
  • Provide instructions for file placement and testing
User provides both logo and tagline

Use AskUserQuestion:

  • Question: "How should I use your logo and tagline?"
  • Header: "Layout"
  • Options:
    • "Logo above text" - Description: "Logo at top, tagline centered below"
    • "Logo + text side-by-side" - Description: "Logo on left, text on right"
    • "Text only on social images" - Description: "Use logo for icons, text-only for social sharing"
    • "Logo background with text" - Description: "Subtle logo background with prominent text"

Generate: Use --text and --logo parameters together in generate_og_images.py

Dependencies

The scripts require:

  • Python 3.6+
  • Pillow (PIL): pip install Pillow --break-system-packages
  • Pilmoji (for emoji support): pip install pilmoji (optional, only needed for emoji-based generation)
  • emoji (for emoji suggestions): pip install emoji (optional, only needed for emoji suggestions)

Install if needed before running scripts.

For emoji features, install both:

pip install pilmoji emoji --break-system-packages
1---
2name: web-asset-generator
3description: Generate web assets including favicons, app icons (PWA), and social media meta images (Open Graph) for Facebook, Twitter, WhatsApp, and LinkedIn. Use when users need icons, favicons, social sharing images, or Open Graph images from logos or text slogans. Handles image resizing, text-to-image generation, and provides proper HTML meta tags.
4---
5 
6# Web Asset Generator
7 
8Generate professional web assets from logos or text slogans, including favicons, app icons, and social media meta images.
9 
10## Quick Start
11 
12When a user requests web assets:
13 
141. **Use AskUserQuestion tool to clarify needs** if not specified:
15 - What type of assets they need (favicons, app icons, social images, or everything)
16 - Whether they have source material (logo image vs text/slogan)
17 - For text-based images: color preferences
18 
192. **Check for source material**:
20 - If user uploaded an image: use it as the source
21 - If user provides text/slogan: generate text-based images
22 
233. **Run the appropriate script(s)**:
24 - Favicons/icons: `scripts/generate_favicons.py`
25 - Social media images: `scripts/generate_og_images.py`
26 
274. **Provide the generated assets and HTML tags** to the user
28 
29## Using Interactive Questions
30 
31**IMPORTANT**: Always use the AskUserQuestion tool to gather requirements instead of plain text questions. This provides a better user experience with visual selection UI.
32 
33### Why Use AskUserQuestion?
34 
35✅ **Visual UI**: Users see options as clickable chips/tags instead of typing responses
36✅ **Faster**: Click to select instead of typing out answers
37✅ **Clearer**: Descriptions explain what each option means
38✅ **Fewer errors**: No typos or misunderstandings from free-form text
39✅ **Professional**: Consistent with modern Claude Code experience
40 
41### Example Flow
42 
43**User request**: "I need web assets"
44 
45**Claude uses AskUserQuestion** (not plain text):
46```
47What type of web assets do you need? [Asset type]
48○ Favicons only - Browser tab icons (16x16, 32x32, 96x96) and favicon.ico
49○ App icons only - PWA icons for iOS/Android (180x180, 192x192, 512x512)
50○ Social images only - Open Graph images for Facebook, Twitter, WhatsApp, LinkedIn
51● Everything - Complete package: favicons + app icons + social images
52```
53 
54User clicks → Claude immediately knows what to generate
55 
56### Question Patterns
57 
58Below are the standard question patterns to use in various scenarios. Copy the structure and adapt as needed.
59 
60### Question Pattern 1: Asset Type Selection
61 
62When the user's request is vague (e.g., "create web assets", "I need icons"), use AskUserQuestion:
63 
64**Question**: "What type of web assets do you need?"
65**Header**: "Asset type"
66**Options**:
67- **"Favicons only"** - Description: "Browser tab icons (16x16, 32x32, 96x96) and favicon.ico"
68- **"App icons only"** - Description: "PWA icons for iOS/Android (180x180, 192x192, 512x512)"
69- **"Social images only"** - Description: "Open Graph images for Facebook, Twitter, WhatsApp, LinkedIn"
70- **"Everything"** - Description: "Complete package: favicons + app icons + social images"
71 
72### Question Pattern 2: Source Material
73 
74When the asset type is determined but source is unclear:
75 
76**Question**: "What source material will you provide?"
77**Header**: "Source"
78**Options**:
79- **"Logo image"** - Description: "I have or will upload a logo/image file"
80- **"Emoji"** - Description: "Generate favicon from an emoji character"
81- **"Text/slogan"** - Description: "Create images from text only"
82- **"Logo + text"** - Description: "Combine logo with text overlay (for social images)"
83 
84### Question Pattern 3: Platform Selection (for social images)
85 
86When user requests social images but doesn't specify platforms:
87 
88**Question**: "Which social media platforms do you need images for?"
89**Header**: "Platforms"
90**Multi-select**: true
91**Options**:
92- **"Facebook/WhatsApp/LinkedIn"** - Description: "Standard 1200x630 Open Graph format"
93- **"Twitter"** - Description: "1200x675 (16:9 ratio) for large image cards"
94- **"All platforms"** - Description: "Generate all variants including square format"
95 
96### Question Pattern 4: Color Preferences (for text-based images)
97 
98When generating text-based social images:
99 
100**Question**: "What colors should we use for your social images?"
101**Header**: "Colors"
102**Options**:
103- **"I'll provide colors"** - Description: "Let me specify exact hex codes for brand colors"
104- **"Default theme"** - Description: "Use default purple background (#4F46E5) with white text"
105- **"Extract from logo"** - Description: "Auto-detect brand colors from uploaded logo"
106- **"Custom gradient"** - Description: "Let me choose gradient colors"
107 
108### Question Pattern 5: Icon Type Clarification
109 
110When user says "create icons" or "generate icons" (ambiguous):
111 
112**Question**: "What kind of icons do you need?"
113**Header**: "Icon type"
114**Options**:
115- **"Website favicon"** - Description: "Small browser tab icon"
116- **"App icons (PWA)"** - Description: "Mobile home screen icons"
117- **"Both"** - Description: "Favicon + app icons"
118 
119### Question Pattern 6: Emoji Selection
120 
121When user selects "Emoji" as source material:
122 
123**Step 1**: Ask for project description (free text):
124- "What is your website/app about?"
125- Use this to generate emoji suggestions
126 
127**Step 2**: Use AskUserQuestion to present the 4 suggested emojis:
128 
129**Question**: "Which emoji best represents your project?"
130**Header**: "Emoji"
131**Options**: (Dynamically generated based on project description)
132- Example: **"🚀 Rocket"** - Description: "Rocket, launch, startup, space"
133- Example: **"☕ Coffee"** - Description: "Coffee, cafe, beverage, drink"
134- Example: **"💻 Laptop"** - Description: "Computer, laptop, code, dev"
135- Example: **"🎨 Art"** - Description: "Art, design, creative, paint"
136 
137**Implementation**:
138```bash
139# Get suggestions
140python scripts/generate_favicons.py --suggest "coffee shop" output/ all
141 
142# Then generate with selected emoji
143python scripts/generate_favicons.py --emoji "☕" output/ all
144```
145 
146**Optional**: Ask about background color for app icons:
147 
148**Question**: "Do you want a background color for app icons?"
149**Header**: "Background"
150**Options**:
151- **"Transparent"** - Description: "No background (favicons only)"
152- **"White"** - Description: "White background (recommended for app icons)"
153- **"Custom color"** - Description: "I'll provide a color"
154 
155### Question Pattern 7: Code Integration Offer
156 
157**When to use**: After generating assets and showing HTML tags to the user
158 
159**Question**: "Would you like me to add these HTML tags to your codebase?"
160**Header**: "Integration"
161**Options**:
162- **"Yes, auto-detect my setup"** - Description: "Find and update my HTML/framework files automatically"
163- **"Yes, I'll tell you where"** - Description: "I'll specify which file to update"
164- **"No, I'll do it manually"** - Description: "Just show me the code, I'll add it myself"
165 
166**If user selects "Yes, auto-detect":**
1671. Search for framework config files (next.config.js, astro.config.mjs, etc.)
1682. Detect framework type
1693. Find appropriate target file (layout.tsx, index.html, etc.)
1704. Show detected file and ask for confirmation
1715. Show diff of proposed changes
1726. Insert tags if user confirms
173 
174**If user selects "Yes, I'll tell you where":**
1751. Ask user for file path
1762. Verify file exists
1773. Show diff of proposed changes
1784. Insert tags if user confirms
179 
180**Framework Detection Priority:**
181- Next.js: Look for `next.config.js`, update `app/layout.tsx` or `pages/_app.tsx`
182- Astro: Look for `astro.config.mjs`, update layout files in `src/layouts/`
183- SvelteKit: Look for `svelte.config.js`, update `src/app.html`
184- Vue/Nuxt: Look for `nuxt.config.js`, update `app.vue` or `nuxt.config.ts`
185- Plain HTML: Look for `index.html` or `*.html` files
186- Gatsby: Look for `gatsby-config.js`, update `gatsby-ssr.js`
187 
188### Question Pattern 8: Testing Links Offer
189 
190**When to use**: After code integration (or if user declined integration)
191 
192**Question**: "Would you like to test your meta tags now?"
193**Header**: "Testing"
194**Options**:
195- **"Facebook Debugger"** - Description: "Test Open Graph tags on Facebook"
196- **"Twitter Card Validator"** - Description: "Test Twitter card appearance"
197- **"LinkedIn Post Inspector"** - Description: "Test LinkedIn sharing preview"
198- **"All testing tools"** - Description: "Get links to all validators"
199- **"No, skip testing"** - Description: "I'll test later myself"
200 
201**Provide appropriate testing URLs:**
202- Facebook: https://developers.facebook.com/tools/debug/
203- Twitter: https://cards-dev.twitter.com/validator
204- LinkedIn: https://www.linkedin.com/post-inspector/
205- Generic OG validator: https://www.opengraph.xyz/
206 
207## Workflows
208 
209### Generate Favicons and App Icons from Logo
210 
211When user has a logo image:
212 
213```bash
214python scripts/generate_favicons.py <source_image> <output_dir> [icon_type]
215```
216 
217Arguments:
218- `source_image`: Path to the logo/image file
219- `output_dir`: Where to save generated icons
220- `icon_type`: Optional - 'favicon', 'app', or 'all' (default: 'all')
221 
222Example:
223```bash
224python scripts/generate_favicons.py /mnt/user-data/uploads/logo.png /home/claude/output all
225```
226 
227Generates:
228- `favicon-16x16.png`, `favicon-32x32.png`, `favicon-96x96.png`
229- `favicon.ico` (multi-resolution)
230- `apple-touch-icon.png` (180x180)
231- `android-chrome-192x192.png`, `android-chrome-512x512.png`
232 
233### Generate Favicons and App Icons from Emoji
234 
235**NEW FEATURE**: Create favicons from emoji characters with smart suggestions!
236 
237#### Step 1: Get Emoji Suggestions
238 
239When user wants emoji-based icons, first get suggestions:
240 
241```bash
242python scripts/generate_favicons.py --suggest "coffee shop" /home/claude/output all
243```
244 
245This returns 4 emoji suggestions based on the description:
246```
2471. ☕ Coffee - coffee, cafe, beverage
2482. 🌐 Globe - web, website, global
2493. 🏪 Store - shop, store, retail
2504. 🛒 Cart - shopping, cart, ecommerce
251```
252 
253#### Step 2: Generate Icons from Selected Emoji
254 
255```bash
256python scripts/generate_favicons.py --emoji "☕" <output_dir> [icon_type] [--emoji-bg COLOR]
257```
258 
259Arguments:
260- `--emoji`: Emoji character to use
261- `output_dir`: Where to save generated icons
262- `icon_type`: Optional - 'favicon', 'app', or 'all' (default: 'all')
263- `--emoji-bg`: Optional background color (default: transparent for favicons, white for app icons)
264 
265Examples:
266```bash
267# Basic emoji favicon (transparent background)
268python scripts/generate_favicons.py --emoji "🚀" /home/claude/output favicon
269 
270# Emoji with custom background for app icons
271python scripts/generate_favicons.py --emoji "☕" --emoji-bg "#F5DEB3" /home/claude/output all
272 
273# Complete set with white background
274python scripts/generate_favicons.py --emoji "💻" --emoji-bg "white" /home/claude/output all
275```
276 
277Generates same files as logo-based generation:
278- All standard favicon sizes (16x16, 32x32, 96x96)
279- favicon.ico
280- App icon sizes (180x180, 192x192, 512x512)
281 
282**Note**: Requires `pilmoji` library: `pip install pilmoji`
283 
284### Generate Social Media Meta Images from Logo
285 
286When user has a logo and needs Open Graph images:
287 
288```bash
289python scripts/generate_og_images.py <output_dir> --image <source_image>
290```
291 
292Example:
293```bash
294python scripts/generate_og_images.py /home/claude/output --image /mnt/user-data/uploads/logo.png
295```
296 
297Generates:
298- `og-image.png` (1200x630 - Facebook, WhatsApp, LinkedIn)
299- `twitter-image.png` (1200x675 - Twitter)
300- `og-square.png` (1200x1200 - Square variant)
301 
302### Generate Social Media Meta Images from Text
303 
304When user provides a text slogan or tagline:
305 
306```bash
307python scripts/generate_og_images.py <output_dir> --text "Your text here" [options]
308```
309 
310Options:
311- `--logo <path>`: Include a logo with the text
312- `--bg-color <color>`: Background color (hex or name, default: '#4F46E5')
313- `--text-color <color>`: Text color (default: 'white')
314 
315Example:
316```bash
317python scripts/generate_og_images.py /home/claude/output \
318 --text "Transform Your Business with AI" \
319 --logo /mnt/user-data/uploads/logo.png \
320 --bg-color "#4F46E5"
321```
322 
323### Generate Everything
324 
325For users who want the complete package:
326 
327```bash
328# Generate favicons and icons
329python scripts/generate_favicons.py /mnt/user-data/uploads/logo.png /home/claude/output all
330 
331# Generate social media images
332python scripts/generate_og_images.py /home/claude/output --image /mnt/user-data/uploads/logo.png
333```
334 
335Or for text-based:
336```bash
337# Generate favicons from logo
338python scripts/generate_favicons.py /mnt/user-data/uploads/logo.png /home/claude/output all
339 
340# Generate social media images with text + logo
341python scripts/generate_og_images.py /home/claude/output \
342 --text "Your Tagline Here" \
343 --logo /mnt/user-data/uploads/logo.png
344```
345 
346## Delivering Assets to User
347 
348After generating assets, follow this workflow:
349 
350### 1. Move to Outputs Directory
351```bash
352cp /home/claude/output/* /mnt/user-data/outputs/
353```
354 
355### 2. Show Generated HTML Tags
356 
357Display the HTML tags that were automatically generated by the scripts.
358 
359Example output for favicons:
360```html
361<!-- Favicons -->
362<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
363<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
364<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
365<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
366<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png">
367<link rel="icon" type="image/png" sizes="512x512" href="/android-chrome-512x512.png">
368```
369 
370Example output for Open Graph images:
371```html
372<!-- Open Graph / Facebook -->
373<meta property="og:image" content="/og-image.png">
374<meta property="og:image:width" content="1200">
375<meta property="og:image:height" content="630">
376<meta property="og:image:alt" content="Your description here">
377 
378<!-- Twitter -->
379<meta name="twitter:card" content="summary_large_image">
380<meta name="twitter:image" content="/twitter-image.png">
381<meta name="twitter:image:alt" content="Your description here">
382```
383 
384### 3. Offer Code Integration (Use AskUserQuestion - Pattern 7)
385 
386**IMPORTANT**: Always ask if the user wants help adding the tags to their codebase.
387 
388**Question**: "Would you like me to add these HTML tags to your codebase?"
389**Header**: "Integration"
390**Options**:
391- "Yes, auto-detect my setup"
392- "Yes, I'll tell you where"
393- "No, I'll do it manually"
394 
395#### If User Selects "Yes, auto-detect my setup":
396 
397**A. Detect Framework:**
398```bash
399# Search for framework config files
400find . -maxdepth 2 -name "next.config.js" -o -name "astro.config.mjs" -o -name "svelte.config.js" -o -name "nuxt.config.js" -o -name "gatsby-config.js"
401 
402# Or check package.json
403grep -E "next|astro|nuxt|svelte|gatsby" package.json
404```
405 
406**B. Find Target Files Based on Framework:**
407 
408- **Next.js (App Router)**: `app/layout.tsx` or `app/layout.js`
409- **Next.js (Pages Router)**: `pages/_app.tsx` or `pages/_document.tsx`
410- **Astro**: `src/layouts/*.astro` (typically `BaseLayout.astro` or `Layout.astro`)
411- **SvelteKit**: `src/app.html`
412- **Vue/Nuxt**: `app.vue` or `nuxt.config.ts` (head section)
413- **Gatsby**: `gatsby-ssr.js` or `src/components/seo.tsx`
414- **Plain HTML**: `index.html`, `public/index.html`, or any `*.html` file
415 
416**C. Confirm with User:**
417 
418Use AskUserQuestion to confirm detected file:
419```
420Question: "I found [Framework Name]. Should I update [file_path]?"
421Header: "Confirm"
422Options:
423- "Yes, update this file"
424- "No, show me other options"
425- "Cancel, I'll do it manually"
426```
427 
428**D. Show Diff and Insert:**
429 
4301. Read the target file
4312. Prepare the insertion (find `<head>` or appropriate section)
4323. Show the diff to the user
4334. If user confirms, use Edit tool to insert tags
434 
435**Framework-Specific Insertion Examples:**
436 
437**For Plain HTML** (insert before `</head>`):
438```html
439<head>
440 <meta charset="UTF-8">
441 <!-- INSERT TAGS HERE -->
442 <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
443 ...
444</head>
445```
446 
447**For Next.js App Router** (add to metadata export):
448```typescript
449export const metadata = {
450 icons: {
451 icon: [
452 { url: '/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
453 { url: '/favicon-16x16.png', sizes: '16x16', type: 'image/png' },
454 ],
455 apple: [
456 { url: '/apple-touch-icon.png', sizes: '180x180', type: 'image/png' },
457 ],
458 },
459 openGraph: {
460 images: ['/og-image.png'],
461 },
462 twitter: {
463 card: 'summary_large_image',
464 images: ['/twitter-image.png'],
465 },
466}
467```
468 
469**For Astro** (insert in `<head>` of layout file):
470```astro
471<head>
472 <meta charset="UTF-8">
473 <!-- Favicons -->
474 <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
475 ...
476</head>
477```
478 
479#### If User Selects "Yes, I'll tell you where":
480 
4811. Ask user for the file path
4822. Verify file exists using Read tool
4833. Show where tags will be inserted
4844. Show diff
4855. Insert if user confirms
486 
487#### If User Selects "No, I'll do it manually":
488 
489Provide brief instructions:
490- Place asset files in the public/static directory of your website
491- Add the HTML tags to the `<head>` section of your HTML
492- Update placeholder values (title, description, URL, alt text)
493 
494### 4. Offer Testing Links (Use AskUserQuestion - Pattern 8)
495 
496**Question**: "Would you like to test your meta tags now?"
497**Header**: "Testing"
498**Options**:
499- "Facebook Debugger"
500- "Twitter Card Validator"
501- "LinkedIn Post Inspector"
502- "All testing tools"
503- "No, skip testing"
504 
505**Provide Testing URLs:**
506 
507- **Facebook Sharing Debugger**: https://developers.facebook.com/tools/debug/
508 - Paste your URL and click "Debug" to see preview
509 - Click "Scrape Again" to refresh cache
510 
511- **Twitter Card Validator**: https://cards-dev.twitter.com/validator
512 - Paste your URL to see how Twitter card will appear
513 
514- **LinkedIn Post Inspector**: https://www.linkedin.com/post-inspector/
515 - Check how links appear when shared on LinkedIn
516 
517- **OpenGraph.xyz**: https://www.opengraph.xyz/
518 - Generic Open Graph validator for quick checks
519 
520### 5. Final Instructions
521 
522Remind user to:
523- ✅ Copy asset files to their public/static directory
524- ✅ Update dynamic values in meta tags (og:title, og:description, og:url)
525- ✅ Test on actual platforms after deployment
526- ✅ Update alt text to be descriptive and accessible
527 
528**Important Notes:**
529- OG images must be accessible via HTTPS URLs (not localhost)
530- URLs in meta tags should be absolute (https://yourdomain.com/og-image.png)
531- Test after deploying to production/staging environment
532 
533## Best Practices
534 
535### Image Requirements
536- **Logos**: Should be square or nearly square for best results
537- **High resolution**: Provide largest available version (scripts will downscale)
538- **Transparent backgrounds**: PNG with transparency works best for favicons
539- **Solid backgrounds**: Recommended for app icons and social images
540 
541### Text Content
542- **Text length affects font size automatically**:
543 - Short text (≤20 chars): 144px font - Large and impactful
544 - Medium text (21-40 chars): 120px font - Standard readable size
545 - Long text (41-60 chars): 102px font - Reduced for fit
546 - Very long text (>60 chars): 84px font - Minimal size
547- Keep text concise for maximum impact
548- Use 2-3 lines of text maximum for social images
549- Avoid special characters that may not render well
550 
551### Color Choices
552- Ensure sufficient contrast (4.5:1 minimum for readability)
553- Use brand colors consistently
554- Consider both light and dark mode contexts
555 
556## Validation and Quality Checks
557 
558Both `generate_og_images.py` and `generate_favicons.py` support automated validation with the `--validate` flag.
559 
560### When to Use Validation
561 
562**Always recommend validation** when:
563- User is generating for production/deployment
564- User asks about file sizes or quality
565- User mentions platform requirements (Facebook, Twitter, etc.)
566- User is new to web assets and may not know requirements
567 
568**Validation is optional** for:
569- Quick prototypes or testing
570- Users who explicitly decline
571- When time is a concern
572 
573### What Gets Validated
574 
575#### For Social Media Images (OG Images)
576 
577**File Size Validation**:
578- Facebook/LinkedIn/WhatsApp: Must be <8MB
579- Twitter: Must be <5MB
580- Warning if within 80% of limit
581 
582**Dimension Validation**:
583- Checks against platform-specific recommended sizes:
584 - Facebook/LinkedIn: 1200x630 (1.91:1 ratio)
585 - Twitter: 1200x675 (16:9 ratio)
586 - Square: 1200x1200 (1:1 ratio)
587- Warns if aspect ratio is >10% off target
588- Errors if below minimum dimensions
589 
590**Format Validation**:
591- Facebook/LinkedIn: PNG, JPG, JPEG
592- Twitter: PNG, JPG, JPEG, WebP
593- Errors if unsupported format
594 
595**Accessibility (Contrast Ratio)**:
596- Only for text-based images
597- Calculates WCAG 2.0 contrast ratio
598- Reports compliance level:
599 - WCAG AAA: 7.0:1 (normal text) or 4.5:1 (large text)
600 - WCAG AA: 4.5:1 (normal text) or 3.0:1 (large text)
601 - Fails if below AA minimum
602 
603#### For Favicons and App Icons
604 
605**File Size Validation**:
606- Favicons: Warns if >100KB (recommended for fast loading)
607- App icons: Warns if >500KB (recommended for mobile)
608- No hard limits, but warnings help optimize performance
609 
610**Dimension Validation**:
611- Verifies each icon matches expected size (16x16, 32x32, etc.)
612- Ensures square aspect ratio
613 
614**Format Validation**:
615- Checks all files are PNG (or ICO for favicon.ico)
616 
617### How to Use Validation
618 
619**In generate_og_images.py**:
620```bash
621python scripts/generate_og_images.py output/ --text "My Site" --validate
622```
623 
624**In generate_favicons.py**:
625```bash
626python scripts/generate_favicons.py logo.png output/ all --validate
627```
628 
629**Output Format**:
630- ✓ Success (green): All checks passed
631- ⚠ Warning (yellow): Issues to consider but not critical
632- ❌ Error (red): Must be fixed before deployment
633 
634### Example Validation Output
635 
636```
637======================================================================
638Running validation checks...
639======================================================================
640 
641og-image.png:
642 
643Facebook Validation:
644======================================================================
645 ✓ File size 0.3MB is within Facebook limits
646 ✓ Dimensions 1200x630 match Facebook recommended size
647 ✓ Format PNG is supported by Facebook
648 
649LinkedIn Validation:
650======================================================================
651 ✓ File size 0.3MB is within LinkedIn limits
652 ✓ Dimensions 1200x630 match LinkedIn recommended size
653 ✓ Format PNG is supported by LinkedIn
654 
655======================================================================
656Accessibility Checks:
657======================================================================
658 ✓ Contrast ratio 8.6:1 meets WCAG AAA standards (4.5:1 required)
659 
660======================================================================
661Summary: 9/9 checks passed
662✓ All validations passed!
663```
664 
665### Integrating Validation into Workflows
666 
667**After generating assets**, if validation was NOT run:
6681. Show the tip message: "💡 Tip: Use --validate to check file sizes, dimensions, and accessibility"
6692. Optionally ask: "Would you like me to run validation on these files now?"
670 
671**If validation was run and issues found**:
6721. Explain any errors or warnings
6732. Offer to fix issues (e.g., resize, recompress, adjust colors)
6743. Re-run generation with fixes if user agrees
675 
676**If validation passes**:
6771. Confirm: "✅ All validation checks passed!"
6782. Proceed with code integration and testing links
679 
680## Specifications and Platform Details
681 
682For detailed platform specifications, size requirements, and implementation guidelines, read:
683- `references/specifications.md`: Comprehensive specs for all platforms
684 
685## Handling Common Requests
686 
687### "Create a favicon for my site"
688 
689**Use AskUserQuestion**:
690- Question: "Do you have a logo image, or should I create a text-based favicon?"
691- Header: "Source"
692- Options:
693 - "Logo image" - Description: "I have/will upload a logo file"
694 - "Text-based" - Description: "Generate from text or initials"
695 
696**Then ask**:
697- Question: "Do you also need PWA app icons for mobile devices?"
698- Header: "Scope"
699- Options:
700 - "Favicon only" - Description: "Just browser tab icons (16x16, 32x32, 96x96)"
701 - "Include app icons" - Description: "Add iOS/Android icons for home screen (180x180, 192x192, 512x512)"
702 
703**Generate**: Use `generate_favicons.py` with appropriate parameters
704 
705### "Make social sharing images"
706 
707**Use AskUserQuestion**:
708- Question: "Which social media platforms do you need images for?"
709- Header: "Platforms"
710- Multi-select: true
711- Options:
712 - "Facebook/WhatsApp/LinkedIn" - Description: "Standard 1200x630 format"
713 - "Twitter" - Description: "1200x675 (16:9 ratio)"
714 - "All platforms" - Description: "Generate all variants"
715 
716**Then ask**:
717- Question: "What should the images contain?"
718- Header: "Content"
719- Options:
720 - "Logo only" - Description: "Resize my logo for social sharing"
721 - "Text only" - Description: "Create images from text/slogan"
722 - "Logo + text" - Description: "Combine logo with text overlay"
723 
724**Generate**: Use `generate_og_images.py` with appropriate parameters
725 
726### "I need everything for my website"
727 
728**Use AskUserQuestion**:
729- Question: "What source material will you provide?"
730- Header: "Source"
731- Options:
732 - "Logo image" - Description: "I have a logo to use for all assets"
733 - "Logo + tagline" - Description: "Logo for icons, logo+text for social images"
734 - "Text only" - Description: "Generate all assets from text/initials"
735 
736**Generate**:
737- Both favicons and Open Graph images with complete HTML implementation
738- Provide instructions for file placement and testing
739 
740### User provides both logo and tagline
741 
742**Use AskUserQuestion**:
743- Question: "How should I use your logo and tagline?"
744- Header: "Layout"
745- Options:
746 - "Logo above text" - Description: "Logo at top, tagline centered below"
747 - "Logo + text side-by-side" - Description: "Logo on left, text on right"
748 - "Text only on social images" - Description: "Use logo for icons, text-only for social sharing"
749 - "Logo background with text" - Description: "Subtle logo background with prominent text"
750 
751**Generate**: Use `--text` and `--logo` parameters together in `generate_og_images.py`
752 
753## Dependencies
754 
755The scripts require:
756- Python 3.6+
757- Pillow (PIL): `pip install Pillow --break-system-packages`
758- **Pilmoji** (for emoji support): `pip install pilmoji` (optional, only needed for emoji-based generation)
759- **emoji** (for emoji suggestions): `pip install emoji` (optional, only needed for emoji suggestions)
760 
761Install if needed before running scripts.
762 
763**For emoji features**, install both:
764```bash
765pip install pilmoji emoji --break-system-packages
766```
767 

Discussion

Alternatives