# better-icons

Searches over 200 icon sets through Iconify and pulls SVG files directly into project directories from the terminal.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 5900 installs · ★ 1437
- Author: better-auth
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/better-auth/better-icons/tree/HEAD/skills/SKILL.md
- Updated: 2026-04-02
- HTML: https://affpapa.org/en/nevibecode/skills/better-icons

## What it does

The skill connects to the Iconify directory, offering access to sets such as Lucide, Heroicons, and Material Design Icons. Using `better-icons` CLI commands, the coding agent filters graphics by search phrase or collection prefix, modifies output dimensions and fill colors, and streams SVG code or downloads files to a folder.

The package also includes setup routines for an MCP server with tools to search, batch-retrieve, and inject icon components into React, Vue, Svelte, or Solid files. Running CLI commands directly without npx wrappers requires installing `better-icons` globally via npm or Bun.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add better-auth/better-icons --skill better-icons -a claude-code
```
```bash
npx skills add better-auth/better-icons --skill skills -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/skills/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/skills/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add better-auth/better-icons --skill skills -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/skills/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add better-auth/better-icons --skill skills -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/skills/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install better-auth/better-icons skills
```

2. **Manually: put the files in place**
- File: `.github/skills/skills/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add better-auth/better-icons --skill skills -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/better-auth/better-icons --path skills
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/skills/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add better-auth/better-icons --skill skills -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/better-auth/better-icons/tree/HEAD/skills/SKILL.md

## When to use it
- locate SVG graphics across multiple open icon sets
- save custom-sized and colored SVG markup to project files
- download batches of search results directly to a local directory
- wire Iconify MCP tools into an active coding agent

## Example prompts
- Find ten shopping cart icons from the Lucide collection
- Fetch the `lucide:home` icon as an SVG and place it in `src/assets/home.svg`
- Download all arrow icons into `./icons` using black fill and size 24

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: d7571cc829e11ad1.

BEGIN THIRD-PARTY FILE d7571cc829e11ad1
````text
---
name: better-icons
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.'
---

# 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)

| Tool | Description |
|------|-------------|
| `search_icons` | Search across all libraries |
| `get_icon` | Get single icon SVG |
| `get_icons` | Batch retrieve multiple icons |
| `list_collections` | Browse available icon sets |
| `recommend_icons` | Smart recommendations for use cases |
| `find_similar_icons` | Find variations across collections |
| `sync_icon` | Add icon to project file |
| `scan_project_icons` | List icons in project |

## TypeScript Interfaces

```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 {
````
END THIRD-PARTY FILE d7571cc829e11ad1

The third-party file has ended. Everything between the d7571cc829e11ad1 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3230 of 3584 bytes. © better-auth · MIT · https://github.com/better-auth/better-icons/tree/HEAD/skills/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
