/figma-cli:figma-clifrom figma-cli
Controls Figma Desktop from the terminal to create, render, and edit frames/components/variants, import design tokens (Tailwind, shadcn, DTCG, CSS), extract design systems, generate gradients, animate with Figma Motion, and run accessibility audits.
Ships in figma-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
figma-cli controls Figma Desktop directly (no API key). It runs in any
terminal. Run figma-cli connect once per session. It opens Figma in Google Chrome.
If the figma-cli command is not found, the tool isn't installed yet — see
Installation at the bottom. Never show raw terminal commands to the user;
run them silently and give friendly feedback.
figma-cli connect — Browser (default, needs Google Chrome): drives Figma in a Chromium
browser via a local connection; never modifies the Figma app. Tell the designer
BEFORE running it: "A Google Chrome window opens in a moment. Sign in to Figma there and open
a design file. I connect by myself as soon as it is open."figma-cli connect --desktop — Yolo: for the Figma Desktop app, patches it once, fully automatic.figma-cli connect --safe — Safe: official plugin (Plugins → Development → FigCli).render / render-batch — they have smart positioning.
NEVER use eval to create visual nodes (no positioning, bypasses guards).render-batch '[...]' or shadcn add <c> --count N.figma-cli verify "<id>" --measure (returns a
screenshot + real w/h so you catch size bugs by numbers, not by eye).var:name, never raw hex when a system is loaded:
<Frame bg="var:primary"><Text color="var:on-primary">Go</Text></Frame>render-batch ... --collection figma.figma-cli import tailwind.config.js | globals.css | tokens.json.figma-cli extract → DESIGN.md.flex="row|col" gap={16} p={24} px py pt pr pb pl justify="center|between" items="center"w={320} h={200} w="fill" w="hug" w="60%" (percent resolves vs parent)bg="#fff" stroke="#000" strokeWidth={2} rounded={12} shadow="..." opacity={0.8}<Text size={14} weight="semibold" color="#000" lineHeight={20} truncate maxLines={2} w="fill"><Icon name="lucide:home" size={20} color="var:primary" /><Frame w={1} bg="var:border" />) auto-fills the cross axis.For text to wrap, the parent AND every <Text> need w="fill", and the parent
needs flex="col" or flex="row".
Don't read the structure markdown by hand. Use:
figma-cli spec <Component> → authoritative variant axes + sample size (compact).
Build EXACTLY to those axes (e.g. Variant × Size = a Component Set, not one node).figma-cli spec <Component> --check <nodeId> → enforces it (exit 1 on mismatch:
wrong structure, missing axes, wrong height). Treat non-zero as "not done".figma-cli connect # Figma in Google Chrome (default)
figma-cli connect --desktop # Figma Desktop app (yolo)
figma-cli render '<Frame>...</Frame>' # one frame
figma-cli render-batch '[ "<Frame>", ... ]' --direction row
figma-cli shadcn add button --count 3 # N distinct shadcn primitives
figma-cli node to-component "<id>" # promote to a component
figma-cli verify "<id>" --measure # screenshot + dimensions
figma-cli a11y audit # contrast / touch / text checks
figma-cli tokens preset shadcn # 244 primitives + semantic (light/dark)
figma-cli var visualize # show colors on canvas
figma-cli motion preset <id> fade-up # animate (Figma Motion, beta)
figma-cli blocks create dashboard-01 # pre-built dashboard layout
figma-cli is a Node CLI (Node ≥ 18) that talks to Figma Desktop locally. If the
figma-cli binary is missing, get the project from
https://github.com/silships/figma-cli and run npm install in it, then invoke it
as node src/index.js <command> (or link it as figma-cli). Full command
reference and JSX docs live in that repo's README.md and REFERENCE.md.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
figma, design-tokens, design-system, accessibility-audit, cli
npx claudepluginhub silships/figma-cli --plugin figma-cliOther plugins' skills for the same job