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 a new file in Figma

Steps to create a new Figma Design, FigJam, or Slides file using the create_new_file MCP tool.

Step 1: Resolve the planKey and editorType

Use the planKey the user provided or selected for this task. Otherwise, call whoami and inspect the returned plans.

  • No plans: inform the user that file creation cannot proceed.
  • One plan: use its key as planKey.
  • Multiple plans: show the available plans, ask the user to select one and then use that plan's key as planKey.

Infer editorType from the requested file type by choosing from the tool's advertised input enum. If unclear, ask the user to specify the file type.

Step 2: Call create_new_file

Call the create_new_file tool with all three required arguments:

  • fileName: Required. Choose a concise name if the user does not provide one.
  • planKey: Required. Use the planKey resolved in Step 1.
  • editorType: Required. Use the editorType selected in Step 1.
  • projectId: Optional. Set it to create the file in a specific project.
{
  "fileName": "Quarterly planning",
  "planKey": "team::1234567890",
  "editorType": "design"
}
  • Use the file_key from the create_new_file tool response for subsequent tool calls like use_figma.

Step 3: (Slides only) Handle the empty grid

A new Slides file contains no slides: figma.getSlideGrid() returns []. Before reading properties such as theme tokens from a slide, call figma.createSlide() or handle the empty case. The first createSlide() call automatically creates row 0 and inserts the slide.

来自 Figma 的更多技能

figma-generate-design
Figma
当任务涉及将应用页面、视图或多区块布局转换到 Figma 时,请将此技能与 figma-use 配合使用。触发词包括:“写入 Figma”、“从代码在 Figma 中创建”、“将页面推送到 Figma”、“将此应用/页面在 Figma 中构建”、“创建屏幕”、“在 Figma 中构建落地页”、“更新 Figma 屏幕以匹配代码”。只要用户希望从代码或描述在 Figma 中构建或更新完整页面、屏幕或视图,此技能即为首选工作流。通过 search_design_system 发现设计系统组件、变量和样式,导入它们,并逐步按区块组装屏幕,使用设计系统令牌而非硬编码值。
figma-generate-library
Figma
从代码库在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`.
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.
figma-create-design-system-rules
Figma
为用户代码库生成自定义设计系统规则。当用户提出“创建设计系统规则”、“为我的项目生成规则”、“设置设计规则”、“自定义设计系统指南”或希望为Figma到代码工作流建立项目特定规范时使用。需要连接Figma MCP服务器。
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`.