figma-create-new-file

作者: Figma

创建一个新的空白Figma文件。当用户想要创建新的Figma设计或FigJam文件时使用,或者在调用use_figma之前需要新文件时使用。如有需要,通过whoami处理方案解析。用法 — /figma-create-new-file [editorType] [fileName](例如 /figma-create-new-file figjam My Whiteboard)

npx skills add https://github.com/figma/mcp-server-guide --skill figma-create-new-file

create_new_file — Create a New Figma File

MANDATORY: load this skill before every create_new_file tool call. It encodes the plan-resolution decision tree, the editor-type contract, and the post-creation handoff to use_figma.

Use the create_new_file MCP tool to create a new blank Figma file in the user's drafts folder. This is typically used before use_figma when you need a fresh file to work with.

Skill Arguments

This skill accepts optional arguments: /figma-create-new-file [editorType] [fileName]

  • editorType: design (default), figjam, or slides
  • fileName: Name for the new file (defaults to "Untitled")

Examples:

  • /figma-create-new-file — creates a design file named "Untitled"
  • /figma-create-new-file figjam My Whiteboard — creates a FigJam file named "My Whiteboard"
  • /figma-create-new-file design My New Design — creates a design file named "My New Design"
  • /figma-create-new-file slides Q3 Review — creates a Slides presentation named "Q3 Review"

Parse the arguments from the skill invocation. If editorType is not provided, default to "design". If fileName is not provided, default to "Untitled".

Workflow

Step 1: Resolve the planKey

The create_new_file tool requires a planKey parameter. Follow this decision tree:

  1. User already provided a planKey (e.g. from a previous whoami call or in their prompt) → use it directly, skip to Step 2.

  2. No planKey available → call the whoami tool. The response contains a plans array. Each plan has a key, name, seat, and tier.

    • Single plan: use its key field automatically.
    • Multiple plans: ask the user which team or organization they want to create the file in, then use the corresponding plan's key.

Step 2: Call create_new_file

Call the create_new_file tool with:

ParameterRequiredDescription
planKeyYesThe plan key from Step 1
fileNameYesName for the new file
editorTypeYes"design", "figjam", or "slides"

Example:

{
  "planKey": "team:123456",
  "fileName": "My New Design",
  "editorType": "design"
}

Step 3: Use the result

The tool returns:

  • file_key — the key of the newly created file
  • file_url — a direct URL to open the file in Figma

Use the file_key for subsequent tool calls like use_figma.

Important Notes

  • The file is created in the user's drafts folder for the selected plan.
  • Supported editor types are "design", "figjam", and "slides".
  • If use_figma is your next step, load the figma-use skill before calling it.

Editor-specific notes

Slides — newly created files have an empty grid

A slides file produced by this tool starts with zero rows and zero slidesfigma.getSlideGrid() returns [], not a default first slide. The page's only child is the SLIDE_GRID node itself, which is empty until you create content. The first call to figma.createSlide() implicitly creates row 0 and inserts the new slide there.

If your follow-up use_figma script assumes at least one slide exists (e.g. to read theme tokens off it), guard for the empty case or call createSlide() first. See figma-use-slides → slide-grid for full details.

来自 Figma 的更多技能

figma-implement-design
Figma
Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions "implement design", "generate code", "implement component", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.
official
figma-use
Figma
**MANDATORY prerequisite** — you MUST invoke this skill BEFORE every `use_figma` tool call. NEVER call `use_figma` directly without loading this skill first. Skipping it causes common, hard-to-debug failures. Trigger whenever the user wants to perform a write action or a unique read action that requires JavaScript execution in the Figma file context — e.g. create/edit/delete nodes, set up variables or tokens, build components and variants, modify auto-layout or fills, bind variables to properties, or inspect file structure programmatically.
official
figma-code-connect-components
Figma
Connects Figma design components to code components using Code Connect mapping tools. Use when user says "code connect", "connect this component to code", "map this component", "link component to code", "create code connect mapping", or wants to establish mappings between Figma designs and code implementations. For canvas writes via `use_figma`, use `figma-use`.
official
figma-create-design-system-rules
Figma
为用户代码库生成自定义设计系统规则。当用户提出“创建设计系统规则”、“为我的项目生成规则”、“设置设计规则”、“自定义设计系统指南”或希望为Figma到代码工作流建立项目特定规范时使用。需要连接Figma MCP服务器。
official
figma-generate-design
Figma
当任务涉及将应用页面、视图或多区块布局转换到 Figma 时,请将此技能与 figma-use 配合使用。触发词包括:“写入 Figma”、“从代码在 Figma 中创建”、“将页面推送到 Figma”、“将此应用/页面在 Figma 中构建”、“创建屏幕”、“在 Figma 中构建落地页”、“更新 Figma 屏幕以匹配代码”。只要用户希望从代码或描述在 Figma 中构建或更新完整页面、屏幕或视图,此技能即为首选工作流。通过 search_design_system 发现设计系统组件、变量和样式,导入它们,并逐步按区块组装屏幕,使用设计系统令牌而非硬编码值。
official
figma-generate-library
Figma
从代码库在Figma中构建或更新专业级设计系统。当用户想要创建变量/令牌、构建组件库、设置主题(亮色
official