All skills
figma avatar

/figma-use-figjam

@a5e7e04 official
by figmafigma/mcp-server-guide2k stars
194

This skill helps agents use Figma's use_figma MCP tool in the FigJam context. Can be used alongside figma-use which has foundational context for using the use_figma tool.

Use this Skill: https://skilld.dev/gh/figma/mcp-server-guide/figma-use-figjam

This session only. Nothing lands on disk.

referencesposition-figjam-nodes.md

≈980 tokens on demand. Your agent reads this file only when SKILL.md points to it.

FigJam Node Positioning Tutorial

Part of the figma-use-figjam skill. Positioning, sizing, and reparenting nodes on the canvas.

Use this skill when working with positioning, sizing, and reparenting nodes.

Basics of how nodes are positioned

Nodes may be positioned by setting their x and y properties. Nodes are positioned with respect to their parent.

// Position (relative to parent)
node.x = 100
node.y = 200

Positioning Nodes Relative to Existing Nodes

It's important to remember that node.x and node.y are relative to the node's parent, not the page. For example: a node inside a section has coordinates relative to that section's origin.

When creating or placing a node relative to an existing node:

  1. Find the parent: Locate the parent of the existing node.
  2. Add new node to parent: Call parent.appendChild() to add the new node to the parent.
  3. Position within parent: Position the new node within the parent. The x / y coordinates of the new node will be with respect to the top-left corner of the parent.
  4. Ensure parent sections encompass their children: If the parent is a section: a. Resize the section to encompass the new node b. (see create-section — "Resizing an Existing Section" for more info)

Example helper function:

// existingNodeId (string): the node id you are positioning relative to
// nodeToPosition: the node you are trying to position relative to the existing node
async function placeNodeRelativeToOtherNode(existingNodeId, nodeToPosition) {

  // 1: find the parent of existing node
  const existingNode = await figma.getNodeByIdAsync(existingNodeId);
  const parent = existingNode.parent

  // 2: add the node to the parent
  parent.appendChild(nodeToPosition)

  // 3: position the node w.r.t the top-left corner of the parent
  // here, we chose to place it to the right of the existing node
  nodeToPosition.x = existingNode.x + existingNode.width + 40;
  nodeToPosition.y = existingNode.y;

  // 4: if the parent is a section: resize the section if needed
  if (parent.type === 'SECTION') {
    // ... resize if needed, (see [create-section](create-section.md) — "Resizing an Existing Section" for more info)
  }
}

Adding Nodes to a Section

Use appendChild to move existing nodes into a section.

CRITICAL: when you call appendChild, the node's x/y coordinates become relative to the section's local coordinate space, where (0,0) is the top-left corner of the section — NOT absolute board coordinates. Always call appendChild first, then set the node's position using section-local coordinates.

IMPORTANT: After adding nodes to a section, you MUST check that the section encompasses its children. Refer to the Resizing an Existing Section code snippet for reference. This is crucial for a high-quality output.

Steps:

  1. Add new node to parent: Call parent.appendChild() to add the new node to the parent.
  2. Position within parent: Position the new node within the parent. The x / y coordinates of the new node will be with respect to the TL of the parent.
  3. Clean up any layout consequences: If the parent is a section: a. Resize the section to encompass the new node b. (see create-section — "Resizing an Existing Section" for more info)

Example helper function:

function addNodeToSection(node, section) {
  // Ensure this is a section
  if (section.type !== 'SECTION') {
    console.log('The node provided is not a section')
    return
  }

  // Append FIRST, then position using section-local coordinates
  section.appendChild(node)
  node.x = 32
  node.y = 32
  console.log(`Moved ${node.name} into ${section.name}`)

  // ... resize section if needed, (see [create-section](create-section.md) — "Resizing an Existing Section" for more info)
}

Source: SKILL.md on GitHub

No alerts16d3 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides documentation and code patterns for using Figma's official MCP tools in FigJam files. It is safe and contains no malicious code or instructions.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

Signed by skilld at a5e7e04. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
disable-model-invocation
false
  • MCP
  • figma
  • figjam
  • plugin-api
  • board-creation
  • collaborative-design
  • javascript

README badge

README badge for figma/mcp-server-guide/figma-use-figjam

Instructs the use_figma MCP tool for FigJam-specific operations: creating boards, sections, stickies, connectors, tables, and code blocks. Covers inspection via get_figjam, text mutations, image uploads, and positioning rules that differ from Figma Design files.

Generated from the current SKILL.md.

Do I call `figma.createPage()` in FigJam files?
No. FigJam files (figma.com/board/...) do not support `createPage()` and will throw a TypeError. FigJam has a single implicit page; use sections instead to organize content.
How do I inspect a FigJam file to get node IDs?
`get_figjam` is the inspection tool for FigJam files and returns the full node tree as XML with all IDs. Always call it upfront before writing `use_figma` code that references existing nodes, since `console.log` output from `use_figma` is not returned to the agent.
Can I use `get_metadata` on FigJam files?
No. `get_metadata` is design-mode only and will fail immediately on FigJam files with an 'unsupported for FigJam files' error.
How do I add images to a FigJam board?
`upload_assets` is the only supported way to add images to FigJam. Do not use `figma.createImage()` or `figma.createImageAsync()` from inside `use_figma`.
What is the canonical recipe for editing text in FigJam?
Load the font, await it, then mutate the text node, then return affected IDs. FigJam text nodes use varying default fonts (sticky/shape use Inter Medium, connector has no default), so always load the actual font from `node.text.fontName` rather than hardcoding a family.

Generated from the current SKILL.md. These answers refresh after source changes.