Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

source-command-icon-audit

БесплатноБез исполняемых скриптовНе проверен

Migrated source command `icon-audit`

databaytот databayt★ 19 звёзд на GitHub

Об этом скилле

source-command-icon-audit

Use this skill when the user asks to run the migrated source command icon-audit.

Command Template

/icon-audit - Audit Icon Usage Across Codebase

You are tasked with auditing icon usage across the Hogwarts codebase to measure adoption of the unified icon system and identify migration opportunities.

Metrics to Track

Metric Target Description
Unified system adoption 100% Files using import { Icons } from "@/components/icons"
Direct lucide imports 0 Files using import { X } from "lucide-react"
Registry completion 100% All Icons namespace entries in registry.ts
Hardcoded SVGs 0 Inline SVG elements in components
Theme compliance 100% Icons using currentColor
Accessibility 100% Icons with proper ARIA attributes

Audit Workflow

Step 1: Count Unified System Usage

# Find files importing from unified system
grep -r "from \"@/components/icons\"" src/ --include="*.tsx" --include="*.ts" -l | wc -l

# Find specific import patterns
grep -r "import { Icons }" src/ --include="*.tsx" --include="*.ts" -l | wc -l

Step 2: Count Direct Lucide Imports

# Find files with direct lucide-react imports
grep -r "from \"lucide-react\"" src/ --include="*.tsx" --include="*.ts" -l | wc -l
grep -r "from 'lucide-react'" src/ --include="*.tsx" --include="*.ts" -l | wc -l

# Count total import statements (not just files)
grep -r "from \"lucide-react\"" src/ --include="*.tsx" --include="*.ts" | wc -l

Step 3: Find Hardcoded SVGs

# Find inline SVG elements
grep -r "<svg" src/components --include="*.tsx" | grep -v "icons" | wc -l
grep -r "<svg" src/app --include="*.tsx" | wc -l

Step 4: Check Registry Completion

  1. Count icons in Icons namespace
  2. Count entries in registry.ts
  3. Compare for gaps
// Get all icon keys from Icons namespace
const iconKeys = Object.keys(Icons)

// Get all registered icons
const registeredIds = iconRegistry.map((i) => i.id)

// Find unregistered icons
const unregistered = iconKeys.filter((key) => !registeredIds.includes(key))

Step 5: Verify Theme Compliance

# Find SVGs not using currentColor
grep -r "fill=\"#" src/components/icons --include="*.tsx" | grep -v "currentColor"
grep -r 'stroke="#' src/components/icons --include="*.tsx" | grep -v "currentColor"

Step 6: Check Accessibility

# Find icons without aria attributes
# (Inspect components that render icons without aria-hidden or aria-label)

Output Report

Generate comprehensive markdown report:

# Icon System Audit Report

**Date**: {date}
**Scope**: Full codebase

## Executive Summary

| Metric              | Current        | Target | Status        |
| ------------------- | -------------- | ------ | ------------- |
| Unified adoption    | 22% (36 files) | 100%   | 🔴 Needs work |
| Direct imports      | 801            | 0      | 🔴 Needs work |
| Registry completion | 2% (4/240)     | 100%   | 🔴 Needs work |
| Hardcoded SVGs      | 15             | 0      | 🟡 Some work  |
| Theme compliance    | 95%            | 100%   | 🟢 Good       |
| Accessibility       | 80%            | 100%   | 🟡 Some work  |

## Detailed Findings

### 1. Unified System Usage

**Files using unified system**: 36
**Files with direct imports**: 165

#### Top offenders (most lucide imports):

| File                                                | Import Count |
| --------------------------------------------------- | ------------ |
| src/components/platform/dashboard/quick-actions.tsx | 12           |
| src/components/site/navigation.tsx                  | 10           |
| src/components/ui/data-table.tsx                    | 8            |
| ...                                                 | ...          |

### 2. Direct Lucide Imports

**Total import statements**: 801

#### Most common icons imported directly:

| Icon         | Files | Recommended        |
| ------------ | ----- | ------------------ |
| ChevronDown  | 45    | Icons.chevronDown  |
| ChevronRight | 38    | Icons.chevronRight |
| AlertCircle  | 35    | Icons.alertCircle  |
| Check        | 32    | Icons.check        |
| X            | 30    | Icons.x            |
| ...          | ...   | ...                |

#### By component type:

| Type             | Files | Import Count |
| ---------------- | ----- | ------------ |
| Error boundaries | 45    | 90           |
| Form components  | 26    | 78           |
| Navigation       | 15    | 45           |
| Data tables      | 12    | 36           |
| Other            | 67    | 552          |

### 3. Registry Gaps

**Icons in namespace**: 86
Полный SKILL.md на GitHub

Установить source-command-icon-audit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл source-command-icon-audit?

Migrated source command `icon-audit`

Как установить скилл source-command-icon-audit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл source-command-icon-audit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить source-command-icon-audit с