favicon-generator by kostja94/marketing-skills
npx skills add https://github.com/kostja94/marketing-skills --skill favicon-generator指导网站图标和应用图标的实现,以确保在浏览器标签页、书签、移动设备主屏幕和Google 搜索结果中的品牌一致性。网站图标帮助用户识别网站;缺失或不正确的图标会损害信任。
调用时:在首次使用时,如果合适,用 1-2 句话说明此技能涵盖的内容及其重要性,然后提供主要输出。在后续使用或用戸要求跳过时,直接进入主要输出。
首先检查项目上下文: 如果存在 .claude/project-context.md 或 .cursor/project-context.md,请阅读以了解品牌和视觉识别信息。
识别:
| 尺寸 | 用途 |
|---|---|
| 16x16 | 浏览器标签页,标准显示 |
| 32x32 | Retina/高DPI浏览器标签页 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 180x180 | Apple Touch 图标(iOS 主屏幕);无透明度 |
| 192x192 | Android Chrome 主屏幕,PWA 启动器 |
| 512x512 | PWA 启动画面,自适应图标 |
可选:48x48、96x96、120x120、152x152、167x167、256x256,以获得更广泛的覆盖范围。
| 格式 | 用途 |
|---|---|
| SVG | 现代浏览器;可缩放;通过媒体查询支持深色模式;轻量 |
| PNG | 高DPI;明确尺寸;易于生成;Apple Touch 图标必需 |
| ICO | 旧版;捆绑多个尺寸;旧版浏览器的后备方案 |
推荐:提供 SVG + PNG 后备方案。切勿跳过 Apple Touch 图标(180x180);没有它,iOS 会显示通用截图。
有关搜索结果页功能类型和优化,请参阅 serp-features。
网站图标可以出现在 Google 搜索结果中您网站列表的旁边。Google 搜索中心要求:
| 要求 | 指南 |
|---|---|
| 放置位置 | 将 <link rel="icon" href="/path/to/favicon.ico"> 添加到主页头部 |
| 每个主机名一个 | 每个主机名一个网站图标;example.com 和 code.example.com 是分开的;example.com/sub-site 共享同一个网站图标 |
| 可抓取性 | Googlebot-Image 必须能够抓取网站图标;Googlebot 必须能够抓取主页;不要在 robots.txt 中阻止任一爬虫 |
| 形状 | 正方形(1:1 宽高比);最小 8x8 像素;最好 >48x48 像素,以确保跨平台质量 |
| 稳定 URL | 不要频繁更改网站图标 URL |
| 内容合适 | 无不当内容(色情、仇恨符号);Google 可能会替换为默认图标 |
| 时间 | 抓取可能需要数天到数周;使用 Search Console URL 检查工具请求索引 |
支持的 rel 值:icon、shortcut icon、apple-touch-icon、apple-touch-icon-precomposed。href 可以是相对路径(/favicon.ico)或绝对路径;网站图标可以托管在 CDN 上。
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
放置在 /app 目录中:favicon.ico、icon.png、apple-icon.png。Next.js 会自动生成标签。
在 manifest.json 中包含 icons 数组,包含 192x192 和 512x512 尺寸,用于可遮罩图标。
/favicon.ico?v=2)每周安装数
205
代码仓库
GitHub 星标数
239
首次出现
2026年3月1日
安全审计
安装于
kimi-cli187
cursor187
codex186
gemini-cli186
github-copilot186
amp186
Guides favicon and app icon implementation for brand consistency across browser tabs, bookmarks, mobile home screens, and Google Search results. Favicons help users identify sites; missing or incorrect icons hurt trust.
When invoking : On first use , if helpful, open with 1-2 sentences on what this skill covers and why it matters, then provide the main output. On subsequent use or when the user asks to skip, go directly to the main output.
Check for project context first: If .claude/project-context.md or .cursor/project-context.md exists, read it for brand and visual identity.
Identify:
| Size | Use |
|---|---|
| 16x16 | Browser tabs, standard displays |
| 32x32 | Retina/HiDPI browser tabs |
| 180x180 | Apple Touch Icon (iOS home screen); no transparency |
| 192x192 | Android Chrome home screen, PWA launcher |
| 512x512 | PWA splash screens, adaptive icons |
Optional : 48x48, 96x96, 120x120, 152x152, 167x167, 256x256 for broader coverage.
| Format | Use |
|---|---|
| SVG | Modern browsers; scalable; supports dark mode via media queries; lightweight |
| PNG | High-DPI; explicit sizes; easy to generate; required for Apple Touch Icon |
| ICO | Legacy; bundles multiple sizes; fallback for older browsers |
Recommended : Provide SVG + PNG fallbacks. Never skip Apple Touch Icon (180x180); iOS shows a generic screenshot without it.
See serp-features for SERP feature types and optimization.
Favicons can appear in Google Search results next to your site's listings. Google Search Central requirements:
| Requirement | Guideline |
|---|---|
| Placement | Add <link rel="icon" href="/path/to/favicon.ico"> to homepage header |
| One per hostname | One favicon per hostname; example.com and code.example.com are separate; example.com/sub-site shares the same favicon |
| Crawlability | Googlebot-Image must crawl favicon; Googlebot must crawl homepage; do not block either in robots.txt |
| Shape | Square (1:1 aspect ratio); minimum 8x8px; preferably >48x48px for quality across platforms |
| Stable URL | Do not change favicon URL frequently |
Supported rel values : icon, shortcut icon, apple-touch-icon, apple-touch-icon-precomposed. href can be relative (/favicon.ico) or absolute; favicon can be hosted on CDN.
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
Place in /app: favicon.ico, icon.png, apple-icon.png. Next.js auto-generates tags.
Include icons array in manifest.json with 192x192 and 512x512 for maskable icons.
/favicon.ico?v=2)Weekly Installs
205
Repository
GitHub Stars
239
First Seen
Mar 1, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
kimi-cli187
cursor187
codex186
gemini-cli186
github-copilot186
amp186
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
111,800 周安装
| Appropriate | No inappropriate content (pornography, hate symbols); Google may replace with default icon |
| Timing | Crawling can take days to weeks; use Search Console URL Inspection to request indexing |