Skip to content
Back to skills

Sfsymbol Generator

ASecurity

Generate an Xcode SF Symbol asset catalog .symbolset from an SVG. Use when you need to add a custom SF Symbol (build-time) by creating the symbolset folder, Contents.json, and SVG file.

  • 651 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 10, 2026
toolsgobash

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add sundial-org/awesome-openclaw-skills --skill sfsymbol-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sfsymbol Generator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sfsymbol Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sundial-org-sfsymbol-generator/badge)](https://www.skillsdirectory.com/skills/sundial-org-sfsymbol-generator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sfsymbol-generator
description: Generate an Xcode SF Symbol asset catalog .symbolset from an SVG. Use when you need to add a custom SF Symbol (build-time) by creating the symbolset folder, Contents.json, and SVG file.
---

# SF Symbol Generator

## Usage

You can override the default asset catalog location with `SFSYMBOL_ASSETS_DIR`.

### Raw symbolset (no template injection)

```bash
./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 to `Assets.xcassets/Symbols` (defaults to `Assets.xcassets/Symbols` or `SFSYMBOL_ASSETS_DIR`).

### Template-based symbolset (recommended)

```bash
./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 `.symbolset` SVG found in `Assets.xcassets/Symbols`, otherwise uses the bundled skill template).

## Example

```bash
./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

1. Validates the SVG path and viewBox.
2. Computes path bounds and centers within the SF Symbols template margins.
3. Injects the paths into the SF Symbols template (Ultralight/Regular/Black).
4. Creates `<symbol-name>.symbolset` inside the asset catalog Symbols folder.
5. Writes a matching `Contents.json`.

Files in this skill

  • SKILL.md1.7 KB
  • assets/template.svg21.3 KB
  • scripts/generate-from-template.js14.3 KB
  • scripts/generate.sh735 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…