figma-create-new-file

作者: figma

建立一個新的空白 Figma 檔案。當使用者想要建立新的 Figma 設計或 FigJam 檔案,或是在呼叫 use_figma 之前需要一個新檔案時使用。

npx skills add https://github.com/figma/dev-mode-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-code-connect
figma
建立並維護 Figma Code Connect 範本檔案,將 Figma 元件對應至程式碼片段。當使用者提及 Code Connect、Figma 元件…時使用。
official
figma-create-design-system-rules
figma
為使用者的程式碼庫生成自訂設計系統規則。當使用者說「建立設計系統規則」、「為我的專案生成規則」、「設定設計…」時使用。
official
figma-generate-design
figma
當任務涉及將應用程式頁面、檢視或多區塊佈局轉換到 Figma 時,請搭配 figma-use 使用此技能。觸發條件:'write to…
official
figma-generate-diagram
figma
MANDATORY prerequisite — load this skill BEFORE every `generate_diagram` tool call. Routes to type-specific guidance (generic flowchart, architecture…
official
figma-generate-library
figma
從程式碼庫在 Figma 中建立或更新專業級設計系統。當使用者想要建立變數/代碼、建構元件庫、設定…時使用。
official
figma-implement-design
figma
將 Figma 設計轉換為視覺保真度 1:1 的生產級應用程式碼。在從 Figma 檔案實作 UI 程式碼時,或當使用者提及…時使用。
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.…
official
figma-use-figjam
figma
此技能協助代理人在 FigJam 環境中使用 Figma 的 use_figma MCP 工具。可與提供基礎使用情境的 figma-use 搭配使用…
official