build-slides-figma — author Figma Slides decks
Build and edit Figma Slides presentations: manage the slide grid (list / create / duplicate / reorder
/ delete / focus / skip), add content (text, shapes, background color), and control transitions. Each
slide is a SLIDE node; the deck is a 2D grid (figma.getSlideGrid() → rows of slides).
Skill boundaries
use_figmarules — load the officialfigma-useskill first; it is the full Figma Plugin API reference. Essentials these scripts rely on: plain JS with top-levelawait+return(no IIFE, nofigma.closePlugin();console.logis not returned), inputs inlined asconstat the top of each script, colors in 0–1 range, load fonts before any text op,await figma.getNodeByIdAsync(...), and atomic errors (a failed script applies nothing — read the error, fix, retry).- One complete snippet per operation → references/slides-snippets.md.
Workflow
- Confirm it's a Slides file. Every op throws outside Slides. Check first:
return { editorType: figma.editorType };— it must be'slides'. - List slides to get IDs and grid positions (
scripts/snippetList slides). Slide IDs are what every other op references. - Pick the operation from references/slides-snippets.md: create / duplicate / delete / reorder slides; add text / shape; set background; set / get transition; focus; skip; read slide content.
- Run the snippet via
use_figma(skillNames: "build-slides-figma"), editing the inlined constants. - Return created/changed slide IDs and re-list or read-content to confirm.
Notes
- Adding text loads a font first.
add text to slidecallsawait figma.loadFontAsync({ family, style })before setting.characters— never skip it. Default is Inter / Regular. - Create at a grid position with
figma.createSlide({ row, col }), orfigma.createSlide()to append. - Transition
stylevalues:NONE,DISSOLVE,SLIDE_FROM_LEFT,SLIDE_FROM_RIGHT,SLIDE_FROM_BOTTOM,SLIDE_FROM_TOP,PUSH_FROM_LEFT,PUSH_FROM_RIGHT,PUSH_FROM_BOTTOM,PUSH_FROM_TOP,SMART_ANIMATE. Timing defaults to{ type: 'ON_CLICK' }. - Background is implemented as a full-bleed (1920×1080)
Backgroundrectangle inserted at index 0; re-running updates the existing one instead of stacking. reordertakes a 2D array of slide IDs (rows × columns) and rebuilds the grid viafigma.setSlideGrid. Every ID must exist in the current grid or it throws.- Skip toggles
slide.isSkippedSlide(note: the property isisSkippedSlide, notskipped). - These tools require the Figma Desktop app (the Plugin API isn't available in the browser).