icon-set-generator by jezweb/claude-skills
npx skills add https://github.com/jezweb/claude-skills --skill icon-set-generator生成专为特定项目定制的、视觉风格一致的 SVG 图标集。每个图标集都基于共享的风格规范构建,确保每个图标看起来都与其他图标浑然一体——相同的描边粗细、相同的边角处理、相同的视觉密度。
通用图标库(如 Lucide、Heroicons)很棒,但每个使用它们的网站看起来都很相似。自定义图标集能为项目赋予独特的视觉标识。难点在于保持一致性——单独绘制 20 多个图标会导致风格漂移。本技能通过一次性定义风格规则并在每个图标中强制执行,解决了这个问题。
询问项目相关信息。你需要足够的信息来建议图标并选择风格:
currentColor,也能为风格选择提供参考)像"纽卡斯尔的水管工,现代感"这样的简要描述就足以继续。不要过度询问。
阅读 references/industry-icons.md 获取针对特定行业的建议。将图标组织成组:
展示列表。在生成之前,让用户添加、删除或重命名图标。
阅读 references/style-presets.md 获取完整的预设定义。选择一个作为起点:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 预设 | 最适合 | 描边 | 端点/连接点 | 边角 |
|---|---|---|---|---|
| 简洁 | 大多数商业网站 | 1.5px | round/round | 2px |
| 锐利 | 企业/技术类 | 1.5px | square/miter | 0px |
| 柔和 | 友好/平易近人 | 2px | round/round | 4px |
| 极简 | 优雅/编辑类 | 1px | round/round | 0px |
| 粗犷 | 高冲击力/无障碍 | 2.5px | round/round | 2px |
告诉用户你推荐哪个预设以及原因,然后确认。
按照下面的 SVG 规则生成每个图标。输出到项目根目录(或用户首选位置)的 icons/ 目录中。
在生成之前阅读 references/svg-examples.md —— 它包含参考实现,展示了适当的复杂程度以及如何处理常见的图标形状。
分批生成,每批约 5 个。在每批之后,继续之前先进行视觉审查以确保一致性。所有图标完成后,创建预览页面和 style-spec.json。
输出结构:
icons/
├── style-spec.json
├── preview.html
├── home.svg
├── phone.svg
└── ...
首先展示 preview.html,以便用户直观地看到完整的图标集。
图标集中的每个图标必须遵循所有这些规则。即使是微小的不一致——略微不同的描边宽度、其他图标是尖角而此处是圆角——也会让图标集看起来不专业。
每个图标都使用这个确切的外部结构:
<svg xmlns="http://www.w3.org/2000/svg"
width="{grid}" height="{grid}"
viewBox="0 0 {grid} {grid}"
fill="none"
stroke="currentColor"
stroke-width="{strokeWidth}"
stroke-linecap="{strokeLinecap}"
stroke-linejoin="{strokeLinejoin}">
<!-- 图标路径放在这里 -->
</svg>
仅使用 currentColor — 切勿硬编码颜色。SVG 从 CSS 继承颜色。不要使用 fill="#000" 或 stroke="blue"。如果形状需要填充,请使用 fill="currentColor"。
相同的 viewBox — 每个图标使用相同的 viewBox。没有例外。
相同的根描边属性 — <svg> 元素上的 stroke-width、stroke-linecap、stroke-linejoin 必须在所有图标中保持一致。仅在真正必要时才在单个元素上覆盖。
根元素无变换 — 不使用 translate、rotate、scale。将定位信息烘焙到坐标中。
无 ID 或类名 — 保持 SVG 简洁,便于外部样式设置。
坐标精度 — 最多保留 2 位小数。对齐到半像素网格(例如 12、12.5,而不是 12.333)。
一致的边距 — 保持从 viewBox 边缘开始的配置边距。对于 24px 网格和 2px 边距,请在 2–22 坐标范围内绘制。
最少元素 — 使用尽可能少的 <path>、<circle>、<rect>、<line> 元素。越简单 = 文件越小 + 渲染越快。
视觉居中 — 看起来是视觉上的居中,而不仅仅是数学上的居中。向左的箭头会略微向右偏移。带烟囱的房子会针对不对称性进行调整。
细微但专业效果必不可少:
{
"name": "project-name-icons",
"preset": "clean",
"grid": 24,
"strokeWidth": 1.5,
"strokeLinecap": "round",
"strokeLinejoin": "round",
"cornerRadius": 2,
"padding": 2,
"opticalBalance": true,
"iconCount": 20,
"icons": ["home", "phone", "email"],
"generated": "2026-02-15"
}
生成一个独立的 HTML 文件,显示所有图标以供视觉审查。阅读 references/preview-template.md 获取模板。要求:
在交付前验证每一项:
viewBox、stroke-width、stroke-linecap、stroke-linejoincurrentColorarrow-right.svg)在生成前阅读这些文件:
references/style-presets.md — 详细的预设定义和选择指南references/industry-icons.md — 针对特定行业的图标建议references/preview-template.md — 预览页面的 HTML 模板references/svg-examples.md — 展示不同复杂程度下正确构建的示例 SVG每周安装量
514
仓库
GitHub 星标数
643
首次出现
2026年2月18日
安全审计
安装于
opencode473
codex466
gemini-cli464
github-copilot462
cursor455
kimi-cli452
Generate custom, visually consistent SVG icon sets tailored to specific projects. Each set is built from a shared style specification so every icon looks like it belongs with the others — same stroke weight, same corner treatment, same visual density.
Generic icon libraries (Lucide, Heroicons) are great but every site using them looks similar. A custom icon set gives a project distinct visual identity. The hard part is consistency — drawing 20+ icons individually causes style drift. This skill solves that by defining style rules once and enforcing them across every icon.
Ask about the project. You need enough to suggest icons and pick a style:
A brief like "plumber in Newcastle, modern feel" is enough to proceed. Don't over-interview.
Read references/industry-icons.md for industry-specific suggestions. Organise into groups:
Present the list. Let the user add, remove, or rename before generating.
Read references/style-presets.md for full preset definitions. Pick one as starting point:
| Preset | Best For | Stroke | Caps/Joins | Corners |
|---|---|---|---|---|
| Clean | Most business sites | 1.5px | round/round | 2px |
| Sharp | Corporate/technical | 1.5px | square/miter | 0px |
| Soft | Friendly/approachable | 2px | round/round | 4px |
| Minimal | Elegant/editorial | 1px | round/round | 0px |
| Bold | High impact/accessible | 2.5px | round/round | 2px |
Tell the user which preset you're recommending and why, then confirm.
Generate every icon following the SVG Rules below. Output to an icons/ directory in the project root (or the user's preferred location).
Read references/svg-examples.md before generating — it contains reference implementations showing the right level of complexity and how to handle common icon shapes.
Generate in batches of ~5. After each batch, visually review for consistency before continuing. After all icons are done, create the preview page and style-spec.json.
Output structure:
icons/
├── style-spec.json
├── preview.html
├── home.svg
├── phone.svg
└── ...
Present preview.html first so the user sees the complete set visually.
Every icon in a set MUST follow all of these. Even small inconsistencies — a slightly different stroke width, a rounded corner where others are sharp — make the set look amateur.
Every icon uses this exact outer structure:
<svg xmlns="http://www.w3.org/2000/svg"
width="{grid}" height="{grid}"
viewBox="0 0 {grid} {grid}"
fill="none"
stroke="currentColor"
stroke-width="{strokeWidth}"
stroke-linecap="{strokeLinecap}"
stroke-linejoin="{strokeLinejoin}">
<!-- icon paths here -->
</svg>
currentColor only — Never hardcode colours. SVGs inherit colour from CSS. No fill="#000" or stroke="blue". If a shape needs fill, use fill="currentColor".
Identical viewBox — Every icon uses the same viewBox. No exceptions.
Identical root stroke attributes — stroke-width, stroke-linecap, stroke-linejoin on the <svg> element must match across all icons. Override on individual elements only when truly necessary.
Subtle but essential for professional results:
{
"name": "project-name-icons",
"preset": "clean",
"grid": 24,
"strokeWidth": 1.5,
"strokeLinecap": "round",
"strokeLinejoin": "round",
"cornerRadius": 2,
"padding": 2,
"opticalBalance": true,
"iconCount": 20,
"icons": ["home", "phone", "email"],
"generated": "2026-02-15"
}
Generate a self-contained HTML file displaying all icons for visual review. Read references/preview-template.md for the template. Requirements:
Verify every item before delivering:
viewBox, stroke-width, stroke-linecap, stroke-linejoincurrentColor exclusivelyarrow-right.svg)Read these before generating:
references/style-presets.md — Detailed preset definitions and selection guidancereferences/industry-icons.md — Industry-specific icon suggestionsreferences/preview-template.md — HTML template for the preview pagereferences/svg-examples.md — Example SVGs showing proper construction at various complexity levelsWeekly Installs
514
Repository
GitHub Stars
643
First Seen
Feb 18, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode473
codex466
gemini-cli464
github-copilot462
cursor455
kimi-cli452
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
136,300 周安装
Oracle 到 PostgreSQL 数据库迁移计划自动生成工具 | .NET 解决方案分析
493 周安装
TanStack Table 无头数据表格 | Cloudflare Workers + D1 服务器端分页排序
493 周安装
JavaScript 概念 SEO 审计:提升开发者文档搜索排名与可见性
493 周安装
代码安全审查技能:密钥管理、SQL注入防护、身份验证最佳实践指南
493 周安装
InkOS 多智能体小说创作 CLI 工具:AI 自主写作、审核与修订完整流程
494 周安装
Vue.js开发指南:核心原则、组件最佳实践与响应式编程完整教程
494 周安装
No transforms on root — No translate, rotate, scale. Bake positioning into coordinates.
No IDs or classes — Keep SVGs clean for external styling.
Coordinate precision — Max 2 decimal places. Snap to half-pixel grid (e.g. 12, 12.5, not 12.333).
Consistent padding — Maintain configured padding from viewBox edge. For 24px grid with 2px padding, draw within 2–22 coordinate range.
Minimal elements — Fewest <path>, <circle>, <rect>, <line> elements practical. Simpler = smaller + faster rendering.
Visual centring — Appear visually centred, not just mathematically centred. A leftward arrow shifts slightly right. A house with a chimney adjusts for asymmetry.