Loading...
Loading...
Generate a standards-aligned browser favicon.ico from a user-supplied source image, embedding PNG rasters at 32×32, 48×48, and 180×180 in one ICO container. Use when the user asks to create a favicon, 生成 favicon、网站图标、从图片做 ico、favicon.ico、create favicon from image. 从用户提供的源图生成含 32/48/180 三档尺寸的 favicon.ico(ICO 内嵌 PNG)。若用户未上传或未指定可用源图,必须中止并提示上传/路径。
npx skill4agent add wghust/stark-skills create-faviconLanguage: Match the user’s language (中文提问则中文回复).
references/ico-format-and-browser-notes.mdUSAGE.mdfavicon.icoread_file@public/logo.pngpublic/logo.pngfavicon.icofavicon.icopublic/favicon.icoapp/favicon.icofavicon.icopublic/favicon.icopnpm installpnpm buildnode_modulesdist/tools/create-favicontools/create-favicon/package.jsonstark-skillscd <absolute-path-to>/tools/create-favicon && pnpm install && pnpm buildnode--input--outputtools/create-favicon$TMPDIR%TEMP%mktemp -dpnpm install && pnpm buildnode dist/cli.js --input "<absolute source image>" --output "<absolute path in user app>/favicon.ico"npx <package>node_modulesmagickUSAGE.md# Example after building CLI in monorepo or temp dir — always use absolute paths.
# Default: --fit contain(整图可见,非方形时透明或白边,不默认裁切)
node dist/cli.js --input "<absolute-path-to-source.png>" --output "<absolute-path-to-user-app>/public/favicon.ico"
# Only if the user explicitly wants 铺满/裁剪去留白(需确认可能裁掉边缘):
node dist/cli.js --input "..." --output "..." --fit covercontaincover--fit coverfitfavicon.icosharp00 00 01 0003 0089 50 4E 47containcovercoverapple-touch-icon.pngreferences/ico-format-and-browser-notes.md