Imported from glincker/thesvg (
AGENTS.md). Install upstream withnpx skills add glincker/thesvg. Copyright stays with the author.
thesvg - AI Review Guidelines
SVG Icon Submission Rules
Required
- Every icon directory must have
default.svg - Every SVG must have a valid
viewBoxattribute - Every SVG must contain a
<title>element with the brand name - Preferred viewBox:
0 0 24 24(match library convention) - File size must be under 50KB
- No
<script>tags, event handlers, orjavascript:URIs - No embedded raster images (
<image>with base64 data) - No
<?xml>declarations or<!DOCTYPE>preambles
Fill and Color Rules
default.svg: Must use the brand hex color asfillon<svg>root (notcurrentColor)mono.svg: Must usefill="currentColor"on<svg>rootlight.svg: Must usefill="#ffffff"or similar light colordark.svg: Must usefill="#1a1a2e"or similar dark color- Detail elements (eyes, pupils, accents) that contrast with the body must have explicit
filloverrides - they must not inherit the root fill if that makes them invisible - Stroke colors on antennae, lines, or accents must contrast with adjacent filled shapes - same-color strokes over same-color fills are invisible
- Never include a viewport-covering rectangle like
<path d="M0 0h24v24H0z"/>withoutfill="none"- this covers the entire icon
icons.json Registry
- Located at
src/data/icons.json - Entries must be alphabetically sorted by
slug - Required fields:
slug,title,aliases,hex,categories,variants,license,url hexmust not include#prefix (e.g."f43f5e"not"#f43f5e")variantsobject keys must match filenames inpublic/icons/{slug}/categoriesmust use existing category names (check existing entries)
Variant File Naming
public/icons/{slug}/
default.svg # Required - brand color
mono.svg # Recommended - inherits text color
light.svg # Optional - for dark backgrounds
dark.svg # Optional - for light backgrounds
color.svg # Optional - multi-color/gradient version
wordmark.svg # Optional - text logo
wordmarkLight.svg # Optional - light text logo
wordmarkDark.svg # Optional - dark text logo
Slug Naming Convention
- Lowercase, hyphen-separated
- No uppercase, no spaces, no underscores
- Must match the directory name under
public/icons/
Code Quality Rules
TypeScript
- No
anytypes - Strict mode enabled
- Server Components by default,
"use client"only when needed
Styling
- Tailwind CSS only, no inline styles or CSS modules, except a narrow exception for CSS custom properties carrying a genuinely per-instance runtime value (e.g. a color derived from an icon's own hex) that cannot be expressed as a static utility class
- shadcn/ui components, extend don't reinvent
- Phosphor icons (
@phosphor-icons/react/dist/ssr) for new or touched UI chrome; existing untouched Lucide usage can stay during the gradual migration, but do not add new Lucide icons
Git
- Never commit directly to
main - Conventional commit messages:
feat:,fix:,docs:,refactor:,test:,perf: - No AI tool mentions in commit messages
Common Review Pitfalls
- Invisible elements: Fill color matches background or parent fill - always verify contrast
- Bounding box paths:
M0 0hWvHrectangles that cover the entire icon - Wrong alphabetical position: icons.json must stay sorted by slug
- Missing fill overrides: Child elements inheriting root fill when they need a different color
- Inconsistent viewBox: All icons in a PR should use the same coordinate space as the library standard
- Google Fonts in SVG: External
@import url()for fonts will not render in most contexts
This is NOT the Next.js you know
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in node_modules/next/dist/docs/ (resolved from this file's directory; in monorepos the next package may not be visible from the repo root) before writing any code. Heed deprecation notices.
This block is written and re-added by next dev — verify at node_modules/next/dist/server/lib/generate-agent-files.js. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.