Communitygithub.com

iOS 圖示產生器

從 SF Symbols(5000+ 個 Apple 原生圖示)或 Iconify API(275k+ 個來自 200+ 個收藏集的開源圖示)產生 iOS app 圖示,以 PNG imageset 格式輸出至 Xcode 素材目錄。適用於產生圖示、建立圖示資產、新增圖示至素材目錄,或為 iOS 專案搜尋圖示。

iOS 圖示產生器 是什麼?

iOS 圖示產生器是一個 AI 輔助技能,專為 iOS/macOS Xcode 專案設計,能從兩個主要來源產生 PNG 圖示 imageset:Apple 的 SF Symbols(5000+ 個系統圖示,離線可用)與 Iconify API(275k+ 個開源圖示,橫跨 200+ 個收藏集)。它支援搜尋、預覽、自訂顏色、尺寸與粗細,並直接輸出完整的 .imageset 目錄結構(含 1x、2x、3x PNG 與 Contents.json),與 Xcode 素材目錄完全相容。此技能會根據專案現有圖示的風格(尺寸、顏色、粗細)自動引導使用者選擇最合適的來源與參數,並提供反模式防護(如未檢查現有風格即產生、使用預設顏色、輸出錯誤尺寸等)。支援平台包括 Claude Code、Cursor 等能執行 shell 指令與 Swift 腳本的 AI 代理環境。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/ios-icon-gen

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

iOS 圖示產生器 是做什麼的?

從兩個來源為 Xcode 素材目錄產生 PNG 圖示 imageset。

何時啟用

  • 為 iOS/macOS Xcode 專案產生圖示資產
  • 跨開源收藏集搜尋圖示
  • 為素材目錄建立 PNG imageset(1x, 2x, 3x)
  • 將佔位符圖示替換為生產品質資產
  • 比對 Xcode 專案中現有圖示的風格

核心原則

1. 兩個來源,同一輸出格式

兩個來源皆產生完全相容 Xcode 的 imageset。根據需求選擇:

來源圖示數量需求條件最適合情境
Iconify API275,000+ 個,來自 200+ 收藏集需要網路連線廣泛選擇、特定風格、開源圖示
SF Symbols5,000+ 個 Apple 符號僅限 macOSApple 原生風格、離線使用

2. 始終比對現有風格

在產生之前,請檢查專案中現有圖示的尺寸、顏色與粗細一致性。

3. 輸出結構

兩種方法皆產生完整的 Xcode imageset:

<輸出目錄>/<資產名稱>.imageset/
  Contents.json
  <資產名稱>.png        # 1x(預設 68px)
  <資產名稱>@2x.png     # 2x(預設 136px)
  <資產名稱>@3x.png     # 3x(預設 204px)

範例

步驟 1:評估需求

確定圖示需求:圖示的用途、偏好的風格、目標顏色與尺寸。

如果專案已有圖示,請檢查現有風格:

# 檢查現有圖示的尺寸
sips -g pixelWidth -g pixelHeight path/to/[email protected]

步驟 2:搜尋圖示

Iconify API(推薦用於廣泛選擇):

# 搜尋所有收藏集
$SKILL_DIR/scripts/iconify_gen.sh search "收據"

# 在特定收藏集內搜尋
$SKILL_DIR/scripts/iconify_gen.sh search "名片" --prefix mdi

# 列出可用收藏集
$SKILL_DIR/scripts/iconify_gen.sh collections

SF Symbols(適用於 Apple 原生風格): 瀏覽 SF Symbols app 或參考常見名稱:

使用情境符號名稱
文件doc.text, doc.fill
收據doc.text.below.ecg, receipt
人物person.crop.rectangle, person.text.rectangle
相機camera, camera.fill
掃描doc.viewfinder, qrcode.viewfinder
設定gearshape, slider.horizontal.3

步驟 3:預覽(可選)

# Iconify 預覽
$SKILL_DIR/scripts/iconify_gen.sh preview mdi:receipt-text-outline

步驟 4:產生

Iconify API:

# 基本產生
$SKILL_DIR/scripts/iconify_gen.sh mdi:receipt-text-outline editTool_expenseReport

# 自訂顏色與輸出位置
$SKILL_DIR/scripts/iconify_gen.sh mdi:receipt-text-outline myIcon --color 007AFF --output ./Assets.xcassets/icons

選項:--size <點數>(預設:68)、--color <十六進位色碼>(預設:8E8E93)、--output <目錄>(預設:/tmp/icons)

SF Symbols:

# 基本產生
swift $SKILL_DIR/scripts/generate_icons.swift doc.text.below.ecg editTool_expenseReport

# 自訂顏色、粗細與輸出
swift $SKILL_DIR/scripts/generate_icons.swift person.crop.rectangle myIcon --color 007AFF --weight regular --output ./Assets.xcassets/icons

選項:--size <點數>(預設:68)、--color <十六進位色碼>(預設:8E8E93)、--weight <名稱>(預設:thin)、--output <目錄>(預設:/tmp/icons)

步驟 5:驗證與整合

  1. 讀取產生的 @2x PNG 以視覺驗證
  2. 若未直接輸出至素材目錄,請手動複製:
    cp -r /tmp/icons/<名稱>.imageset path/to/Assets.xcassets/<群組>/
    
  3. 建置專案以確認 Xcode 能識別新的資產

常見 Iconify 收藏集

前綴名稱數量風格
mdiMaterial Design Icons7400+填滿 + 線條變體
phPhosphor9000+每個圖示有 6 種粗細
solarSolar7400+粗體、線性、外框
tablerTabler Icons6000+一致的筆劃寬度
lucideLucide1700+乾淨、極簡
riRemix Icon3100+填滿 + 線條變體
carbonCarbon2400+IBM 設計語言
heroiconsHeroIcons1200+Tailwind CSS 配套

瀏覽所有:https://icon-sets.iconify.design/

腳本參考

腳本來源路徑
iconify_gen.shIconify API(275k+ 圖示)$SKILL_DIR/scripts/iconify_gen.sh
generate_icons.swiftSF Symbols(5k+ 圖示)$SKILL_DIR/scripts/generate_icons.swift

最佳實踐

  • 先搜尋再產生 — 瀏覽可用圖示以找到最佳匹配
  • 比對現有專案風格 — 在產生新圖示前檢查現有圖示的尺寸、顏色與粗細
  • 使用 Iconify 以獲得多樣性 — 200+ 收藏集讓你能找到所需的確切風格
  • 使用 SF Symbols 以保持 Apple 一致性 — 它們與系統 UI 完美匹配
  • 直接產生到素材目錄 — 使用 --output ./Assets.xcassets/icons 跳過手動複製
  • 視覺驗證 — 在提交前務必預覽 @2x PNG

反模式

  • 在未檢查現有專案圖示風格的情況下產生圖示
  • 當專案有定義的調色盤時仍使用預設顏色
  • 以錯誤尺寸產生圖示(先檢查現有圖示)
  • 未經視覺驗證即提交產生的圖示

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

相關技能