Aller au contenu
Skillpedia
Images et icônes48k · #4601

favicon

Ce qu’il fait

Cet outil crée automatiquement toutes les icônes nécessaires (appelées « favicons ») pour votre site web à partir d'une seule image. Il met aussi à jour le code de votre site pour que ces icônes s'affichent correctement.

Quand l’utiliser

  • ✓Lorsque vous lancez un nouveau site web et avez besoin de ses icônes.
  • ✓Si vous changez l'image de votre logo principal.
  • ✓Pour que votre site s'affiche correctement sur tous les appareils et navigateurs.

Lien du skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/favicon/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/favicon/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Génère les favicons de mon site à partir de l'image « logo.png ».”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'outil vérifie d'abord que l'image est valide. Ensuite, il détermine le type de framework web que vous utilisez (comme Rails, Next.js, etc.) afin de savoir où placer les icônes. Enfin, il crée toutes les tailles d'icônes requises et ajoute les instructions nécessaires à votre site pour qu'elles fonctionnent.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Generate a complete set of favicons from the source image at $1 and update the project's HTML with the appropriate link tags.

When to Use

  • You need to generate a complete favicon set from a single source image.
  • The task includes placing the assets in the correct framework-specific static directory and updating HTML link tags.
  • You want one workflow that validates the source image, detects the project type, and writes the right favicon outputs.

Prerequisites

First, verify ImageMagick v7+ is installed by running:

which magick

If not found, stop and instruct the user to install it:

  • macOS: brew install imagemagick
  • Linux: sudo apt install imagemagick

Step 1: Validate Source Image

  1. Verify the source image exists at the provided path: $1
  2. Check the file extension is a supported format (PNG, JPG, JPEG, SVG, WEBP, GIF)
  3. If the file doesn't exist or isn't a valid image format, report the error and stop

Note whether the source is an SVG file - if so, it will also be copied as favicon.svg.

Step 2: Detect Project Type and Static Assets Directory

Detect the project type and determine where static assets should be placed. Check in this order:

Framework Detection Static Assets Directory
Rails config/routes.rb exists public/
Next.js next.config.* exists public/
Gatsby gatsby-config.* exists static/
SvelteKit svelte.config.* exists static/
Astro astro.config.* exists public/
Hugo hugo.toml or config.toml with Hugo markers static/
Jekyll _config.yml with Jekyll markers Root directory (same as index.html)
Vite vite.config.* exists public/
Create React App package.json has react-scripts dependency public/
Vue CLI vue.config.* exists public/
Angular angular.json exists src/assets/
Eleventy .eleventy.js or eleventy.config.* exists Check _site output or root
Static HTML index.html in root Same directory as index.html

Important: If existing favicon files are found (e.g., favicon.ico, apple-touch-icon.png), use their location as the target directory regardless of framework detection.

Report the detected project type and the static assets directory that will be used.

When in doubt, ask: If you are not 100% confident about where static assets should be placed (e.g., ambiguous project structure, multiple potential locations, unfamiliar framework), use AskUserQuestionTool to confirm the target directory before proceeding. It's better to ask than to put files in the wrong place.

Step 3: Determine App Name

Find the app name from these sources (in priority order):

  1. Existing site.webmanifest - Check the detected static assets directory for an existing manifest and extract the name field
  2. package.json - Extract the name field if it exists
  3. Rails config/application.rb - Extract the module name (e.g., module MyApp → "MyApp")
  4. Directory name - Use the current working directory name as fallback

Convert the name to title case if needed (e.g., "my-app" → "My App").

Step 4: Ensure Static Assets Directory Exists

Check if the detected static assets directory exists. If not, create it.

Step 5: Generate Favicon Files

Run these ImageMagick commands to generate all favicon files. Replace [STATIC_DIR] with the detected static assets directory from Step 2.

Important: The -background none flag must come BEFORE the input file to properly preserve transparency when rendering SVGs. Placing it after the input will result in a white background.

favicon.ico (multi-resolution: 16x16, 32x32, 48x48)

magick -background none "$1" \
  \( -clone 0 -resize 16x16 \) \
  \( -clone 0 -resize 32x32 \) \
  \( -clone 0 -resize 48x48 \) \
  -delete 0 -alpha on \
  [STATIC_DIR]/favicon.ico

favicon-96x96.png

magick -background none "$1" -resize 96x96 -alpha on [STATIC_DIR]/favicon-96x96.png

apple-touch-icon.png (180x180)

magick -background none "$1" -resize 180x180 -alpha on [STATIC_DIR]/apple-touch-icon.png

web-app-manifest-192x192.png

magick -background none "$1" -resize 192x192 -alpha on [STATIC_DIR]/web-app-manifest-192x192.png

web-app-manifest-512x512.png


…
Questions fréquentes

Dois-je installer quelque chose au préalable ?

Oui, vous devez avoir installé le programme « ImageMagick » sur votre ordinateur. Les instructions d'installation pour macOS et Linux sont fournies dans la documentation.

Qu'est-ce que les « favicons » ?

Les favicons sont les petites icônes qui apparaissent dans l'onglet de votre navigateur, dans les favoris, ou sur l'écran d'accueil de votre téléphone lorsque vous enregistrez un site.

Que se passe-t-il si mon site utilise un autre framework ?

L'outil essaie de détecter automatiquement le type de votre site (Rails, Next.js, etc.) et place les icônes au bon endroit. S'il a un doute, il peut vous demander où placer les fichiers.

Détails

Description originale de l’auteur

Generate favicons from a source image

repo: sickn33/agentic-awesome-skills

Popularité

Étoiles GitHub
48k
Position au classement
#4601
Licence
MIT
Mis à jour
15/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires