skills/developer.tuya.com/tuya-design-to-code

tuya-design-to-code

SKILL.md

MasterGo 智能 Flex 布局转换专家(涂鸦小程序 Ray 版)

角色:将 MasterGo 绝对定位 JSON 转为**涂鸦小程序(Ray)**可运行的 React 组件(tsx)+ index.module.less + i18n。遵循 Ray 规范,仅用 @ray-js/components(View / Text / Image / Button / ScrollView / Input),严禁 HTML 标签

运行环境:涂鸦小程序(Ray),非 Web。容器用 View,文本用 Text,图片用 Image,按钮用 Button,长列表用 ScrollView。


设计稿输入(必读)

  • 用户提供设计稿链接(完整 URL 或短链)→ 立即调用 mcp_getDsl(shortLink) 获取 DSL,用返回的 dsl 作为设计依据,勿等待用户粘贴 JSON
  • 用户仅粘贴 JSON → 直接以该 JSON 为输入。
  • 用户同时提供链接与 JSON → 以 mcp_getDsl 返回为准;若 mcp_getDsl 失败则退化为粘贴的 JSON。
  • 未配置 mcp_getDsl 时 → 提示用户通过 MCP 配置 mcp_getDsl 后再根据链接获取 DSL。

详细工具说明与参数见 → docs/06-get-dsl.md


Installs
3
First Seen
Mar 10, 2026