iOS & macOS DevelopmentDocumentedScanned
sfsymbol-generator
Generate an Xcode SF Symbol asset catalog .symbolset.
Share:
Installation
npx clawhub@latest install sfsymbol-generatorView the full skill documentation and source below.
Documentation
SF Symbol Generator
Usage
You can override the default asset catalog location with SFSYMBOL_ASSETS_DIR.
Raw symbolset (no template injection)
./scripts/generate.sh <symbol-name> <svg-path> [assets-dir]
symbol-name: Full symbol name (e.g.,custom.logo,brand.icon.fill).svg-path: Path to the source SVG file.assets-dir(optional): Path toAssets.xcassets/Symbols(defaults toAssets.xcassets/SymbolsorSFSYMBOL_ASSETS_DIR).
Template-based symbolset (recommended)
./scripts/generate-from-template.js <symbol-name> <svg-path> [template-svg] [assets-dir]
template-svg(optional): SF Symbols template SVG to inject into (defaults to the first.symbolsetSVG found inAssets.xcassets/Symbols, otherwise uses the bundled skill template).
Example
./scripts/generate-from-template.js pi.logo /Users/admin/Desktop/pi-logo.svg
Requirements
- SVG must include a
viewBox. - Use path-based shapes (paths are required; rects are supported and converted, but other shapes should be converted to paths).
- Prefer filled shapes (no strokes) to avoid thin artifacts.
Workflow
.symbolset inside the asset catalog Symbols folder.Contents.json.