📦 Favicon
指定された画像から、ウェブサイトのタブやブックマークに表示されるファビコンを自動生成するSkill。
📺 まず動画で見る(YouTube)
▶ 【Claude Code完全入門】誰でも使える/Skills活用法/経営者こそ使うべき ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Generate favicons from a source image
🇯🇵 日本人クリエイター向け解説
指定された画像から、ウェブサイトのタブやブックマークに表示されるファビコンを自動生成するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o favicon.zip https://jpskill.com/download/2845.zip && unzip -o favicon.zip && rm favicon.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/2845.zip -OutFile "$d\favicon.zip"; Expand-Archive "$d\favicon.zip" -DestinationPath $d -Force; ri "$d\favicon.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
favicon.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
faviconフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Favicon の使い方を教えて
- › Favicon で何ができるか具体例で見せて
- › Favicon を初めて使う人向けにステップを案内して
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
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
- Verify the source image exists at the provided path:
$1 - Check the file extension is a supported format (PNG, JPG, JPEG, SVG, WEBP, GIF)
- 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):
- Existing
site.webmanifest- Check the detected static assets directory for an existing manifest and extract thenamefield package.json- Extract thenamefield if it exists- Rails
config/application.rb- Extract the module name (e.g.,module MyApp→ "MyApp") - 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
magick -background none "$1" -resize 512x512 -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:
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):
{
"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/orstatic/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.icoor justfavicon.ico
For Rails Projects
Edit app/views/layouts/application.html.erb. Find the <head> section and add/replace favicon-related tags with:
<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:
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>:
<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
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.