← 返回 Skills 市场
wikipediabrown

SFSymbolsKit

作者 WikipediaBrown · GitHub ↗ · v1.0.0 · MIT-0
darwinlinuxwin32 ⚠ pending
85
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install sfsymbolskit
功能描述
Use when generating, validating, or fixing Apple SFSymbol names in Swift, SwiftUI, UIKit, or AppKit. Grounds symbol usage against the real catalog (SFSymbols...
使用说明 (SKILL.md)

SFSymbolsKit — grounded SFSymbols for Swift

Apple's SFSymbol APIs (Image(systemName:), UIImage(systemName:), NSImage(systemSymbolName:)) take a String. A wrong name compiles and ships a blank icon — there is no compiler or runtime error. Models routinely emit plausible but non-existent names. This skill makes you ground every SFSymbol against the real catalog.

Hard rule

Never emit a raw guessed systemName: / systemSymbolName: string. Every SFSymbol you produce must be verified against the bundled manifest first.

The catalog

{baseDir}/symbols.json is the authoritative manifest: an object with count, sfsymbolsVersion, and symbols: [{ "name", "property" }], generated from SFSymbolsKit's source (the same data as \x3Chttps://sfsymbolskit.com/symbols.json>). name is the dotted system name (square.and.arrow.up); property is the typed SFSymbolsKit accessor (squareAndArrowUp).

Procedure

  1. Load {baseDir}/symbols.json.
  2. Resolve the symbol the user wants:
    • Exact: match their input against name (dotted) or property (camelCase), case-insensitively, ignoring ./-/_/space.
    • Search: if they describe it ("trash", "arrow up"), filter symbols whose name/property contains the normalized query; prefer prefix matches; offer the top candidates.
  3. If the requested name is not in symbols, it is not a real SFSymbol. Do not invent or "fix" it by guessing — choose the closest real entry from the manifest and say so.
  4. Emit the typed SFSymbolsKit accessors for the resolved property:
    • SwiftUI: Image(systemName: String.SFSymbols.\x3Cproperty>)
    • UIKit: UIImage.SFSymbols.\x3Cproperty>
    • AppKit: NSImage.SFSymbols.\x3Cproperty>
    • Enum: SFSymbol.\x3Cproperty> (.allCases is CaseIterable)
  5. If the project doesn't depend on SFSymbolsKit yet, add it: .package(url: "https://github.com/WikipediaBrown/SFSymbolsKit.git", from: "1.0.0") then import SFSymbolsKit.

Name transform (for reasoning, not for guessing)

Dotted → camelCase: drop the dots, camel-case each segment (square.and.arrow.upsquareAndArrowUp, gearshape.fillgearshapeFill). Leading digits and Swift keywords are special-cased in the catalog — always trust symbols.json's property, never a transform you computed, when they could differ.

If a SFSymbolsKit MCP server is available

Prefer its tools over manual lookup: resolve_sf_symbol (validate a candidate; returns the canonical accessors or valid:false + suggestions), search_sf_symbols, sf_symbol_usage. Fall back to {baseDir}/symbols.json when the MCP server is not connected.

Why

This converts the one error class you cannot self-correct (a stringly-typed symbol that compiles but renders nothing) into a verified, typed reference. Source & docs: \x3Chttps://sfsymbolskit.com>.

能力标签
cryptorequires-walletrequires-sensitive-credentials
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install sfsymbolskit
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /sfsymbolskit 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release — grounded SFSymbols for Swift/SwiftUI/UIKit/AppKit (SFSymbols 7.2, 7,007 symbols). Resolves names against the bundled catalog and emits typed accessors instead of stringly-typed systemName: values.
元数据
Slug sfsymbolskit
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

SFSymbolsKit 是什么?

Use when generating, validating, or fixing Apple SFSymbol names in Swift, SwiftUI, UIKit, or AppKit. Grounds symbol usage against the real catalog (SFSymbols... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 85 次。

如何安装 SFSymbolsKit?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install sfsymbolskit」即可一键安装,无需额外配置。

SFSymbolsKit 是免费的吗?

是的,SFSymbolsKit 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

SFSymbolsKit 支持哪些平台?

SFSymbolsKit 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin, linux, win32)。

谁开发了 SFSymbolsKit?

由 WikipediaBrown(@wikipediabrown)开发并维护,当前版本 v1.0.0。

💬 留言讨论