mcpField
B
better-icons

better-icons

github.com/mxyhiデザイン・UI509129 回インストール2 日前に更新
リポジトリ

better-icons について

better-iconsは、Iconify経由で200以上のライブラリからアイコンを検索・取得するCLIおよびMCP対応スキルです。SVGの単体・一括取得に対応し、ファイルへの保存やプロジェクト内のアイコン確認もできます。

主な機能

  1. 01Iconifyのアイコンライブラリ検索
  2. 02SVGの単体・複数取得
  3. 03検索結果のファイル保存
  4. 04アイコンコレクションの閲覧
  5. 05プロジェクトのアイコン検出と同期

活用シーン

  1. 01インターフェース用のアイコン検索
  2. 02選んだアイコンをSVGで保存
  3. 03複数アイコンをまとめて取得
  4. 04プロジェクトで使われるアイコンの確認

MCP 対応

アイコンの検索、取得、推薦、類似アイコンの比較、コレクションの閲覧、プロジェクト内アイコンの検出と同期を行うMCPツールを提供します。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/mxyhi/ok-skills --skill better-icons

インストール後、Claude Code で/better-iconsを入力して読み込まれたか確認します。

詳細

Better Icons

Iconify 経由で 200 以上のライブラリからアイコンを検索、取得できます。

インストール

better-icons コマンドを使用する前に、環境でツールが利用可能であることを確認してください。

オプション 1 — グローバルにインストールする(推奨。以下のすべての例と同じ方法です):

# Using npm
npm install -g better-icons

# Using Bun (faster)
bun add -g better-icons

オプション 2 — インストールせずに実行する(各コマンドの先頭に npx または bunx を付けます):

# Using npx (npm)
npx better-icons search arrow --limit 10
npx better-icons get lucide:home > icon.svg

# Using bunx (Bun — faster)
bunx better-icons search arrow --limit 10
bunx better-icons get lucide:home > icon.svg

AI エージェント向け: better-icons が $PATH に含まれ、以下のコマンドをそのまま実行できるように、グローバルインストールを推奨します。環境のセットアップ時に一度インストールし、その後は npx/bunx を付けずにコマンドを使用してください。

CLI

# Search icons
better-icons search <query> [--prefix <prefix>] [--limit <n>] [--json]

# Search and download all found icons as SVG files
better-icons search <query> -d [dir] [--color <color>] [--size <px>]

# Get icon SVG (outputs to stdout)
better-icons get <icon-id> [--color <color>] [--size <px>] [--json]

# Setup MCP server for AI agents
better-icons setup [-a cursor,claude-code] [-s global|project]

例

better-icons search arrow --limit 10
better-icons search home --json | jq '.icons[0]'
better-icons get lucide:home > icon.svg
better-icons get mdi:home --color '#333' --json

# Batch download all search results
better-icons search arrow -d              # saves to ./icons/
better-icons search check -d ./my-icons   # saves to ./my-icons/
better-icons search star -d -c '#000' -s 24 --limit 64

アイコン ID の形式

prefix:name - 例:lucide:home、mdi:arrow-right、heroicons:check

人気のコレクション

lucide、mdi、heroicons、tabler、ph、ri、solar、iconamoon


MCP ツール(AI エージェント向け)

ツール説明
search_iconsすべてのライブラリを対象に検索します
get_icon単一のアイコン SVG を取得します
get_icons複数のアイコンを一括取得します
list_collections利用可能なアイコンセットを閲覧します
recommend_icons用途に応じてスマートにおすすめを提示します
find_similar_iconsコレクション間でバリエーションを検索します
sync_iconアイコンをプロジェクトファイルに追加します
scan_project_iconsプロジェクト内のアイコンを一覧表示します

TypeScript インターフェース

interface SearchIcons {
  query: string
  limit?: number        // 1-999, default 32
  prefix?: string       // e.g., 'mdi', 'lucide'
  category?: string     // e.g., 'General', 'Emoji'
}

interface GetIcon {
  icon_id: string       // 'prefix:name' format
  color?: string        // e.g., '#ff0000', 'currentColor'
  size?: number         // pixels
}

interface GetIcons {
  icon_ids: string[]    // max 20
  color?: string
  size?: number
}

interface RecommendIcons {
  use_case: string      // e.g., 'navigation menu'
  style?: 'solid' | 'outline' | 'any'
  limit?: number        // default 10
}

interface SyncIcon {
  icons_file: string    // absolute path
  framework: 'react' | 'vue' | 'svelte' | 'solid' | 'svg'
  icon_id: string
  component_name?: string
}

API

すべてのアイコンは https://api.iconify.design から取得します。

コメント