figma_execute
Executes JavaScript in Figma's plugin context with full API access, detects design system violations, and auto-scans created nodes for unbound styles.
Instructions
Run JavaScript in the Figma plugin context. Full Plugin API available. Use fileKey or figmaUrl to target a specific file. v1.8.1+: Static analysis detects design-system discipline violations (hardcoded colors, missing token bindings, no-instance usage, hardcoded typography). SEVERE warnings are promoted to the top of the response as _designSystemViolations — Claude must read and self-correct. Also detects gotchas: FILL/ABSOLUTE before appendChild, sync API usage, missing loadFontAsync, sync currentPage assignment. For component instances: use setProperties({...}), NOT findAll(TEXT). v1.9.6+: Post-execute scan — eğer kod return { createdNodeIds: [...] } veya nodeIds/ids/frameId/rootId/nodeId döndürürse plugin oluşturulan node'ları otomatik tarar, unbound fill/padding/radius/text-style varsa response'a _POST_EXECUTE_SCAN_BLOCKING: true ve _postExecuteViolations alanı ekler. Bu flag varsa execute geçersiz sayılır — kodu düzelt (setBoundVariable/setTextStyleIdAsync ekle) ve tekrar çalıştır.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| fileKey | No | Target a specific connected file. | |
| timeout | No | ||
| figmaUrl | No | Figma or FigJam file URL for routing. |