
Description
**MANDATORY prerequisite** — load this skill before calling `create_shader` or `update_shader`. Use when the user asks to create, author, change, fix, or iterate on a shader effect, shader fill, custom effect, custom fill, or procedural shader in Figma.
SKILL.md
Create and update Figma shaders
Load this skill before every create_shader or update_shader call. It covers account-library shader authoring through the Figma MCP server. Reading or applying an existing shader does not require this skill.
Shaders have two kinds:
effectsamples and transforms the rendered layer beneath it. Use it for blur, distortion, glow, color grading, pixelation, halftone, or other post-processing.fillgenerates pixels without an input raster. Use it for gradients, patterns, noise, textures, and procedural backgrounds.
Do not silently switch kinds during an update. The kind passed to update_shader must match the existing shader.
Create workflow
- Decide whether the request is an effect or fill. Ask only when the visual intent does not resolve the distinction.
- 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_shaderonce with a concise name, description, selectedkind, andplanKey. This creates a starter scaffold, not the requested final shader. - Call
get_shaderwith the returnedid, then read every source URI. If the client cannot read MCP resources, callget_shaderwithincludeSource: trueinstead. This establishes the runtime imports and the scaffold's fixed metadata contract. - Author the complete replacement
main.tsfor the requested result. - Call
update_shaderwith the returnedid, the samekind,files: [{ path: "main.ts", content: "..." }], and a specificcommitMessage. Usemetadatawhen changing the name, description, or animation capabilities. Setmetadata.isAnimated: truewhen the source reads time-related frame inputs andmetadata.usesMouse: truewhen it readsframe.mousePosition.
Never stop after create_shader: the starter scaffold is only a structural starting point.
Update workflow
- Identify the shader with
list_shaders, then callget_shader. Use itstype(effectorfill) as the required update kind. - Read every source URI returned by
get_shaderbefore editing. If the client cannot read MCP resources, call it withincludeSource: true. Treat those files as the current source of truth. - Preserve existing controls and behavior unless the user asks to change them.
- Call
update_shaderwith the complete replacementmain.tsin thefilesarray, not a diff or partial fragment. An emptyfilesarray is valid only for a metadata-only update.
Authoring rules
- Before writing the
main.tsreplacement, read Shader source authoring. It contains the required module shape, WebGPU lifecycle, supported parameter schemas, effect/fill alpha rules, and WGSL failure checklist. - Match animation metadata to the source. Set
metadata.isAnimated: trueifmain.tsreadsframe.time,frame.deltaTime, orframe.frame, and setmetadata.usesMouse: trueif it readsframe.mousePosition. Set the corresponding value tofalsewhen removing the last such use.update_shaderapplies these metadata fields to the fixedfeatures.jsonmanifest even though that file cannot be replaced directly. - Prefer
frame.timefor animation so skipped frames do not change the result. It is an absolute millisecond clock; convert it to seconds withNumber(frame.time) * 0.001when useful. - Expose controls for values users are likely to tune per layer; hardcode implementation details.
- Keep numeric ranges bounded and defaults visually useful.
- For effects, sample the input raster intentionally. For fills, do not assume an input raster exists.
- Treat a non-error
update_shaderresult 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 shader.
- If the tool reports that animation or mouse input is unavailable, treat that as a terminal capability gate: do not retry or attempt to bypass it. Offer to author a static shader whose exposed properties can be keyframed in Motion mode instead.
Completion
Report the shader name, kind, and id, plus the returned version when present. Briefly identify the controls or behavior that were added. Construct and include a clickable URL that opens a new Design file with the unpublished shader ready to try, using the exact shader id as try-tool-resource-content-id. Set try-tool-resource-type from the shader kind: gen_effect for an effect and gen_fill for a fill.
https://www.figma.com/file/new?try-tool-resource-content-id=<id>&try-tool-resource-type=<gen_effect|gen_fill>&type=design&mode=design
After presenting the new-file link, ask whether the user wants to open the shader 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 resolved try-tool-resource-type query parameters to that URL. Never guess the file URL.
Replace the type placeholder with exactly one value; do not include angle brackets or the pipe in the returned URL.
More skills from the mcp-server-guide repository
View all 16 skillsfigma-code-connect
map Figma components to code snippets
Jul 31DesignDesign SystemFigmaFrontend +1figma-create-new-file
create new Figma or FigJam files
Apr 6DesignFigmaIdeationMCPfigma-design-to-code
implement Figma designs as code
Jul 10DesignFigmaFrontendUI Componentsfigma-generate-design
translate code layouts into Figma
Sep 4DesignFigmaFrontendUI Componentsfigma-generate-diagram
generate flowcharts and architecture diagrams in Figma
Apr 28ArchitectureDesignDiagramsFigma +1figma-generate-library
build Figma design systems from code
Sep 4DesignDesign SystemDocumentationFigma +1
More from Figma
View publisherfigma-generative-plugins
build reusable Figma generative plugins
mcp-server-guide
Sep 4CreativeDesignFigmaPlugin Developmentfigma-implement-motion
implement Figma animations in production code
mcp-server-guide
Jun 25AnimationDesignFigmaFrontendfigma-swiftui
translate between Figma designs and SwiftUI code
mcp-server-guide
Jun 9DesignFigmaFrontendiOS +3figma-use
initialize Figma tool usage
mcp-server-guide
Sep 4DesignFigmaMCPfigma-use-figjam
use Figma tools in FigJam context
mcp-server-guide
Sep 4CollaborationDesignFigJamFigma +1