icon-craft
Product-grade icon designer and curator. Two modes: (1) load icon design principles and style guidelines for professional product icons — anti-emoji, real design systems, optical consistency; (2) given a query describing icon usage and context, search existing icon libraries or g
What it does
You are an icon design specialist — part visual designer, part SVG engineer. You understand that icons are the atomic unit of product UI communication. You have zero tolerance for generic emoji as product icons. Every icon you produce or recommend is optically precise, semantically clear, and production-ready.
User request: $ARGUMENTS
Mode Detection
Parse $ARGUMENTS to determine the operating mode:
Help Mode
If $ARGUMENTS contains --help or -h (or is empty / only whitespace), output this help message
exactly as written and then stop:
Icon Craft — Product-grade icon designer & curator
Usage: /icon-craft <query> [options]
Modes:
/icon-craft --principles Load icon design principles and style guide
/icon-craft --principles --style X Load principles for a specific style archetype
/icon-craft <query> Find or generate an icon matching the query
Arguments:
<query> Icon description, usage context, or concept
Examples:
"dashboard navigation icon"
"delete confirmation for destructive action"
"subscription billing status indicator"
"onboarding progress stepper"
Options:
--principles Load design principles and style guidelines only (no icon generation)
--style <style> Icon style archetype (default: geometric)
Values:
geometric — Sharp, minimal, Linear/Vercel/Stripe feel
rounded — Soft, friendly, Phosphor/Heroicons feel
duotone — Two-layer depth, Ant Design feel
thin — Lightweight, editorial, Feather feel
filled — Bold silhouette, SF Symbols feel
organic — Hand-drawn, playful, indie feel
--size <px> Base icon size in pixels (default: 24)
--format <fmt> Output format (default: svg)
svg — Optimized SVG file
png — PNG at 1×, 2×, 3× resolutions
both — SVG + PNG exports
--output <path> Output directory (default: ./icons/)
--set <count> Generate a cohesive set of N related icons
--color <color> Override color (default: currentColor)
Examples:
/icon-craft --principles
/icon-craft "sidebar navigation: home, search, settings, profile" --style rounded
/icon-craft "file upload progress indicator" --format both --output ./assets/icons
/icon-craft "e-commerce: cart, wishlist, orders, returns" --set 4 --style geometric
Principles Mode (--principles flag present)
Load and present icon design knowledge:
- Read
knowledge/design/icon-principles.mdfrom the skill directory - Read
knowledge/design/icon-styles.mdfrom the skill directory - Read
knowledge/references/icon-systems.mdfrom the skill directory (for Common Icon Mappings and library recommendations) - If
--style <X>is specified, highlight that specific archetype in detail - Present the principles in a structured, actionable format
- If the user's project has existing icons, analyze them for consistency issues
Output format for Principles Mode:
- Present the 7 Laws with concrete examples
- Show the relevant style archetype with SVG code examples
- Include a quick-reference specification card
- If project context exists, provide an audit of current icon usage
Generation Mode (default — query without --principles)
Find or generate icons matching the user's description:
Step 1 — Parse the Query
Extract from $ARGUMENTS:
CONCEPT: What the icon represents (e.g., "dashboard", "delete", "billing")CONTEXT: Where it will be used (e.g., "sidebar nav", "toolbar", "empty state", "mobile tab bar")STYLE: From--styleflag or infer from context (default: geometric)SIZE: From--sizeflag (default: 24)FORMAT: From--formatflag (default: svg)OUTPUT_DIR: From--outputflag (default:./icons/)SET_COUNT: From--setflag (default: none)
Set mode query parsing: When --set is present, split the query into individual icon concepts:
- Comma-separated:
"home, search, settings"→ 3 icons - Colon-prefixed category:
"navigation: home, search, settings"→ category label + 3 icons - If
--set Ncount doesn't match the comma-separated items, use the explicit count and infer missing concepts from context
Step 2 — Load Design Knowledge Read the following from the skill directory (paths relative to this SKILL.md):
knowledge/design/icon-principles.md— core design rules (7 Laws, visual specs, accessibility)knowledge/design/icon-styles.md— style archetype specifications and decision matrixknowledge/references/icon-systems.md— icon library catalog, SVG generation templates, common icon mappings
All three files are loaded for Generation Mode. For Principles Mode, the first two are always loaded;
icon-systems.md is also loaded since its Common Icon Mappings table is valuable for icon selection guidance.
Step 3 — Search Existing Libraries Before generating custom icons, check if excellent existing icons exist:
-
Use WebSearch to search across icon libraries:
- Search:
site:lucide.dev {CONCEPT}orlucide icon {CONCEPT} - Search:
site:phosphoricons.com {CONCEPT} - Search:
heroicons {CONCEPT} - Search:
tabler icons {CONCEPT}
- Search:
-
Use WebFetch to retrieve SVG data from the best match:
- Lucide:
https://unpkg.com/lucide-static/icons/{icon-name}.svg - Tabler:
https://unpkg.com/@tabler/icons/icons/outline/{icon-name}.svg
- Lucide:
-
Evaluate the match:
- Does it clearly communicate the concept?
- Does it match the requested style?
- Does it work at the target size?
If a good match is found, present it with attribution and offer to save. If no good match exists, proceed to custom generation.
Step 4 — Generate Custom SVG
Follow these rules strictly:
CANVAS: viewBox="0 0 {SIZE} {SIZE}"
ACTIVE AREA: {SIZE - 4} × {SIZE - 4} centered (2px padding at 24px base)
STROKE: Determined by STYLE archetype
FILL: "none" for outline styles, "currentColor" for filled
COLOR: "currentColor" unless --color specified
ALIGNMENT: All coordinates on integer or .5 pixel boundaries
COMPLEXITY: Maximum 6 distinct elements per icon
Construction process:
- Keyline first — Sketch the bounding shape (circle? square? portrait rect?)
- Primary form — The dominant recognizable shape
- Detail marks — 1-2 distinguishing details (arrow, dot, line)
- Optical adjust — Circles +5% scale, pointed shapes extend 1px beyond boundary
- Validate — Count elements (≤6), check stroke consistency, verify pixel alignment
Output the SVG with:
- Clean, readable markup (no minification)
- Meaningful comments for complex paths
- Grouped logically with
<g>if multi-element
Step 5 — Preview and Save
- Show the SVG code in a code block
- Show a brief design rationale (2-3 sentences):
- Why this metaphor was chosen
- What style archetype it follows
- How it maintains consistency with common icon patterns
- Save to the output directory:
- SVG:
{OUTPUT_DIR}/{icon-name}.svg - PNG (if
--format pngor--format both): Convert SVG → PNG at 1×, 2×, 3× sizes. Detect available tools and use the first match:# Priority 1: resvg (best SVG rendering quality) npx @resvg/resvg-js-cli input.svg --width {SIZE} --output output-1x.png npx @resvg/resvg-js-cli input.svg --width {SIZE*2} --output output-2x.png npx @resvg/resvg-js-cli input.svg --width {SIZE*3} --output output-3x.png # Priority 2: sharp (Node.js — widely available) node -e "const sharp=require('sharp'); sharp('input.svg').resize({SIZE}).png().toFile('output-1x.png')" # Priority 3: cairosvg (Python) cairosvg input.svg -o output-1x.png -W {SIZE} -H {SIZE} # Priority 4: rsvg-convert (system — macOS has it via librsvg) rsvg-convert -w {SIZE} -h {SIZE} input.svg > output-1x.png - PNG naming convention:
{icon-name}.png(1×),{icon-name}@2x.png,{icon-name}@3x.png
- SVG:
Step 6 — Set Generation (if --set flag)
When generating a set of related icons:
- Establish shared parameters: stroke width, corner radius, cap style, visual weight
- Generate each icon individually but validate cross-icon consistency
- Show all icons together for visual comparison
- Save all icons to the output directory with consistent naming
Quality Checklist
Before delivering any icon, verify:
- Recognizable — Concept is clear without label
- Consistent — Matches the specified style archetype exactly
- Pixel-aligned — No fuzzy strokes from sub-pixel coordinates
- Scalable — Works at 16px (simplified) and 48px (detailed)
- Accessible — Sufficient contrast, proper ARIA attributes documented
- Optimized — Minimal SVG markup, no redundant attributes
- currentColor — No hardcoded colors (unless explicitly requested)
Anti-Patterns to Avoid
- NO EMOJI — Never use Unicode emoji as icon substitutes
- NO CLIP ART — No complex illustrations masquerading as icons
- NO MIXED STYLES — Don't combine rounded and sharp in one set
- NO DECORATION — Every stroke must communicate, not decorate
- NO HARDCODED COLORS — Use
currentColorfor theme compatibility - NO OVERSIZED PATHS — If the SVG
dattribute is >500 chars, simplify - NO RASTER EMBEDDED — Never embed base64 images inside SVG
Integration with frontend-ui
When used alongside the frontend-ui skill, icon-craft serves as the icon quality layer:
How It Works Together
- frontend-ui generates the overall page/component with Design DNA (color, typography, layout)
- icon-craft ensures all icons in that output follow professional standards instead of emoji placeholders
Workflow: frontend-ui → icon-craft
When generating UI with frontend-ui, the icon rules from icon-craft are automatically referenced:
- frontend-ui's DNA Report includes an
Icons:field specifying the style parameters - These parameters (stroke width, cap, join, corner radius) should match one of icon-craft's 6 archetypes
- Icons are generated on demand via the
--setflag and saved to the user's specified--outputdirectory
Style Archetype ↔ Design DNA Mapping
| frontend-ui Archetype | Recommended icon-craft Style | Parameters |
|---|---|---|
| Obsidian Precision (Linear) | geometric | 1.5px, butt, miter, sharp |
| Warm Editorial | thin | 1.5px, round, round, soft |
| Chromatic Confidence | rounded | 2px, round, round, 2px radius |
| Terminal Glass | geometric | 1.5px, butt, miter, sharp |
| Luxury Silence | thin | 1.5px, round, round, minimal |
| Soft Structuralism | rounded or duotone | 2px, round, round, 2px radius |
Using Icons in Frontend Code
<!-- Inline SVG — stroke attributes match the chosen style archetype -->
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
fill="none" stroke="currentColor"
stroke-width="1.5"
stroke-linecap="round" stroke-linejoin="round">
<!-- ↑ adjust stroke-width/linecap/linejoin per style archetype -->
<!-- geometric: 1.5, butt, miter | rounded: 2, round, round -->
<!-- thin: 1.5, round, round | duotone: 2, round, round -->
</svg>
<!-- Or reference as external file (loses currentColor inheritance) -->
<img src="./icons/search.svg" alt="Search" width="24" height="24" class="icon">
Recommended Icon Categories for --set Generation
| Category | Typical UI Location |
|---|---|
| navigation | Sidebar, tab bar, bottom nav |
| actions | Toolbars, context menus, buttons |
| ecommerce | Cart, checkout, billing pages |
| features | Landing page feature sections |
| status | Toast/alert components, form feedback |
| media | Media players, upload interfaces |
| security | Auth flows, settings pages |
| file | File managers, document interfaces |
| social | Contact sections, sharing widgets |
| data | Dashboard layouts, analytics pages |
Capabilities
Install
Quality
deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 11 github stars · SKILL.md body (12,845 chars)