/figma:figma-specfrom figma
Creates, reads, edits, and reviews Figma specs (standalone or embedded in Design/FigJam files). Handles spec discovery, content retrieval, and on-canvas creation.
Ships in figma. 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.
Check that figma.spec is defined in your first use_figma script; it exists only when the file’s plan has Specs enabled. If it is undefined, explain that Specs is not enabled for this file’s plan and stop the workflow. To create a new standalone Figma spec file, call whoami to choose a destination plan, then call create_new_file with editorType: "figspec" and that plan's key as planKey. If it reports that Figma Specs is not available on that plan, offer the user's other plans or stop.
A native Figma spec is GitHub-Flavored Markdown (GFM) under a SPEC_BLOCK node. A standalone Figma spec is just one spec; a FigJam or Design file can contain several embedded specs.
Resolve a supplied URL node-id when present with figma.getNodeByIdAsync and require type === "SPEC_BLOCK" plus specBlockType === "DOCUMENT". Otherwise, search the current page with findAllWithCriteria({ types: ['SPEC_BLOCK'] }), filtering for specBlockType === "DOCUMENT" (and examine content with figma.spec.getContent if needed) until you find your target. If it's not on the current page, load other pages one at a time with page.loadAsync() and repeat your query, stopping once the target is resolved.
Pass the resolved root ID to every content call. Omit specNodeId only when the file is known to contain exactly one Figma spec; omission throws otherwise. Never edit ordinary canvas text nodes as a fallback.
// Creates an embedded Figma spec on a Design or FigJam canvas (not a standalone Figma spec file).
const { specNodeId } = await figma.spec.createOnCanvasAsync({
title: 'Untitled spec',
content: '# Title\n\nA paragraph.\n',
})
const specNode = await figma.getNodeByIdAsync(specNodeId)
if (!specNode) throw new Error('The created Figma spec could not be resolved')
const after = await figma.spec.getContent({ specNodeId })
if (!after.markdown.includes('A paragraph.')) {
throw new Error('The new Figma spec content was not applied')
}
Always pass a non-empty title and a content string ('' is allowed). title names the root; include any desired # H1 in content.
// READ — returns specNodeId, markdown, title, etc.
// The body is `markdown`, not `content`.
const before = await figma.spec.getContent({ specNodeId: chosenSpec.id })
const page = await figma.spec.getContent({
specNodeId: before.specNodeId,
offset: 100,
maxLines: 50,
})
// REPLACE — clears + recreates the document; use only for an empty first draft.
await figma.spec.setContent({
specNodeId: before.specNodeId,
content: '# Title\n\nA paragraph.\n',
})
// EDIT — find/replace; each oldText must match exactly once.
await figma.spec.editContent({
specNodeId: before.specNodeId,
edits: [{ oldText: 'First paragraph.', newText: 'Edited first paragraph.' }],
})
// PATTERN EDIT — a regex literal; with `g` it replaces every match, without `g` exactly one.
await figma.spec.editContent({
specNodeId: before.specNodeId,
edits: [{ pattern: '/^### /gm', newText: '## ' }],
})
const after = await figma.spec.getContent({ specNodeId: before.specNodeId })
return { applied: after.markdown.includes('Edited first paragraph.') }
getContent with the same specNodeId before edits and to verify writes; DON'T rely on screenshots.editContent.setContent only for an empty first draft or an explicit whole-document replacement.g pattern. For "all"/"every" requests, use a single pattern edit with the g flag instead of an oldText per target, then confirm none of the old pattern remains.oldText, and each pattern without g, must match exactly once. Zero or multiple matches fail without changes; add surrounding context to make it unique. A pattern with g must match at least once. Each edit has oldText or pattern, plus newText.Buffer/base64 or decode it with atob(). Base64 is only for image data URLs inside Markdown.figma.spec.* handles content; node traversal exposes only document roots and embedded-canvas branches.[comment:<uuid>]…[/comment:<uuid>] pairs unchanged around the same text, or the thread may detach or disappear. When in doubt copy the marked span exactly and edit around it.localhost URLs.editContent matches columns by header text. Restyle headers in a separate edit.title that getContent returns.<ins> for underline, including combined formatting: <ins>**bold and underlined**</ins>. Do not use <u>, which only works in HTML imports.<mark>text</mark> (yellow). For another color, add a background-color from the palette: <mark style="background-color: #e3ecf2">text</mark>, with grey #e6e6e6, red #f8e5e2, green #daecdf, blue #e3ecf2 or purple #ede7f3. Any other color snaps to the nearest of these; transparent, white or black removes the highlight. Other attributes and styles on <mark> are ignored. Put other formatting inside: <mark>**bold**</mark>.Images use GFM image syntax inside setContent or editContent:
 embeds bytes that are decoded and uploaded. is fetched server-side; disallowed hosts are rejected.getContent emits image URLs as https://<host>/spec/<fileKey>/image/<sha>?w=<width>&h=<height>.
Use figma.spec.comments.* for anchored threads. Prefer comments over leaving silent edits when you're unsure of a change.
const comment = await figma.spec.comments.create({
specNodeId: before.specNodeId,
anchorText: 'the exact rendered text to anchor to', // MUST appear exactly once
contextText: 'a longer unique substring containing anchorText', // optional; disambiguates repeats
message: 'Comment body (markdown).',
})
const { root, replies, hasMore } = await figma.spec.comments.getThread({ uuid: comment.uuid })
await figma.spec.comments.reply({ uuid: comment.uuid, message: 'A reply.' })
anchorText must match exactly once in the rendered Figma spec. Use a longer contextText containing it to disambiguate repeated text.getThread and reply require the root comment UUID surfaced by a [comment:<uuid>] marker; never pass a reply UUID to reply.What SKILL.md sets; muted values are Claude Code's defaults
18 skills in this plugin
/figma-3d-transformsAdd or edit 3D transforms — depth, perspective, z-axis rotation, tilt, isometric, and parallax looks that flat 2D rotation cannot express. Use whenever a request reaches into the third dimension — "make it 3D", "add depth/perspective", "tilt/rotate it back", "z-plane", "isometric", "flip it like a card", "parallax", "vanishing point", "receding into the distance", "make it pop out"./figma-code-connectCreates and maintains Figma Code Connect template files that map Figma components to code snippets. Use when the user mentions Code Connect, Figma component mapping, design-to-code translation, or asks to create/update .figma.ts or .figma.js files./figma-code-workflowsImport existing local projects, HTML files, or GitHub repos into Figma as editable Design layers, runnable Code Layers, or standalone Code/Make files; pull GitHub updates into linked Figma code; fix imported previews. Requires a specified Figma output, by type or intent, or a destination Figma file link/key. Running, clicking through, or interacting with the imported app in Figma specifies runnable code; Figma Code/Make names alone do not specify an output. Excludes Gallery publishing/sharing, new code components, local builds, and vague “make a code project” requests./figma-create-new-fileAlways use this skill when the user wants to create a new Figma Design, FigJam, or Slides file. You MUST invoke this skill BEFORE every `create_new_file` tool call./figma-design-to-code**MANDATORY prerequisite** — you MUST invoke this skill BEFORE calling the `get_design_context` Figma MCP tool. You MUST trigger this skill whenever the user wants to implement, build, port, or code up a Figma design as code. Example prompts (not exhaustive) are 'implement this Figma design', 'build this screen from Figma', 'turn this Figma into code', 'design to code'. This skill provides critical instructions and steps to the agent on how to correctly implement Figma designs in code and must NOT be skipped./figma-generate-designUse this skill alongside figma-use when the task involves translating an application page, view, or multi-section layout into Figma. Triggers: 'write to Figma', 'create in Figma from code', 'push page to Figma', 'take this app/page and build it in Figma', 'create a screen', 'build a landing page in Figma', 'update the Figma screen to match code', 'convert this modal/dialog/drawer/panel to Figma'. This is the preferred workflow skill whenever the user wants to build or update a full page, modal, dialog, drawer, sidebar, panel, form, dashboard, list, table, card, header, message preview, or other composed product UI in Figma from code or a description—even when the user calls that composed UI a component. Discovers design system components, variables, and styles from Code Connect files, existing screens, and library search, then imports them and assembles views incrementally section-by-section using design system tokens instead of hardcoded values.Other plugins' skills for the same job
figma-mcp-server-guide@cascade-code-general-misc-3 is listed by joshuarweaver/cascade-code-general-misc-3 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-general-misc-3 --plugin figma-mcp-server-guide