Command Palette

Search for a command to run...

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

figma-design

БесплатноБез исполняемых скриптовНе проверен

Figma workflows, components, auto layout, constraints, prototyping, design systems, and plugin development based on Figma Plugin API documentation

manutejот manutej★ 64 звезды на GitHub77 установок в других каталогах

Об этом скилле

Figma Design Skill

Comprehensive guide for Figma design workflows, plugin development, component systems, auto layout, prototyping, and design system management based on official Figma Plugin API documentation from Context7.

When to Use This Skill

Use this skill when working with:

  • Figma Plugin Development: Building custom plugins, UI extensions, automation tools
  • Design Systems: Creating and managing variables, styles, components, and libraries
  • Component Architecture: Building reusable components, variants, and instances
  • Auto Layout: Implementing responsive frames with constraints and spacing
  • Prototyping: Creating interactive prototypes with reactions and flows
  • Batch Operations: Automating repetitive design tasks across multiple nodes
  • Export & Integration: Exporting assets in various formats (PNG, JPG, SVG)
  • Data Management: Storing and retrieving plugin/shared data on nodes
  • Collaboration: Managing version history, comments, and team workflows

Core Concepts

1. Figma Node Hierarchy

The Figma document structure is a tree of nodes:

DocumentNode (root)
└── PageNode
    ├── FrameNode
    │   ├── TextNode
    │   ├── RectangleNode
    │   └── ComponentNode
    └── SectionNode
        └── FrameNode

Key Node Types:

  • FRAME: Container with auto-layout capabilities
  • COMPONENT: Reusable design element (master)
  • INSTANCE: Copy of a component
  • TEXT: Editable text layer
  • RECTANGLE, ELLIPSE, POLYGON, STAR, LINE: Basic shapes
  • SECTION: Organizational container for frames
  • GROUP: Non-layout container

2. Components and Instances

Components are master elements that can be instantiated multiple times:

// Create a component
const button = figma.createComponent()
button.name = "Primary Button"
button.resize(120, 40)

// Add visual elements
const bg = figma.createRectangle()
bg.resize(120, 40)
bg.cornerRadius = 8
bg.fills = [{ type: 'SOLID', color: { r: 0.2, g: 0.5, b: 1 } }]
button.appendChild(bg)

// Create instance
const buttonInstance = button.createInstance()
buttonInstance.x = 200
buttonInstance.y = 100

Component Properties:

  • BOOLEAN: Toggle visibility or states
  • TEXT: Customizable text content
  • INSTANCE_SWAP: Swap nested components
  • VARIANT: Different component variations

3. Auto Layout

Auto Layout creates responsive frames that adapt to content changes:

Core Properties:

  • layoutMode: 'HORIZONTAL', 'VERTICAL', or 'NONE'
  • primaryAxisSizingMode: 'FIXED' or 'AUTO'
  • counterAxisSizingMode: 'FIXED' or 'AUTO'
  • paddingLeft, paddingRight, paddingTop, paddingBottom
  • itemSpacing: Gap between children
  • primaryAxisAlignItems: Alignment on main axis
  • counterAxisAlignItems: Alignment on cross axis

Constraints for Children:

  • minWidth, maxWidth: Width boundaries
  • minHeight, maxHeight: Height boundaries
  • layoutAlign: 'MIN', 'CENTER', 'MAX', 'STRETCH'
  • layoutGrow: 0 (fixed) or 1 (fill container)
// Create auto-layout frame
const frame = figma.createFrame()
frame.layoutMode = 'VERTICAL'
frame.primaryAxisSizingMode = 'AUTO'
frame.counterAxisSizingMode = 'FIXED'
frame.resize(300, 0) // Width fixed, height auto
frame.itemSpacing = 16
frame.paddingLeft = 24
frame.paddingRight = 24
frame.paddingTop = 24
frame.paddingBottom = 24

// Add children with constraints
const child = figma.createRectangle()
child.resize(252, 100)
child.layoutAlign = 'STRETCH' // Fill width
child.minHeight = 100
child.maxHeight = 200
frame.appendChild(child)

4. Constraints

Constraints control how nodes resize when their parent changes:

interface Constraints {
  horizontal: 'MIN' | 'CENTER' | 'MAX' | 'STRETCH' | 'SCALE'
  vertical: 'MIN' | 'CENTER' | 'MAX' | 'STRETCH' | 'SCALE'
}

node.constraints = {
  horizontal: 'MIN',    // Pin to left
  vertical: 'MAX'       // Pin to bottom
}

Constraint Types:

  • MIN: Pin to top/left edge
  • CENTER: Center in parent
  • MAX: Pin to bottom/right edge
  • STRETCH: Scale with parent (both edges)
  • SCALE: Maintain proportional position and size

5. Variables and Design Tokens

Variables create dynamic design systems (Figma Design only):

// Create variable collection
const collection = figma.variables.createVariableCollection('Design Tokens')

// Create color variable
const primaryColor = figma.variables.createVariable(
  'color/primary',
  collection,
  'COLOR'
)

// Set value for default mode
const defaultMode = collection.modes[0]
primaryColor.setValueForMode(defaultMode.modeId, {
  r: 0.2, g: 0.5, b: 1, a: 1
})

// Add dark mode
const darkMode = collection.addMode('Dark')
primaryColor.setValueForMode(darkMode, {
  r: 0.4, g: 0.7, b: 1, a: 1
})

// Create variable alias (reference)
const accentColor = figma.variables.createVariable(
  'color/accent',
  collection,
  'COLOR'
)
const alias = figma.variables.createVariableAlias(primaryColor)
accentColor.setV
Полный SKILL.md на GitHub

Установить figma-design в Claude Code и Claude Desktop

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

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

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

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

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

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

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

EXAMPLES.mdREADME.md

FAQ

Что делает скилл figma-design?

Figma workflows, components, auto layout, constraints, prototyping, design systems, and plugin development based on Figma Plugin API documentation

Как установить скилл figma-design?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл figma-design запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить figma-design с