Token导航 LogoToken导航TokenDH.com
研究检索权限需确认github未标认证来源可访问clear审计通过

faviconfavicon 搜索

Agent Skill

favicon 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

674

周安装

27

GitHub Stars

32

下载量

218
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:favicon(favicon 搜索)
来源仓库:https://github.com/steveclarke/dotfiles
仓库路径:skills/favicon
安装命令:
npx skills add https://github.com/steveclarke/dotfiles --skill favicon
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/steveclarke/dotfiles --skill favicon

简介

favicon 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于研究检索类任务,如图标资源查找和信息筛选。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前建议确认权限范围和维护状态,注意可能触发联网或文件读写操作。
  • 可结合原始 README 继续核验具体用法和功能细节。

SKILL.md

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:

which magick

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

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

If the source is an SVG, also check for rsvg-convert:

which rsvg-convert

If not found, instruct the user to install it:

  • macOS: brew install librsvg
  • Linux: sudo apt install librsvg2-bin

Why: ImageMagick's SVG rasterizer ignores -background none and renders a white canvas behind SVGs, destroying transparency. rsvg-convert handles SVG transparency correctly.

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

Replace [STATIC_DIR] with the detected static assets directory from Step 2.

IMPORTANT — SVG sources: If the source is an SVG, you MUST use rsvg-convert for all PNG generation. ImageMagick's SVG rasterizer produces opaque white backgrounds even with -background none. Only use ImageMagick for the final ICO assembly from the already-rasterized PNGs.

For SVG sources — use rsvg-convert for PNGs:

rsvg-convert -w 96 -h 96 --background-color transparent "$1" -o [STATIC_DIR]/favicon-96x96.png
rsvg-convert -w 180 -h 180 --background-color transparent "$1" -o [STATIC_DIR]/apple-touch-icon.png
rsvg-convert -w 192 -h 192 --background-color transparent "$1" -o [STATIC_DIR]/web-app-manifest-192x192.png
rsvg-convert -w 512 -h 512 --background-color transparent "$1" -o [STATIC_DIR]/web-app-manifest-512x512.png

Then generate ICO from the transparent PNGs (not directly from SVG):

rsvg-convert -w 16 -h 16 --background-color transparent "$1" -o /tmp/fav16.png
rsvg-convert -w 32 -h 32 --background-color transparent "$1" -o /tmp/fav32.png
rsvg-convert -w 48 -h 48 --background-color transparent "$1" -o /tmp/fav48.png
magick /tmp/fav16.png /tmp/fav32.png /tmp/fav48.png [STATIC_DIR]/favicon.ico
rm /tmp/fav16.png /tmp/fav32.png /tmp/fav48.png

Copy the SVG as favicon.svg:

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

For raster sources (PNG, JPG, etc.) — use ImageMagick:

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

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

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

apple-touch-icon.png (180x180)

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

web-app-manifest-192x192.png

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

web-app-manifest-512x512.png

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

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

<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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

30.09%
按下载量换算66

windsurf

20.6%
按下载量换算45

OpenCode

15.35%
按下载量换算33

Cursor

13.77%
按下载量换算30

Codex

7.73%
按下载量换算17

Antigravity

3.32%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills