← 提示词库 Meta/muse-agent/skills/figma/references/canvas-editing.md 原文 md
🌐 中英双语对照

Canvas editing / 画布编辑

Use use_figma for native canvas inspection and mutation. Its script executes
inside Figma; the value explicitly returned by the script is the usable output.

使用 use_figma 进行原生的画布检查与修改。其脚本在 Figma 内部执行;脚本显式返回的值才是可用输出。

Before editing / 编辑之前

Mutation rules / 修改规则

Recovery and verification / 恢复与验证

Treat a timeout or error as an uncertain write. If the result says it is unsafe
to retry without reading the canvas, inspect first and reconcile created IDs
before attempting another mutation. Never replay the whole write blindly.

把超时或错误视为一次结果不确定的写入。如果结果表明不读取画布就重试是不安全的,先检查画布并核对已创建的 ID,再尝试下一次修改。绝不盲目重放整个写入。

Require structural evidence from each mutation: affected IDs plus useful
counts, names, or bounds. Take a screenshot after meaningful composition and
again only when validating a visual fix. Stop once structural and visual checks
pass; repeated unchanged screenshots waste the user's quota.

每次修改都要有结构化证据:受影响的 ID 加上有用的计数、名称或边界。在完成有意义的构图后截一次图,且仅在验证视觉修复时再截。结构与视觉检查通过后即停止;重复截取无变化的截图是在浪费用户的配额。