Agent Skills › EkagraAgarwal/BanyanCode › figma-create-new-file

figma-create-new-file

GitHub

用于在Figma中创建设计、FigJam或Slides文件。通过解析用户计划类型和编辑器类型,调用工具生成新文件并处理后续逻辑。

packages/plugins/figma/skills/figma-create-new-file/SKILL.md EkagraAgarwal/BanyanCode

Trigger Scenarios

用户需要新建Figma设计文件 用户需要新建FigJam白板 用户需要新建Slides演示文稿

Install

npx skills add EkagraAgarwal/BanyanCode --skill figma-create-new-file -g -y
More Options

Non-standard path

npx skills add https://github.com/EkagraAgarwal/BanyanCode/tree/main/packages/plugins/figma/skills/figma-create-new-file -g -y

Use without installing

npx skills use EkagraAgarwal/BanyanCode@figma-create-new-file

指定 Agent (Claude Code)

npx skills add EkagraAgarwal/BanyanCode --skill figma-create-new-file -a claude-code -g -y

安装 repo 全部 skill

npx skills add EkagraAgarwal/BanyanCode --all -g -y

预览 repo 内 skill

npx skills add EkagraAgarwal/BanyanCode --list

SKILL.md

Frontmatter
{
    "name": "figma-create-new-file",
    "description": "Always use this skill when the user wants to create a new Figma Design, FigJam, or Slides file. You MUST invoke this skill BEFORE every `create_new_file` tool call.",
    "disable-model-invocation": false
}

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.

Version History

  • 7e7488b Current 2026-11-07 12:26

Same Skill Collection

.opencode/skills/opencode-dev/SKILL.md
.opencode/skills/rtl-aware-development/SKILL.md
.opencode/skills/sample-skill/SKILL.md
packages/banyancode-mcp/skills/banyancode-delegate/SKILL.md
packages/plugins/figma/skills/figma-code-connect/SKILL.md
packages/plugins/figma/skills/figma-generative-plugins/SKILL.md
packages/plugins/figma/skills/figma-implement-motion/SKILL.md
packages/plugins/figma/skills/figma-shaders/SKILL.md
packages/plugins/figma/skills/figma-use-figjam/SKILL.md
packages/plugins/figma/skills/figma-use-motion/SKILL.md
packages/plugins/figma/skills/figma-use-slides/SKILL.md
.opencode/skills/app-e2e-tests/SKILL.md
.opencode/skills/component-tests/SKILL.md
.opencode/skills/effect/SKILL.md
.opencode/skills/tui-tests/SKILL.md
.opencode/skills/unit-tests/SKILL.md
packages/plugins/figma/skills/figma-design-to-code/SKILL.md
packages/plugins/figma/skills/figma-generate-design/SKILL.md
packages/plugins/figma/skills/figma-generate-diagram/SKILL.md
packages/plugins/figma/skills/figma-generate-library/SKILL.md
packages/plugins/figma/skills/figma-swiftui/SKILL.md
packages/plugins/figma/skills/figma-use/SKILL.md
packages/opencode/src/skill/memory/SKILL.md

Metadata

Files
0
Version
7e7488b
Hash
bb7bc48c
Indexed
2026-11-07 12:26

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-09 03:20
浙ICP备14020137号-1