/loxihart-design:purging-icon-slopfrom loxihart-design
Use whenever Kyle says icon slop, de-slop the icons, visual identity cleanup, icon inventory, icon audit, replace generic icons, custom SVG icons, typed icon registry, ban lucide, ban heroicons, no emoji icons, 'the UI looks like a default shadcn template', 'these icons are generic', 'make the icons ours', or hands over any app/template/skill library and wants generic AI-generated icons replaced with original domain SVGs — even if he never says 'icon' and just says the UI looks AI-generated or template-y. Also triggers on: no-restricted-imports icon rule, icon guardrails, icon policy, feature card emoji, sparkles/bolts/brains/shields cleanup, icon CI check.
Ships in loxihart-design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Replaces generic AI icon slop (emoji icons, Heroicons/Lucide/react-icons on product surfaces, sparkles/bolts/brains/shields/robots) with a typed, hand-authored domain icon system, then adds lint/CI/audit guardrails so the slop cannot return.
Inventory every icon → classify utility vs domain → build/reuse the typed
icon pack → str_replace the slop → wire guardrails where a package.json
actually exists → verify with audit script + tsc --strict + a rendered
24/32/48px sheet. Never trust your own SVG paths until you've screenshotted them.
What is the target?
├─ Nothing cloned / no folder connected → STOP. Ask which repo/folder.
│ "Here, skills and plugins" = the ~/.claude skill/template library.
├─ App repo (has package.json) → full treatment: icon pack in
│ src/components/icons/ + ESLint rule + package scripts + CI workflow
└─ Skill/template library (no package.json) → icon pack as skill asset,
audit script + SKILL.md policy gates; ESLint/CI land only in the
app SCAFFOLD scripts (e.g. web-artifacts-builder/init-artifact.sh)
Per icon found:
├─ close/search/menu/chevron/settings/upload/download/trash/
│ external-link/back/forward/copy/edit/spinner, sort arrows,
│ ✓/✕ status glyphs, semantic status dots → UTILITY: keep
├─ Emoji in an icon slot, or library icon on brand/hero/feature/
│ dashboard/empty-state/onboarding/marketing/AI-agent surface
│ → REPLACE with a domain SVG from the registry
└─ In a vendor-synced plugin or Anthropic core skill (pptx, synced/*)
→ DO NOT EDIT (resync reverts). Flag as remaining exception.
Where does the canonical pack live? (Kyle's ecosystem)
└─ executing-branded-frontends/templates/components/icons/
{custom-icons,utility-icons,icon-registry}.tsx + icon-policy.md
Audit: executing-branded-frontends/scripts/icon-audit.sh <dir>
Reuse and extend it — do not create a second pack.
Single-file artifact (no npm)?
└─ Inline the needed domain icons with a comment pointing at the
canonical pack. NEVER hand it a lucide import it can't resolve.
User: "Remove the icon slop from this app and lock it down"
→ Icon inventory table → classify → copy/extend canonical pack into
src/components/icons/ → replace non-utility usage → merge ESLint rule,
add icons:audit/lint/typecheck scripts + CI → run verification suite.
User: "These feature cards use emoji icons, make them ours" → Author one domain SVG per feature meaning (not per feature name), inline if single-file, register in the union, render-sheet check at 24/32/48.
User: "Make sure lucide never shows up in product surfaces again"
→ Guardrails only: ESLint no-restricted-imports (utility file exempted),
grep audit script, SKILL.md/anti-slop-audit gate items, CI workflow.
Three files. Closed union → unknown icon names fail at compile time.
// custom-icons.tsx — domain icons only, zero imports from icon libraries
import type { ReactNode, SVGProps } from "react";
export type IconProps = SVGProps<SVGSVGElement> & { title?: string };
function IconBase({ title, children, ...props }: IconProps & { children: ReactNode }) {
return (
<svg viewBox="0 0 48 48" width="1em" height="1em" fill="none"
stroke="currentColor" strokeWidth={3} strokeLinecap="round"
strokeLinejoin="round" role={title ? "img" : undefined}
aria-hidden={title ? undefined : true} {...props}>
{title ? <title>{title}</title> : null}
{children}
</svg>
);
}
// export function DomainThingIcon(props: IconProps) { return <IconBase {...props}>…paths…</IconBase> }
// icon-registry.tsx
export type IconName = "deploy-path" | "approval-gate" | /* … */ "close";
const registry = { /* every name → component */ } satisfies Record<IconName, ComponentType<IconProps>>;
export function AppIcon({ name, ...props }: IconProps & { name: IconName }) {
const Icon = registry[name];
return <Icon {...props} />;
}
Icon quality bar: original geometry tied to the actual domain meaning (e.g. HITL = gate posts + pause ticks + queued/released items; deployment = build layers rising to a live node), 2–4 meaningful details, no decorative noise, consistent stroke frame, legible at 24px. Emoji and library icons communicate nothing; the replacement must say what the feature does.
utility-icons.tsx is the ONLY file allowed to import lucide/heroicons in
npm apps — and only for: close, search, menu, chevron, settings, upload,
download, trash, external link, back/forward, copy, edit. In artifacts,
hand-author these too (zero-dep versions exist in the canonical pack).
ESLint (flat config) — merge WITHOUT overwriting the template config:
mv eslint.config.js eslint.config.base.js
# new eslint.config.js:
# import base from './eslint.config.base.js'
# export default [...[].concat(base), { files: [...], ignores:
# ['src/components/icons/utility-icons.tsx'], rules: { 'no-restricted-imports':
# ['error', { paths: [heroicons outline/solid, lucide-react, react-icons,
# bootstrap-icons], patterns: ['react-icons/*','@fortawesome/*','@heroicons/*'] }] } }]
[].concat(base) survives Vite template drift (tseslint.config() returns an array).
Grep audit (backstop for HTML + non-linted files): quote-anchored import
regex (from[[:space:]]*|require\()['\"](@heroicons/|lucide-react|react-icons|@fortawesome/|bootstrap-icons),
emoji-in-icon-slot regex, unsafe-SVG regex (dangerouslySetInnerHTML.*svg,
base64 svg). Exempt components/icons/utility-icons.tsx. Exit 1 on hits.
Canonical copy: executing-branded-frontends/scripts/icon-audit.sh.
Scripts + CI: icons:audit, lint, typecheck in package.json;
.github/workflows/icon-audit.yml runs all three. In skill-library mode,
gates go into SKILL.md sections and the anti-slop-audit checklist instead.
icon-audit.sh <every touched tree> → passestsc --strict --noEmit on the icon pack → passes<AppIcon name="sparkles" /> → MUST fail (TS2322)npx esbuild file.jsx --loader:.jsx=jsx --outfile=/dev/null on edited JSXrenderToStaticMarkup every registry icon at 24/32/48px →
HTML → playwright screenshot (/opt/pw-browsers/chromium) → LOOK at it.
Also screenshot one real consuming component in context.[⚡✨…] flagged ✓ because ✓ (E2 9C 93) shares bytes with
✨ (E2 9C A8). Fix: export LC_ALL=C.UTF-8 at the top of the audit script.(from\s*|require\()['"]lib, not import[^\n]*lib.a 0 0 0 0 0 0 0) read as plausible in code. Render + screenshot
before shipping; that's how it was caught.eslint.config.base.js and wrap. Overwriting breaks on template drift and
violates the merge-don't-overwrite rule.plugins/synced/* (auth0, wix, valtown…) or pptx are wasted.
Flag, don't patch.~/.claude/) and SendUserFile
as a restore point.name="sparkles" → TS2322 is the acceptance evidence.grep -v icon-audit).satisfies Record<IconName, ComponentType<IconProps>> + closed
union rejects unknown names at compile time — reproduced with TS2322 in the
source session (tsc 5.6, strict)./opt/pw-browsers/chromium + playwright-core renders
local HTML for icon sheets in the Cowork cloud container.[].concat(base) wrapper survives future Vite eslint template
changes — reasoned from tseslint.config() returning an array; not tested
against a live scaffold run.<svg> ad-hoc in
a component; the policy + audit checklist are the only guard there.! "Ban generic libraries" vs. installing lucide-react in every scaffolded app — resolved by confinement (utility file + ESLint exemption), not removal; removing the install entirely would be cleaner but breaks shadcn components that import lucide internally. ! "Never rebuild a file to deliver a change" vs. scaffold scripts that heredoc whole configs — scaffold-time file creation is authoring, not editing; the rule applies once a file exists outside the scaffold run.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub krosebrook/loxihart-skills --plugin loxihart-design19 skills in this plugin
/advanced-ux-patternsComprehensive UX best practices including accessibility (WCAG 2.2), interaction patterns, user research methods, and usability principles. Use when designing user interfaces, conducting UX audits, or implementing accessible, user-centered designs. Also triggers on WCAG, ARIA, keyboard navigation, screen reader, focus trap, focus management, touch targets, usability testing, heuristic evaluation, card sorting, tree testing, NPS, SUS, form design, navigation patterns, mobile UX, design handoff, cognitive load, information architecture, dark patterns, skeleton screen, error states, reduced motion, dark mode accessibility, component states, error recovery, or any request to audit, improve, spec, or review a user interface — even casually. If UI is involved, use this skill./advanced-visual-designAdvanced visual design techniques including typography systems, color theory, grid-based layouts, visual hierarchy, and composition principles. Use when creating high-quality visual designs, establishing design foundations, or implementing sophisticated design systems. Also triggers on type scale, font pairing, color palette, HSL color, 8-point grid, 12-column layout, visual hierarchy, whitespace, composition, rule of thirds, golden ratio, dark mode design, optical adjustments, or easing curves. Even if someone says "make this look professional" or "set up my design foundations" — use this skill.