figma-to-block-theme
БесплатноЗапускает вложенные скриптыНе проверенBuild WordPress block theme files from a Figma design. Use when extracting Figma variables into theme.json presets (palette, semantic custom colours, spacing…
от lightspeedwp★ 20 звёзд на GitHubОб этом скилле
Figma to Block Theme
Overview
This skill turns a Figma design into WordPress block theme files. It has three modes:
| Mode | Use when | Writes |
|---|---|---|
| Tokens | Syncing Figma variables into the theme | theme.json presets, styles/*.json variations, font files |
| Pattern | Importing a Figma frame as a block pattern | patterns/, styles/blocks/, styles/sections/, motion CSS |
| Complete | Filling gaps in theme.json for the blocks a theme uses (no Figma needed) |
theme.json or the theme's preset slices |
Every mode starts with the theme profile (step 0) and stops for approval before it writes anything.
Companion skills
This skill holds only the Figma-to-WordPress mapping and LightSpeed conventions. Load these for everything else:
figma-use: required before everyuse_figmacall, including the variables export.figma-design-to-code: required before everyget_design_contextcall (pattern mode).wp-block-themes:theme.jsonstructure, style hierarchy, style variations and caches.wp-patterns: pattern registration, block markup and design quality.wpds: only when building admin or editor UI.theme-orphaned-refs: run after tokens change, to fix preset references.theme-color-token-enforcer: run in themes that use semantic colour tokens with dark parity.site-to-block-theme: when the layout source is a live site rather than a Figma frame. It uses this skill's theme profile.
If a companion skill is not installed, say so and stop rather than calling Figma tools directly.
Before you start
The scripts are TypeScript run with tsx from the .github repository checkout. Run npm ci there first. This skill does not use a browser, so it needs no Puppeteer download.
Step 0: Build the theme profile
Never assume paths. Read references/theme-profile.md and record:
- the theme root, text domain,
theme.jsonversion and$schema - the colour model: preset-direct or semantic with dark parity
- where tokens live:
theme.jsonalone, or preset slices merged at runtime - style variation, pattern and motion file layouts
- WooCommerce and enforcement tooling in use
Every later step reads from this profile.
Mode: Tokens
Read references/figma-access.md first. Prefer the variables export: it reads the real variable collections, modes and aliases through use_figma. Read a documentation table frame only when the file has no local variables.
Export. Run the export script from
figma-access.mdthroughuse_figmaand save the returned JSON to a scratch file outside the theme.Map. Run the mapper and read its warnings:
npx tsx ${CLAUDE_SKILL_DIR}/scripts/figma-variables-to-theme-json.ts export.json --out mapped.jsonReview each family in order, checking with the user after each one:
Order Family Reference 1 Palette tokens-color.md 2 Semantic custom colours tokens-color.md 3 Spacing tokens-spacing.md 4 Typography and fonts tokens-typography.md 5 Radius and shadows tokens-radius-shadow.md 6 Style variations style-variations.md Propose the exact changes per file (JSON path, old value, new value) and ask:
Approve this plan and proceed with implementation?Merge the approved fragments into the files the profile names. Replace only the preset arrays being synced, and keep every other setting.
Fix references. Run
theme-orphaned-refs, plustheme-color-token-enforcerfor semantic themes.Verify (see below).
Keep a checklist so an interrupted session can resume:
[ ] 0. Theme profile [ ] 1. Palette [ ] 2. Custom colours [ ] 3. Spacing
[ ] 4. Typography [ ] 5. Radius and shadows [ ] 6. Variations [ ] 7. References
The user may skip a family or re-run one with a different Figma node.
Mode: Pattern
Read references/patterns.md, plus references/woocommerce.md for store designs. For a rebuild, start from the manifest.json that site-to-figma-components writes: it names each Figma node's pattern, part or template file. In short:
- Read the Figma node through
figma-design-to-code(context plus screenshot). - Map every value to the closest existing token, and call out off-scale choices.
- Choose semantic blocks, reuse existing patterns and styles, and route motion to CSS or GSAP.
- Propose, wait for approval, then implement and verify by rendering.
Mode: Complete
Read references/theme-json-completion.md. Inventory the blocks the theme uses, read each block's `blo
Установить figma-to-block-theme в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл figma-to-block-theme?
Build WordPress block theme files from a Figma design. Use when extracting Figma variables into theme.json presets (palette, semantic custom colours, spacing, typography and fonts, radius, shadows) and style variations, when turning a Figma frame into a block pattern with its block and section styles, or when auditing a theme to fill missing theme.json block configuration. Works with the official Figma skills for all Figma access and the WordPress block theme and pattern skills for theme mechanics.
Как установить скилл figma-to-block-theme?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл figma-to-block-theme запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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