Command Palette

Search for a command to run...

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

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от 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 every use_figma call, including the variables export.
  • figma-design-to-code: required before every get_design_context call (pattern mode).
  • wp-block-themes: theme.json structure, 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.json version and $schema
  • the colour model: preset-direct or semantic with dark parity
  • where tokens live: theme.json alone, 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.

  1. Export. Run the export script from figma-access.md through use_figma and save the returned JSON to a scratch file outside the theme.

  2. Map. Run the mapper and read its warnings:

    npx tsx ${CLAUDE_SKILL_DIR}/scripts/figma-variables-to-theme-json.ts export.json --out mapped.json
    
  3. Review 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
  4. Propose the exact changes per file (JSON path, old value, new value) and ask: Approve this plan and proceed with implementation?

  5. Merge the approved fragments into the files the profile names. Replace only the preset arrays being synced, and keep every other setting.

  6. Fix references. Run theme-orphaned-refs, plus theme-color-token-enforcer for semantic themes.

  7. 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:

  1. Read the Figma node through figma-design-to-code (context plus screenshot).
  2. Map every value to the closest existing token, and call out off-scale choices.
  3. Choose semantic blocks, reuse existing patterns and styles, and route motion to CSS or GSAP.
  4. 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

Полный SKILL.md на GitHub

Установить figma-to-block-theme в Claude Code и Claude Desktop

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

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

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

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

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

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

Вложенные файлы

agents/openai.yamlreferences/figma-access.mdreferences/patterns.mdreferences/studio-operations.mdreferences/style-variations.mdreferences/theme-json-completion.mdreferences/theme-profile.mdreferences/tokens-color.mdreferences/tokens-radius-shadow.mdreferences/tokens-spacing.mdreferences/tokens-typography.mdreferences/woocommerce.mdscripts/figma-variables-to-theme-json.tsscripts/fluid-clamp.tsscripts/google-fonts.tsscripts/jest.config.cjsscripts/tsconfig.json

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить figma-to-block-theme с