agentleFS
agentsdanceagentsdance/agentskills/skills/icon-system-builder/SKILL.md

icon-system-builder

Skill3 starsChanged 11 months agoApache-2.0View on GitHub

Set up icon systems for applications. Use when the user needs to add icons, create icon components, or implement icon libraries.

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Icon System Builder

Implement scalable icon systems in applications.

React Icon Components

SVG Component Pattern

interface IconProps {
  size?: number;
  color?: string;
  className?: string;
}

export function ChevronIcon({ size = 24, color = 'currentColor', className }: IconProps) {
  return (
    <svg
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill="none"
      stroke={color}
      strokeWidth="2"
      strokeLinecap="round"
      strokeLinejoin="round"
      className={className}
    >
      <polyline points="9 18 15 12 9 6" />
    </svg>
  );
}

// Usage
<ChevronIcon size={20} color="#3b82f6" />
<ChevronIcon className="w-5 h-5 text-blue-500" />

Icon Sprite System

// icons.svg (sprite file)
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
  <symbol id="icon-home" viewBox="0 0 24 24">
    <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
  </symbol>
  <symbol id="icon-user" viewBox="0 0 24 24">
    <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/>
    <circle cx="12" cy="7" r="4"/>
  </symbol>
</svg>

// Icon component
function Icon({ name, size = 24, className }) {
  return (
    <svg width={size} height={size} className={className}>
      <use href={`#icon-${name}`} />
    </svg>
  );
}

// Usage
<Icon name="home" size={20} className="text-gray-600" />

Lucide React

npm install lucide-react
import { Home, User, Settings, ChevronRight } from 'lucide-react';

// Usage
<Home size={24} color="#3b82f6" />
<User className="w-6 h-6 text-gray-600" />
<Settings strokeWidth={1.5} />

Heroicons

npm install @heroicons/react
import { HomeIcon, UserIcon } from '@heroicons/react/24/outline';
import { HomeIcon as HomeIconSolid } from '@heroicons/react/24/solid';

<HomeIcon className="h-6 w-6 text-blue-500" />
<HomeIconSolid className="h-6 w-6 text-blue-500" />

Font Awesome

npm install @fortawesome/fontawesome-svg-core @fortawesome/free-solid-svg-icons @fortawesome/react-fontawesome
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faHome, faUser } from '@fortawesome/free-solid-svg-icons';

<FontAwesomeIcon icon={faHome} size="lg" color="#3b82f6" />

Icon Button Component

interface IconButtonProps {
  icon: React.ReactNode;
  label: string;
  onClick?: () => void;
  variant?: 'default' | 'ghost';
}

function IconButton({ icon, label, onClick, variant = 'default' }: IconButtonProps) {
  const baseClasses = "p-2 rounded-lg transition-colors";
  const variantClasses = {
    default: "bg-gray-100 hover:bg-gray-200",
    ghost: "hover:bg-gray-100",
  };

  return (
    <button
      onClick={onClick}
      className={`${baseClasses} ${variantClasses[variant]}`}
      aria-label={label}
    >
      {icon}
    </button>
  );
}

// Usage
<IconButton
  icon={<Settings className="w-5 h-5" />}
  label="Settings"
  onClick={() => openSettings()}
/>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.