{"data":{"slug":"github-figma-mcp-server-guide-skills-figquery-figma-shaders-8a5e78943eb5","title":"Create and Update Figma Shaders","summary":"Create and update shaders in Figma using the MCP server. This skill handles shader authoring, including effects and fills, and requires loading the skill before calling `create_shader` or `update_shader`.","url":"https:\/\/skillshunter.net\/skills\/github-figma-mcp-server-guide-skills-figquery-figma-shaders-8a5e78943eb5","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-figma-mcp-server-guide-skills-figquery-figma-shaders-8a5e78943eb5","markdown_url":"https:\/\/skillshunter.net\/skills\/github-figma-mcp-server-guide-skills-figquery-figma-shaders-8a5e78943eb5.md","download_url":"https:\/\/skillshunter.net\/skills\/github-figma-mcp-server-guide-skills-figquery-figma-shaders-8a5e78943eb5\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before calling `create_shader` or `update_shader`, load this skill. Identify the shader with `list_shaders`, then call `get_shader`. Use its `type` (`effect` or `fill`) as the required update kind. Read every source URI returned by `get_shader` before editing. If the client cannot read MCP resources, call it with `includeSource: true`. Treat those files as the current source of truth.","instructions":"---\nname: figma-shaders\ndescription: \"**MANDATORY prerequisite** \u2014 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.\"\ndisable-model-invocation: false\n---\n\n# Create and update Figma shaders\n\nLoad 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.\n\nShaders have two kinds:\n\n- `effect` samples and transforms the rendered layer beneath it. Use it for blur, distortion, glow, color grading, pixelation, halftone, or other post-processing.\n- `fill` generates pixels without an input raster. Use it for gradients, patterns, noise, textures, and procedural backgrounds.\n\nDo not silently switch kinds during an update. The `kind` passed to `update_shader` must match the existing shader.\n\n## Create workflow\n\n1. Decide whether the request is an effect or fill. Ask only when the visual intent does not resolve the distinction.\n2. Resolve `planKey`. Reuse one supplied by the user; otherwise call `whoami`. Use the sole eligible plan automatically, or ask the user to choose when several materially different plans are available.\n3. Call `create_shader` once with a concise name, description, selected `kind`, and `planKey`. This creates a starter scaffold, not the requested final shader.\n4. Call `get_shader` with the returned `id`, then read every source URI. If the client cannot read MCP resources, call `get_shader` with `includeSource: true` instead. This establishes the runtime imports and the scaffold's fixed metadata contract.\n5. Author the complete replacement `main.ts` for the requested result.\n6. Call `update_shader` with the returned `id`, the same `kind`, `files: [{ path: \"main.ts\", content: \"...\" }]`, and a specific `commitMessage`. Use `metadata` when changing the name, description, or animation capabilities. Set `metadata.isAnimated: true` when the source reads time-related frame inputs and `metadata.usesMouse: true` when it reads `frame.mousePosition`.\n\nNever stop after `create_shader`: the starter scaffold is only a structural starting point.\n\n## Update workflow\n\n1. Identify the shader with `list_shaders`, then call `get_shader`. Use its `type` (`effect` or `fill`) as the required update kind.\n2. Read every source URI returned by `get_shader` before editing. If the client cannot read MCP resources, call it with `includeSource: true`. Treat those files as the current source of truth.\n3. Preserve existing controls and behavior unless the user asks to change them.\n4. Call `update_shader` with the complete replacement `main.ts` in the `files` array, not a diff or partial fragment. An empty `files` array is valid only for a metadata-only update.\n\n## Authoring rules\n\n- Before writing the `main.ts` replacement, read [Shader source authoring](references\/authoring.md). It contains the required module shape, WebGPU lifecycle, supported parameter schemas, effect\/fill alpha rules, and WGSL failure checklist.\n- Match animation metadata to the source. Set `metadata.isAnimated: true` if `main.ts` reads `frame.time`, `frame.deltaTime`, or `frame.frame`, and set `metadata.usesMouse: true` if it reads `frame.mousePosition`. Set the corresponding value to `false` when removing the last such use. `update_shader` applies these metadata fields to the fixed `features.json` manifest even though that file cannot be replaced directly.\n- Prefer `frame.time` for animation so skipped frames do not change the result. It is an absolute millisecond clock; convert it to seconds with `Number(frame.time) * 0.001` when useful.\n- Expose controls for values users are likely to tune per layer; hardcode implementation details.\n- Keep numeric ranges bounded and defaults visually useful.\n- For effects, sample the input raster intentionally. For fills, do not assume an input raster exists.\n- Treat a non-error `update_shader` result as success. Record the returned version when present; a successful response may omit it.\n- 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.\n- 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.\n\n## Completion\n\nReport 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.\n\n`https:\/\/www.figma.com\/file\/new?try-tool-resource-content-id=<id>&try-tool-resource-type=<gen_effect|gen_fill>&type=design&mode=design`\n\nAfter 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.\n\nReplace the type placeholder with exactly one value; do not include angle brackets or the pipe in the returned URL.\n","use_cases":["Create a blur effect shader for a design layer.","Update a procedural fill shader to add animation.","Author a custom effect shader for color grading."],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/figma\/mcp-server-guide\/blob\/5f3024c3decd83ff6f0bfb3ef36a2c4cfbff961d\/skills-figquery\/figma-shaders\/SKILL.md","source_commit":"5f3024c3decd83ff6f0bfb3ef36a2c4cfbff961d","license":null,"version":null,"listing_approved_at":"2026-11-22","created_at":"2026-11-21T11:54:59.000000Z","updated_at":"2026-11-22T11:17:19.000000Z","seo_title":"Create and Update Figma Shaders","seo_description":"Learn how to create and update shaders in Figma using the MCP server. This skill covers shader authoring, including effects and fills.","seo_keywords":["create figma shader","update figma shader","figma shader authoring","figma effect shader","figma fill shader"]}}