About mastergo-magic-skill
mastergo-magic-skill guides MasterGo workflows for generating prototypes and turning designs into code. It is for tasks that move between design files and frontend implementation, with checks for inputs, tool selection, and output defaults.
Key features
- 01Convert page requirements to HTML and sync to MasterGo
- 02Retrieve code and assets from designs
- 03Select MCP tools by task type
- 04Validate links, layers, and document parameters
- 05Provide defaults for prototypes and code generation
Use cases
- 01Create an admin prototype from page requirements
- 02Extract frontend code from a MasterGo design
- 03Resolve links missing a layer_id
MCP support
Guides use of mcp__C2d and mcp__getD2c, and requires checking MCP tool parameter schemas before calling them.
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ superproxy/ skills --skill mastergo-magic-skillAfter installing, type/mastergo-magic-skillin Claude Code to confirm it loaded.
Bundled filesexamples.mdreadme.md
Details
From the project READMEMasterGo Magic MCP 工作流
用于两类任务:
- 原型生成(C2D):把页面需求转为 HTML 并同步到 MasterGo 设计稿。
- 设计稿转代码(D2C):从 MasterGo 设计稿拉取代码与资源落盘。
输入优先级
shortLink(优先,建议goto或含layer_id的链接)fileId + layerId- 仅
fileId(不稳定,通常仍需layerId)
若缺 layerId,必须向用户索取含 layer_id 的链接或直接索取 layerId。
执行步骤
- 先读工具 schema:调用 MCP 前先确认工具参数要求。
- 识别任务类型:
- 用户说“生成原型图/页面原型” => 用
mcp__C2d - 用户说“生成前端代码/落盘资源” => 用
mcp__getD2c
- 用户说“生成原型图/页面原型” => 用
- 参数校验:
- C2D:至少要
data,并尽量带shortLink或fileId - D2C:必须
contentId + documentId
- C2D:至少要
- 错误分流:
10003:token 或权限问题(团队版编辑/研发席位、文件编辑权限)Could not extract layerId from URL:链接缺layer_id
- 输出结果:
- 说明是否成功
- 若失败,给最短下一步(补参数或修权限)
原型生成默认规范(C2D)
- 目标:中保真后台页面
- 桌面端默认宽度:
1440 - 默认主色:
#1677FF - 结构:页面头部、筛选区、表格区、批量操作、分页
- 组件命名建议:
FilterBar、StudentTable、StudentFormModal
设计稿转代码默认规范(D2C 后续代码)
- 框架默认:
Vue 3 - 样式要求:严格遵循设计稿参数,优先
rem适配 - 结构要求:按模块组件化拆分
- 资源要求:图标/图片落到
assets - 兼容目标:Chrome 90+ / Edge 90+ / Safari 14+
- 若设计细节不明确,先问用户再继续
参考示例
见同目录 examples.md 与 说明.md。
Comments
Markdown supported