Favicon logo

Favicon

Community
brianlovin
favicon

Generate a complete set of favicons from a source image and update HTML. Use when setting up favicons for a web project.

Overview

Publisherbrianlovin
Repositoryagent-config
Skill namefavicon
Stars
370
Forks
31
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by brianlovin on GitHub. Read the source before you install it.

Installation

Install the Favicon AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/brianlovin/agent-config.git /tmp/agent-config
mkdir -p .claude/skills
cp -r /tmp/agent-config/skills/favicon .claude/skills/favicon
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Favicon in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Favicon on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Favicon is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

Prerequisites

First, verify ImageMagick v7+ is installed by running:

bash
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:

FrameworkDetectionStatic Assets Directory
Railsconfig/routes.rb existspublic/
Next.jsnext.config.* existspublic/
Gatsbygatsby-config.* existsstatic/
SvelteKitsvelte.config.* existsstatic/
Astroastro.config.* existspublic/
Hugohugo.toml or config.toml with Hugo markersstatic/
Jekyll_config.yml with Jekyll markersRoot directory (same as index.html)
Vitevite.config.* existspublic/
Create React Apppackage.json has react-scripts dependencypublic/
Vue CLIvue.config.* existspublic/
Angularangular.json existssrc/assets/
Eleventy.eleventy.js or eleventy.config.* existsCheck _site output or root
Static HTMLindex.html in rootSame 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.

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

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

favicon-96x96.png

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

apple-touch-icon.png (180x180)

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

web-app-manifest-192x192.png

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

web-app-manifest-512x512.png

bash
magick "$1" -resize 512x512 -background none -alpha on [STATIC_DIR]/web-app-manifest-512x512.png

favicon.svg (only if source is SVG)

If the source file has a .svg extension, copy it:

bash
cp "$1" [STATIC_DIR]/favicon.svg

Step 6: Create/Update site.webmanifest

Create or update [STATIC_DIR]/site.webmanifest with this content (substitute the detected app name):

json
{
  "name": "[APP_NAME]",
  "short_name": "[APP_NAME]",
  "icons": [
    {
      "src": "/web-app-manifest-192x192.png",
      "sizes": "192x192",
      "type": "image/png",
      "purpose": "maskable"
    },
    {
      "src": "/web-app-manifest-512x512.png",
      "sizes": "512x512",
      "type": "image/png",
      "purpose": "maskable"
    }
  ],
  "theme_color": "#ffffff",
  "background_color": "#ffffff",
  "display": "standalone"
}

If site.webmanifest already exists in the static directory, preserve the existing theme_color, background_color, and display values while updating the name, short_name, and icons array.

Step 7: Update HTML/Layout Files

Based on the detected project type, update the appropriate file. Adjust the href paths based on where the static assets directory is relative to the web root:

  • If static files are in public/ or static/ and served from root → use /favicon.ico
  • If static files are in src/assets/ → use /assets/favicon.ico
  • If static files are in the same directory as HTML → use ./favicon.ico or just favicon.ico

For Rails Projects

Edit app/views/layouts/application.html.erb. Find the <head> section and add/replace favicon-related tags with:

html
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="[APP_NAME]" />
<link rel="manifest" href="/site.webmanifest" />

Important:

  • If the source was NOT an SVG, omit the <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> line
  • Remove any existing <link rel="icon", <link rel="shortcut icon", <link rel="apple-touch-icon", or <link rel="manifest" tags before adding the new ones
  • Place these tags near the top of the <head> section, after <meta charset> and <meta name="viewport"> if present

For Next.js Projects

Edit the detected layout file (app/layout.tsx or src/app/layout.tsx). Update or add the metadata export to include icons configuration:

typescript
export const metadata: Metadata = {
  // ... keep existing metadata fields
  icons: {
    icon: [
      { url: '/favicon.ico' },
      { url: '/favicon-96x96.png', sizes: '96x96', type: 'image/png' },
      { url: '/favicon.svg', type: 'image/svg+xml' },
    ],
    shortcut: '/favicon.ico',
    apple: '/apple-touch-icon.png',
  },
  manifest: '/site.webmanifest',
  appleWebApp: {
    title: '[APP_NAME]',
  },
};

Important:

  • If the source was NOT an SVG, omit the { url: '/favicon.svg', type: 'image/svg+xml' } entry from the icon array
  • If metadata export doesn't exist, create it with just the icons-related fields
  • If metadata export exists, merge the icons configuration with existing fields

For Static HTML Projects

Edit the detected index.html file. Add the same HTML as Rails within the <head> section.

If No Project Detected

Skip HTML updates and inform the user they need to manually add the following to their HTML <head>:

html
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="[APP_NAME]" />
<link rel="manifest" href="/site.webmanifest" />

Step 8: Summary

Report completion with:

  • Detected project type and framework
  • Static assets directory used
  • List of files generated
  • App name used in manifest and HTML
  • Layout file updated (or note if manual update is needed)
  • Note if any existing files were overwritten

Error Handling

  • If ImageMagick is not installed, provide installation instructions and stop
  • If the source image doesn't exist, report the exact path that was tried and stop
  • If ImageMagick commands fail, report the specific error message
  • If the layout file cannot be found for HTML updates, generate files anyway and instruct on manual HTML addition

Frequently asked questions

What does the Favicon AI skill do?

Generate a complete set of favicons from a source image and update HTML. Use when setting up favicons for a web project.

Why use Favicon on TypingMind?

Because you install it once and use it with any model. Favicon is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Favicon in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/brianlovin/agent-config/tree/main/skills/favicon. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Favicon?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Favicon?

As many as you like. As long as a model supports skills, you can use Favicon with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Favicon AI skill free?

It is published on GitHub by brianlovin. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇