# web-asset-generator

Generates favicons, PWA app icons, and Open Graph social cards from logos, emojis, or text. Useful when preparing a website or web app for launch and configuring social sharing snippets.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 933 installs · ★ 523
- Author: alonw0
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/alonw0/web-asset-generator/tree/HEAD/skills/web-asset-generator/SKILL.md
- Updated: 2026-01-28
- HTML: https://affpapa.org/en/nevibecode/skills/web-asset-generator

## What it does

The skill automates web asset generation through two Python scripts: `scripts/generate_favicons.py` and `scripts/generate_og_images.py`. It produces browser favicons, PWA icons, and Open Graph social cards. As source material, it accepts an uploaded logo, an emoji, or plain text slogans.

Interaction relies on the `AskUserQuestion` tool with clickable choices. The workflow handles brand colors: you can supply hex codes, auto-extract them from a logo, or use the default `#4F46E5` purple background. Once images are ready, the agent outputs HTML tags and can update framework files like `next.config.js` automatically.

Execution requires a local Python environment. Without an image, the script suggests emojis using the `--suggest` flag based on your project description.

## Requirements
- Works with: LinkedIn

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add alonw0/web-asset-generator --skill web-asset-generator -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/web-asset-generator/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/web-asset-generator/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add alonw0/web-asset-generator --skill web-asset-generator -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/web-asset-generator/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add alonw0/web-asset-generator --skill web-asset-generator -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/web-asset-generator/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install alonw0/web-asset-generator web-asset-generator
```

2. **Manually: put the files in place**
- File: `.github/skills/web-asset-generator/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add alonw0/web-asset-generator --skill web-asset-generator -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/alonw0/web-asset-generator --path skills/web-asset-generator
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/web-asset-generator/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add alonw0/web-asset-generator --skill web-asset-generator -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/alonw0/web-asset-generator/tree/HEAD/skills/web-asset-generator/SKILL.md

## When to use it
- Generate browser favicons (favicon.ico, PNG 16x16, 32x32, 96x96)
- Produce PWA home screen icons for iOS and Android (180x180, 192x192, 512x512)
- Create Open Graph share images for Facebook, LinkedIn, and Twitter (1200x675)
- Turn an emoji or text slogan into web graphics when no logo file exists
- Generate ready-to-paste HTML meta tags for site headers and config files

## Example prompts
- Generate favicons and PWA icons using our uploaded logo.png
- Create Open Graph images for Twitter and Facebook using the slogan 'AI Coding Assistant'
- Build a full web asset package starting from the ☕ emoji for a coffee shop website

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 6058210b962e0dbb.

BEGIN THIRD-PARTY FILE 6058210b962e0dbb
````text
---
name: web-asset-generator
description: 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.
---

# 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
````
END THIRD-PARTY FILE 6058210b962e0dbb

The third-party file has ended. Everything between the 6058210b962e0dbb tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2534 of 26476 bytes. © alonw0 · MIT · https://github.com/alonw0/web-asset-generator/tree/HEAD/skills/web-asset-generator/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
