ui4
БесплатноБез исполняемых скриптовНе проверенManually invoked skill for reskinning Payload UI components. Requires Figma URL. Usage: /ui4
от payloadcms★ 46 079 звёзд на GitHubОб этом скилле
Payload UI Reskin (ui4)
Figma URL is REQUIRED. If not provided, ask before proceeding.
Process
Step 0: Icon Scan
Goal: Identify icon dependencies before starting work.
Scan component files for icon imports:
grep -E "from.*icons|import.*Icon" packages/ui/src/elements/ComponentName/List existing icons in
packages/ui/src/icons/:- Each icon has its own folder with
index.tsx+index.css
- Each icon has its own folder with
Compare Figma design to available icons:
- Does the design use icons not currently in the component?
- Does the design use icons that don't exist yet?
Document findings:
- Existing & used: No action needed
- Existing but not imported: Will need to add import
- Missing from codebase: Flag for user — need to source/create icon
Figma Icons Source:
When updating or creating icons, reference the Figma icon library at:
~/figma/figma/fpl/icons/src/icons/
Icon naming convention: icon-{size}-{name}.tsx (e.g., icon-16-close.tsx, icon-24-chevron-down.tsx)
To find the correct icon:
- Note the icon name from Figma design (e.g., "close", "chevron-down")
- Check both 16px and 24px variants if they exist
- Read the corresponding files and extract the SVG paths for each size
Icon implementation rules:
Props: Icon components MUST accept these props (keep existing props when updating):
type IconProps = { readonly className?: string readonly size?: 16 | 24 // Add more sizes as needed // ... keep any existing component-specific props }Multi-size support: Store path data keyed by size:
const paths = { 16: 'M4.854 4.146...', // from icon-16-{name}.tsx 24: 'M6.854 6.146...', // from icon-24-{name}.tsx }SVG rendering: Use the size prop to select path and viewBox:
<svg width={size} height={size} viewBox={`0 0 ${size} ${size}`} fill="none"> <path d={paths[size]} fill="currentColor" /> </svg>Payload conventions:
- Use
fill="currentColor"instead offill="var(--color-icon)" - Use
fillRuleandclipRule(React camelCase) instead of kebab-case - Default size should match most common usage (typically 24)
- Use
Reference implementation: See
packages/ui/src/icons/Chevron/index.tsxfor the pattern.
If icons are missing from Figma source: Ask user how to proceed before continuing.
Step 1: SCSS → CSS Migration
Goal: Syntax conversion only. Component must look IDENTICAL after.
- Read component files:
packages/ui/src/elements/ComponentName/orpackages/ui/src/fields/ComponentName/ - Create
index.csswith converted styles:$var→var(--token)- Keep CSS nesting with
&(preferred) - Remove
@use/@import(tokens are global) - Inline any mixins
- Update import:
import './index.scss'→import './index.css' - Delete
index.scss - Wrap in
@layer payload-default {} - Convert legacy
var(--base)to--spacertokens (see below) - Check for SCSS-only variables (see below)
SCSS Variable Dependencies
CRITICAL: The packages/ui/src/scss/ folder has been removed. All global tokens now live in packages/ui/src/css/. Any CSS variable you use must exist there.
Before using a variable, verify it exists in the CSS folder:
grep -r "variable-name" packages/ui/src/css/
If a variable is only in SCSS:
- Check if there's an equivalent in the CSS folder
- If not, add it to the appropriate CSS file:
spacing.css— spacers, gutters, layout spacing, breakpointscolors.css— color tokenstypography.css— font tokensradius.css— border-radius tokensutilities.css— accessibility, misc utilities
Common SCSS-only variables to watch for:
| SCSS Variable | CSS Equivalent / Action |
|---|---|
--spacing-view-bottom |
Defined in spacing.css |
--breakpoint-m-width |
Defined in spacing.css (1024px) |
--breakpoint-s-width |
Defined in spacing.css (768px) |
--gutter-h |
Defined in spacing.css |
$breakpoint-m-width |
Use var(--breakpoint-m-width) in media queries |
@include mid-break |
Use @media (max-width: 1024px) |
@include small-break |
Use @media (max-width: 768px) |
Legacy Token Migration: var(--base) → --spacer
What is --base? A legacy spacing token equal to 20px (1.25rem). It must be replaced with --spacer-* tokens.
Spacer token values:
| Token | Value | Pixels |
|---|---|---|
--spacer-0 |
0 | 0px |
--spacer-1 |
4px | 4px |
--spacer-2 |
8px | 8px |
--spacer-2-5 |
Установить ui4 в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл ui4?
Manually invoked skill for reskinning Payload UI components. Requires Figma URL. Usage: /ui4
Как установить скилл ui4?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ui4 запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic