# Better Icons

Use when working with icons in any project.

- Repository: https://github.com/dtsola/xiaoyaosearch (1026 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-10-02
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add dtsola/xiaoyaosearch --skill better-icons -g -a claude-code -y`
Codex: `npx skills add dtsola/xiaoyaosearch --skill better-icons -g -a codex -y`
Cursor: `npx skills add dtsola/xiaoyaosearch --skill better-icons -g -a cursor -y`
Gemini CLI: `npx skills add dtsola/xiaoyaosearch --skill better-icons -g -a gemini-cli -y`

## Description

Use when working with icons in any project. Provides CLI for searching 200+ icon libraries (Iconify) and retrieving SVGs. Commands: `better-icons search <query>` to find icons, `better-icons get <id>` to get SVG. Also available as MCP server for AI agents.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Better Icons

Search and retrieve icons from 200+ libraries via Iconify.

## Installation

Before using any `better-icons` commands, ensure the tool is available in the environment.

**Option 1, Install globally (recommended, matches all examples below):**

```bash
# Using npm
npm install -g better-icons

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

**Option 2, Run without installing (prefix every command with `npx` or `bunx`):**

```bash
# 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
```

> **For AI agents:** Prefer the global install so that `better-icons` is on `$PATH` and the commands below work as-is. Run the install step once during environment setup, then use the commands without `npx`/`bunx`.

## CLI

```bash
# 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]
```

## Examples

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

## Icon ID Format

`prefix:name` - e.g., `lucide:home`, `mdi:arrow-right`, `heroicons:check`

## Popular Collections

`lucide`, `mdi`, `heroicons`, `tabler`, `ph`, `ri`, `solar`, `iconamoon`

---

## MCP Tools (for AI agents)

The rest: https://github.com/dtsola/xiaoyaosearch/blob/HEAD/.claude/skills/better-icons/SKILL.md
