
Figma Use
Look up what Figma Plugin APIs work inside the use_figma agent environment when generating or editing design files programmatically.
Install
npx skills add https://github.com/figma/mcp-server-guide --skill figma-useWhat is this skill?
- Documents node creation APIs including createAutoLayout as the preferred layout container
- Covers grouping, boolean ops, variables API, SVG/images, and node traversal
- Calls out environment limits: createPage only in Design files, not FigJam or Slides
- Lists unsupported APIs so agents do not hallucinate full Plugin API coverage
- Companion to the parent use_figma skill for MCP-driven Figma edits
Adoption & trust: 3.3k installs on skills.sh; 1.6k GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Journey fit
Figma node and layout APIs are used while implementing UI structure and design-system artifacts, not during market validation or production monitoring. The reference documents createRectangle, auto layout, components, and manipulation—directly supporting frontend and design implementation in Figma.
Common Questions / FAQ
Is Figma Use safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Figma Use
# Figma Plugin API Reference > Part of the [use_figma skill](../SKILL.md). What works and what doesn't in the `use_figma` environment. ## Contents - Node Creation - Grouping and Boolean Operations - Library Imports - Variables API - Core Properties - Node Manipulation - Descriptions and Documentation Links - SVG and Images - Utilities and Plugin Lifecycle - Node Traversal - Unsupported APIs ## Node Creation (Design Mode) ```js figma.createRectangle() figma.createFrame() figma.createAutoLayout() // Frame with auto layout enabled, both axes hug — prefer over createFrame() for layout containers figma.createAutoLayout("VERTICAL") // Same but vertical direction figma.createComponent() // Creates a ComponentNode figma.createText() figma.createEllipse() figma.createStar() figma.createLine() figma.createVector() figma.createPolygon() figma.createBooleanOperation() figma.createSlice() figma.createPage() // Design files ONLY (figma.com/design/...). Throws "no such property 'createPage'" in both FigJam (figma.com/board/...) and Slides (figma.com/slides/...). Child persistence is limited in use_figma. figma.createSection() figma.createTextPath() ``` ## Grouping & Boolean Operations ```js figma.group(nodes, parent, index?) // Group nodes figma.flatten(nodes, parent?, index?) // Flatten to vector figma.union(nodes, parent?, index?) // Boolean union figma.subtract(nodes, parent?, index?) // Boolean subtract figma.intersect(nodes, parent?, index?) // Boolean intersect figma.exclude(nodes, parent?, index?) // Boolean exclude figma.combineAsVariants(components, parent?) // Combine ComponentNodes into ComponentSet (Design/Sites only) ``` ## Library Component Import These methods import components from **team libraries** (not the same file you're working in). For components in the current file, use `use_figma` with `figma.getNodeByIdAsync()` or `findOne()`/`findAll()` to locate them directly. ```js // Import a published component from a team library by key const comp = await figma.importComponentByKeyAsync("COMPONENT_KEY") const instance = comp.createInstance() // Import a published component set from a team library by key const compSet = await figma.importComponentSetByKeyAsync("COMPONENT_SET_KEY") const variant = compSet.children.find((c) => c.type === "COMPONENT" && c.name.includes("size=md")) || compSet.defaultVariant const variantInstance = variant.createInstance() ``` ## Library Style Import (Team Libraries) These methods import styles from **team libraries** (not the same file). For styles in the current file, use `figma.getLocalPaintStyles()`, `figma.getLocalTextStyles()`, etc. ```js // Import a published style from a team library by key const style = await figma.importStyleByKeyAsync("STYLE_KEY") // Apply the imported style to a node await node.setFillStyleIdAsync(style.id) // for PaintStyle as fill await node.setStrokeStyleIdAsync(style.id) // for PaintStyle as stroke await node.setTextStyleIdAsync(style.id) // for TextStyle await node.setEffectStyleIdAsync(style.id) // for EffectStyle await node.setGridStyleIdAsync(style.id) // for GridStyle ``` ## Library Variable Import (Team Libraries) This imports variables from **team libraries** (not the same file). For variables in the current file, use `figma.variables.getLocalVariablesAsync()` or `figma.variables.getVariableByIdAsync()`. ```js // Import a published variable from a team library by key const variable = await figma.variables.importVariableByKeyAsync("VARIABLE_KEY") // Bind the imported variable to node properties node.setBoundVariable("width", variable) // FLOAT variable // Bind to fills/strokes (COLOR variable) — returns a NEW paint, must capture it const newPaint = figma.variables.setBoundVariableForPaint(paintCopy, "color", variable) node.fills = [newPaint] ``` ## Variables API ```js // Collections const collection = figma.variables.creat