source-command-icon-migrate
БесплатноБез исполняемых скриптовНе проверенMigrated source command `icon-migrate`
от databayt★ 19 звёзд на GitHubОб этом скилле
source-command-icon-migrate
Use this skill when the user asks to run the migrated source command icon-migrate.
Command Template
/icon-migrate - Migrate Lucide Imports to Unified System
You are tasked with migrating direct lucide-react imports to the unified icon system.
Problem Statement
Current state:
- 22% of files use unified system (
import { Icons } from "@/components/icons") - 801 direct lucide-react imports across the codebase
- Goal: 100% unified system adoption, 0 direct imports
Migration Modes
| Mode | Command | Description |
|---|---|---|
| Single File | /icon-migrate <file> |
Migrate one file |
| Batch | /icon-migrate batch |
Migrate 10 files at a time |
| All | /icon-migrate all |
Migrate all files (with confirmation) |
| Report | /icon-migrate report |
Show migration status without changes |
Workflow
Step 1: Find Lucide Imports
# Find all files with lucide-react imports
grep -r "from \"lucide-react\"" src/ --include="*.tsx" --include="*.ts"
grep -r "from 'lucide-react'" src/ --include="*.tsx" --include="*.ts"
Step 2: Analyze Imports
For each file, extract:
- File path
- Imported icon names
- Usage locations
Example:
// Before
import { AlertCircle, ChevronDown, RefreshCw } from "lucide-react"
// Icons used:
// - AlertCircle (line 24, 45)
// - RefreshCw (line 52)
// - ChevronDown (line 78, 89, 102)
Step 3: Check Icon Availability
For each imported icon, check if it exists in unified system:
| Lucide Icon | Unified System | Status |
|---|---|---|
| AlertCircle | Icons.alertCircle | ✅ Available |
| RefreshCw | Icons.refresh | ✅ Available |
| ChevronDown | Icons.chevronDown | ❌ Need to add |
Step 4: Add Missing Icons
If icon doesn't exist in unified system:
- Copy SVG from lucide-react
- Add to
src/components/icons.tsxor category file - Export from
src/components/icons/index.tsx - Register in
src/components/icons/registry.ts
// Add to icons.tsx
chevronDown: (props: IconProps) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" {...props}>
<path
fill="none"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="m6 9 6 6 6-6"
/>
</svg>
),
Step 5: Update Import Statement
Replace lucide-react import with unified system:
// Before
import { AlertCircle, ChevronDown, RefreshCw } from "lucide-react"
// After
import { Icons } from "@/components/icons"
Step 6: Update Usage
Replace all icon usages:
// Before
<AlertCircle className="h-4 w-4" />
<RefreshCw className="h-5 w-5 animate-spin" />
// After
<Icons.alertCircle className="size-4" />
<Icons.refresh className="size-5 animate-spin" />
Step 7: Verify
After migration:
- Run TypeScript check:
pnpm tsc --noEmit - Check for any remaining imports:
grep "lucide-react" <file> - Test UI to ensure icons render correctly
Priority Files
Migrate these high-impact files first:
Error Boundaries (45 files)
src/**/error.tsx
src/**/not-found.tsx
Common pattern:
// Before
import { AlertCircle, RefreshCw } from "lucide-react"
// After
import { Icons } from "@/components/icons"
Form Components (26 files)
src/components/**/form.tsx
src/components/**/form-field.tsx
Theme Toggle
src/components/theme-toggle.tsx
Pattern:
// Before
import { MoonIcon, SunIcon } from "lucide-react"
// After
import { Icons } from "@/components/icons"
Icon Name Mapping
| Lucide | Unified System |
|---|---|
| AlertCircle | alertCircle |
| RefreshCw | refresh |
| ArrowLeft | arrowLeft |
| ArrowRight | arrowRight |
| ChevronDown | chevronDown |
| ChevronUp | chevronUp |
| ChevronLeft | chevronLeft |
| ChevronRight | chevronRight |
| MoonIcon | moon |
| SunIcon | sun |
| Calendar | calendar |
| Search | search |
| FileText | fileText |
| Upload | upload |
| Download | download |
| Check | check |
| X | x |
| Plus | plus |
| Minus | minus |
| MoreHorizontal | moreHorizontal |
| MoreVertical | moreVertical |
| Settings | settings |
| User | user |
| Users | users |
| Phone | phone |
| Eye | eye |
| EyeOff | eyeOff |
| Lock | lock |
| Unlock | unlock |
Установить source-command-icon-migrate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл source-command-icon-migrate?
Migrated source command `icon-migrate`
Как установить скилл source-command-icon-migrate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл source-command-icon-migrate запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic