Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
forcedotcom avatar

Icons Src

  • 2 installs
  • 1k repo stars
  • Updated August 4, 2026
  • forcedotcom/salesforcedx-vscode

Adds custom SVG icons to the salesforcedx-vscode-services package for font generation in a VS Code extension.

About

Documents the SVG requirements, manifest entries, and build steps for adding font-based custom icons to a VS Code extension. A developer uses it when creating or adding new theme-aware icons to media/icons-src.

  • SVG rules: 24x24 viewBox, currentColor fill for theme support
  • Build workflow via icons.json manifest and npm run build:icons

Icons Src by the numbers

  • 2 all-time installs (skills.sh)
  • Ranked #1,564 of 1,880 Design & UI/UX skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/forcedotcom/salesforcedx-vscode --skill icons-src

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs2
repo stars1k
Last updatedAugust 4, 2026
Repositoryforcedotcom/salesforcedx-vscode

What it does

Adds custom SVG icons to the salesforcedx-vscode-services package for font generation in a VS Code extension.

Files

SKILL.mdMarkdownGitHub ↗

Icons-src: Adding Custom Font Icons

Location

packages/salesforcedx-vscode-services/media/icons-src/

SVG Requirements

  • viewBox: 0 0 24 24 only (enables better upscaling)
  • xmlns: http://www.w3.org/2000/svg
  • fill: currentColor on inner <g> so VS Code themes control color
  • structure: wrap paths in <g fill="currentColor" transform="scale(X)"> — adjust scale so glyph fits 24×24

External sources (Wikipedia, Illustrator, etc.) may be too complex for font generation. Simplify in vector editor or substitute alternative.

Reference (leaf.svg)

<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
  <g fill="currentColor" transform="scale(0.75)">
    <path d="..."></path>
  </g>
</svg>

Avoid

  • Hardcoded fill colors (e.g. fill="#000") — breaks theme support
  • viewBox other than 24×24
  • Strokes without stroke="currentColor" if used

Workflow

1. Add SVGmedia/icons-src/<name>.svg (name = lowercase, no spaces) 2. Add manifest entrymedia/icons-src/icons.json:

   "<name>": { "id": "sf-org-<id>", "description": "..." }

3. Run buildnpm run build:icons -w salesforcedx-vscode-services (updates contributes.icons in package.json) 4. Add ICONS constantsrc/vscode/mediaService.ts and ICON_DESCRIPTION_KEYS; add i18n key in messages if needed 5. Regenerate types — if services-types consumes ICONS, run its generate script

icons.json Format

{
  "leaf": { "id": "sf-org-leaf", "description": "Leaf icon for default scratch org" },
  "tree": { "id": "sf-org-tree", "description": "Tree icon for default dev hub" }
}
  • Append new icons (order affects 0xe001, 0xe002, … code point assignments)
  • Key = SVG filename without .svg
  • id = VS Code icon ID (use sf-org-* for custom icons)
  • description = human-readable, used in contributes.icons

Artifacts that change (add/remove)

ArtifactAddRemove
media/icons-src/<name>.svgcreatedelete
media/icons-src/icons.jsonadd entryremove entry
package.jsoncontributes.iconsauto (build:icons)auto
resources/icons-font/*auto (build:icons)auto
src/vscode/mediaService.tsICONS, ICON_DESCRIPTION_KEYSmanualmanual
src/messages/* (i18n)manual if neededmanual
salesforcedx-vscode-services-types (icons.ts)manual (generate script)manual

Verification

Run npm run test -w salesforcedx-vscode-servicesiconConsistency.test.ts validates SVG ↔ icons.json ↔ contributes.icons ↔ ICONS constant.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.