This skill ships inside the Figma Plugin plugin — install the plugin and you also get an MCP server.
Needs Figma's MCP server and a Figma account. Set that up first — this skill doesn't include it.
WHEN YOUR AGENT SHOULD USE IT
USE FOR
- Get a one-button plugin for a repetitive design chore you describe in words.
- Change the controls or behaviour of a plugin you made earlier, keeping the rest.
- Open a new design file with your unpublished plugin ready to try.
- Try a freshly made plugin inside a design file you already have.
DO NOT USE FOR
- Plugins that must sign in to another service with a key or token; plugin code is readable by others.
Documents
This is the playbook your agent receives when the skill activates — you don't need to read it to use the skill, but it's here to audit before installing.
Create and update generative Figma plugins
Load this skill before every create_generative_plugin or update_generative_plugin call. In user-facing language, call the result a “plugin.” The “generative” qualifier only distinguishes this account-library tool from other plugin systems.
Preflight
Before authoring, confirm the request fits this surface:
- Plugins run in the Figma Design editor.
- Every plugin must provide functional UI for its core workflow. A plugin with no configurable inputs still needs a clear primary action and useful status or validation feedback.
- Never embed API keys, OAuth tokens, signed URLs, or other secrets. Plugin source is readable by people who can access it. For authenticated integrations, stop and offer a static dataset, a public no-auth endpoint, or a different architecture.
Create workflow
- Resolve the requested workflow and its useful controls. Ask a concise question only if required inputs or behavior are genuinely ambiguous.
- Resolve
planKey. Reuse one supplied by the user; otherwise callwhoami. Use the sole eligible plan automatically, or ask the user to choose when several materially different plans are available. - Call
create_generative_pluginonce with a concise name, description, andplanKey. This creates a runnable square-drawing scaffold, not the requested final plugin. - Call
get_generative_pluginwith the returnedid, then read every source URI. This establishes the scaffold's manifest, UI message contract, and current TypeScript entrypoint. - Replace the scaffold with complete authored files for the requested behavior and UI.
- Call
update_generative_pluginwith the returnedid, afilesarray containing complete replacements forcode.tsand, when the UI changes,ui.html, plus a specificcommitMessage. Usemetadatawhen changing the name or description.
Never stop after create_generative_plugin: the starter must be replaced with the requested experience.
Update workflow
- Identify the plugin. If needed, call
list_generative_plugins, thenget_generative_plugin. - Read every source URI returned by the get tool before editing. Treat those files as the current source of truth.
- Preserve existing UI, controls, relaunch behavior, validation, and user-visible affordances unless the user asks to change them.
- Call
update_generative_pluginwith complete replacement content for every changed existing file. Use{ path: "code.ts", content: "..." }for the entrypoint and{ path: "ui.html", content: "..." }for the UI. Unspecified files are preserved.
Authoring rules
- Before writing replacement files, read Plugin source authoring. It covers the file replacement contract, UI/message lifecycle, PropsKit controls, dynamic-page compatibility, fonts, relaunch behavior, bounded work, geometry, and Plugin API gotchas.
- Keep the plugin’s primary action obvious and make invalid selection or input states understandable.
update_generative_plugincan replace existingcode.tsandui.htmlfiles, but cannot replacemanifest.jsonor create new files. Keepfigma.showUI(__html__, ...)incode.tsand replaceui.htmlwhen the requested workflow needs different controls.- Avoid destructive canvas changes unless they are the explicit purpose of the plugin and the UI makes that clear.
- Do not close before asynchronous work and UI messages have completed.
- Treat a non-error
update_generative_pluginresult as success. Record the returned version when present; a successful response may omit it. - On a build error, use the returned compiler output to make the smallest source correction and retry once. If it still fails, surface the error instead of repeatedly rewriting the plugin.
Completion
Report the plugin name and id, plus the returned version when present and a short description of its UI and primary action. Construct and include a clickable URL that opens a new Design file with the unpublished plugin ready to try, using the exact plugin id as try-tool-resource-content-id:
https://www.figma.com/file/new?try-tool-resource-content-id=<id>&try-tool-resource-type=gen_tool&type=design&mode=design
After presenting the new-file link, ask whether the user wants to open the plugin in an existing Figma Design file instead. If yes, reuse a file URL already provided or ask for one, then add the same try-tool-resource-content-id and try-tool-resource-type query parameters to that URL. Never guess the file URL.
Installation
npx skills add figma/mcp-server-guide --skill "figma-generative-plugins" --full-depthRun this in your project — your agent picks the skill up automatically.
BEFORE IT WILL WORK
1 FOR YOU- 01Connect Figma's MCP server and sign in to your Figma account
Connect the Figma MCP server; plugins are created under a Figma plan (planKey), taken from whoami or chosen by you when several eligible plans exist.
