mcpField
F
figma-create-new-file

figma-create-new-file

github.com/figmaDesign & UI2.1k3.5k installsUpdated today
Repository

About figma-create-new-file

A workflow skill for creating Figma Design, FigJam, or Slides files through the `create_new_file` MCP tool. It guides an agent through choosing a plan and editor type, creating the file, and handling an empty Slides grid.

Key features

  1. 01Resolve the Figma plan key
  2. 02Choose an editor type
  3. 03Create files with optional project ID
  4. 04Handle an empty Slides grid

Use cases

  1. 01Create a Figma Design file
  2. 02Start a FigJam or Slides file
  3. 03Create a file in a selected project

MCP support

The skill uses the `create_new_file` MCP tool to create files and `whoami` to inspect available plans. It also references follow-up Figma tool calls.

Install

Copy the command and run it in a terminal.

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

After installing, type/figma-create-new-filein Claude Code to confirm it loaded.

Details

From the project README

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.

Comments

Markdown supported