svg-icon-forge
Skill0 starsChanged 48 days agoMITView on GitHub
根据需求生成、优化或校验 SVG 图标,支持线框、填充、双色、手绘和像素风格。用于矢量图标任务。
In this repository9 other files it gives its agents.
- api-mockerSkill
- codebase-cartographerSkill
- commit-poetSkill
- data-detectiveSkill
- doc-archaeologistSkill
- env-guardianSkill
- git-storytellerSkill
- regex-wizardSkill
- terminal-dashboardSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 6 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Determine the style: If not specified, default to outline.
- Distinctive: line 30
Use negative space (cutouts) to convey detail
- Distinctive: line 41
Use cubic bezier curves with subtle control-point offsets
- Distinctive: line 43
Avoid perfect circles or straight lines.
- Very specific: line 47
Use <rect> elements sized 1x1 or 2x2 on integer coordinates
- Distinctive: line 48
No anti-aliasing effects; all edges are axis-aligned
- Distinctive: line 53
Every generated SVG MUST meet these criteria:
- Very specific: line 55
ViewBox: Always viewBox="0 0 24 24" with width="24" height="24"
- Very specific: line 56
Color: Use currentColor exclusively so icons adapt to any theme
- Distinctive: line 57
Coordinates: Prefer integer (pixel-aligned) coordinates.
- Very specific: line 58
Relative paths: Use relative commands (m, l, c, a) in <path> d attributes where practical
- Very specific: line 109
Run scripts/optimize_svg.py on the result to validate and optimize
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SVG Icon Forge
Resolve <skill_dir> to the directory containing this SKILL.md. Use absolute helper paths, keep project/output paths separate, and generate only the outputs needed for the user's request.
You are a precision SVG icon generator. When the user requests icons, follow these instructions carefully.
Understanding Icon Requests
- Identify the subject: What object, concept, or action should the icon depict?
- Determine the style: If not specified, default to
outline. Ask if ambiguous. - Check quantity: Single icon or a set? For sets, ensure visual consistency.
- Note constraints: Target size, color requirements, accessibility needs.
Style Definitions
outline (default)
- 24x24 line icons inspired by Lucide/Feather conventions
stroke-width="2",stroke="currentColor",fill="none"stroke-linecap="round",stroke-linejoin="round"- Clean, minimal geometry; avoid overly complex paths
filled
- Solid fill shapes:
fill="currentColor", no stroke - Use negative space (cutouts) to convey detail
- Shapes should be bold and recognizable at small sizes
duotone
- Two-tone icons with a primary and secondary layer
- Primary layer:
fill="currentColor"at full opacity - Secondary layer:
fill="currentColor"atopacity="0.3" - Group layers with
<g>elements for easy theming
hand-drawn
- Irregular, slightly wobbly paths that mimic pen sketches
- Use cubic bezier curves with subtle control-point offsets
stroke-width="1.5"to2,fill="none"- Avoid perfect circles or straight lines; add human imperfection
pixel
- Pixel-art style aligned strictly to a grid
- Use
<rect>elements sized 1x1 or 2x2 on integer coordinates - No anti-aliasing effects; all edges are axis-aligned
- Limit palette:
currentColorfor on-pixels, transparent for off
SVG Quality Standards
Every generated SVG MUST meet these criteria:
- ViewBox: Always
viewBox="0 0 24 24"withwidth="24" height="24" - Color: Use
currentColorexclusively so icons adapt to any theme - Coordinates: Prefer integer (pixel-aligned) coordinates; use half-pixels only when necessary for centering
- Relative paths: Use relative commands (
m,l,c,a) in<path>dattributes where practical - File size: Each icon SVG must be under 1 KB
- No unnecessary attributes: Strip
xmlnswhen inline, remove editor metadata, IDs unless needed - Accessibility: Include a
<title>element inside the SVG describing the icon - Structure: Wrap in
<svg xmlns="http://www.w3.org/2000/svg" ...>for standalone files
Output Formats
Single SVG
Return the raw SVG markup in a fenced code block with svg language tag.
SVG Sprite (for icon sets)
Combine multiple icons into one <svg> with <symbol> elements:
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
<symbol id="icon-name" viewBox="0 0 24 24">
<!-- paths -->
</symbol>
</svg>Usage: <svg><use href="#icon-name"/></svg>
React Component Wrapper
export const IconName = ({ size = 24, ...props }) => (
<svg width={size} height={size} viewBox="0 0 24 24" fill="none"
stroke="currentColor" strokeWidth="2" strokeLinecap="round"
strokeLinejoin="round" {...props}>
{/* paths */}
</svg>
);Vue Component Wrapper
<template>
<svg :width="size" :height="size" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" v-bind="$attrs">
<!-- paths -->
</svg>
</template>
<script setup>
defineProps({ size: { type: Number, default: 24 } });
</script>Workflow
- Parse the user's request to identify icon subject(s) and style
- Generate SVG code following the style definition above
- Run
scripts/optimize_svg.pyon the result to validate and optimize - Present the final SVG with a visual preview description
- For sets, offer a sprite sheet and component wrappers if appropriate
Available Resources
scripts/optimize_svg.py-- Validates, optimizes, and reports size of SVG filesassets/icon_templates.py-- Parameterized templates for common icon categoriesreferences/examples.md-- Gallery of example icons in all 5 styles
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

