by karlmoriaty
Axure RP 9/11 native prototype generator with an AI-native Studio canvas, CLI and MCP. Turn screenshots, briefs or RP/1 source into editable .rp files. Axure RP 9/11 原生原型生成器:把截图、需求或 RP/1 源码变成可继续编辑的 .rp。
# Add to your Claude Code skills
git clone https://github.com/karlmoriaty/AxureRP-return-rpGuides for using mcp servers skills like AxureRP-return-rp.
AxureRP-return-rp is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by karlmoriaty. Axure RP 9/11 native prototype generator with an AI-native Studio canvas, CLI and MCP. Turn screenshots, briefs or RP/1 source into editable .rp files. Axure RP 9/11 原生原型生成器:把截图、需求或 RP/1 源码变成可继续编辑的 .rp。. It has 50 GitHub stars.
AxureRP-return-rp's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/karlmoriaty/AxureRP-return-rp" and add it to your Claude Code skills directory (see the Installation section above). AxureRP-return-rp ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
AxureRP-return-rp is primarily written in TypeScript. It is open-source under karlmoriaty on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh AxureRP-return-rp against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
原作者 / 维护者:karlmoriaty(GitHub: https://github.com/karlmoriaty)· 问题反馈:[email protected]
完整 RP/1 原生表单与交互样式(2026-10-30 本机开发快照):radio / checkbox / combobox(别名 droplist)/ listbox,支持勾选、互斥组、选项初值、原生取值和重置;styles={"hover":{...},"selected":{...},"disabled":{...},"focused":{...}} 写入原生状态样式。动作 set-check、普通元件 set-selected、列表 set-option,详情与完整四页例子见 原生表单。使用 generate_prototype 完整编译;不要推定 Studio 局部入口也已支持。
新稿可用 studio_get_design_context({stage:"planning",intent,platform,target:{pageId},brief}) 一次取得版本绑定目标、适合任务的完整参考和下一步;局部改字使用 stage:"edit" 与版本绑定的明确目标。设计决定通过普通命令 recordDesignDecision 与改稿一起持久化,保留反馈来源及过期/冲突状态。详见 阶段创作与设计决定。
自由画布的新阶段上下文提供设计工艺与候选理由。命名版本支持恢复前看差异与可撤销恢复;长操作可在原候选/素材/导出入口传async/requestKey/baseRevision,断连后用studio_operations核对或取消。取消请求不等于已停,结果过期不提供当前稿提交建议。普通改属性不能修改id/type或内部源控制标记;创建节点仍需稳定ID。
自由画布从 studio_describe({topic:"workflow"}) 或 {topic:"rp1"} 开始,不必为画布创作通读下方完整原生 RP/1 参考。studio_apply_commands 接受 rp1 节点片段与 sourceMode:"insert"|"update":插入子树或只更新显式字段,保留未写出的内容与交互,复用同一版本、幂等和撤销事务。每个节点写稳定 #id。精确语法、支持范围和示例按需发现;不要将此局部入口当成完整 generate_prototype 编译器。
改稿前 studio_query_nodes 默认给8项可操作节点:target 指出源节点/实例覆盖/宏参数,layoutContext 说明父布局与 padding;使用 role/within/fields 精确查询,cursor 绑定当前版本。命令字段用 studio_describe({topic:"command",name:"editNodes"}) 查一个契约。学习、任务、图文及 mobile/web 题材可通过 studio_get_design_context({intent,platform,guideId?}) 取得原创配方;配方是创作材料,不是用户审美认可。回包未确认的写入不会自动重发,先读当前版本与实际内容。当前调用说明见 AI与RP/1创作。
自由构图探索可用 studio_design_explore({pageId,baseRevision,candidates,states}):提交1–4套 AI 自写命令,在隔离工程中真实点击并返回最多3态联系图,实际看图后用选稿的 applyWith 提交。默认保留内容与交互、源稿不变;仅初始态做像素检查。studio_get_design_context 的 authoring 返回节点、事件与验收签名。交互统一 on.click(兼容 onClick),隐藏父容器会隐藏后代;验收统一 action/expect,未知字段或零断言明确失败。完整可复制调用见 自由构图与多状态预演。
自由画布已支持关系与批量改稿:studio_apply_commands 的 editNodes 可按 role/type/文字/容器/ID 集合选择节点,执行 set、move、align、place、distribute;支持同事务 token 绑定和撤销。常规样式优先使用 token 与语义 role,重复内容优先考虑已有组件和动态状态。改稿前记录一次 studio_review_design,改稿后传 compareWithReviewId 可一次取得前后真实图片、变更图层和指标变化。编辑器顶栏也有「对照」入口。完整命令示例与边界见 关系编辑与画面对照。
Studio 的完整用法见 AI 创作流程。当前源码含 studio_describe、命名版本与长操作入口,共87个MCP工具、28个 studio_*;功能分支未发行新版本,已运行连接须核对指纹。studio_describe 的 workflow/rp1 返回交互指南、可执行三词例子与验证剧本;条件错误写前拒绝,场景回包包含分支实际值。原生出口支持普通文字跨页更新;输入框旋转使用原生加载动作,保留可输入性。精确边界见 AI 与 RP/1 创作。开始创作时先检查当前连接:若没有 studio_open_project,重新连接指向本安装目录 bin/mcp.mjs 的 MCP,或用 node bin/axure.mjs studio start --project /abs/project --source /abs/source.json 启动画布;旧连接里的59个工具不能代表已安装程序。
studio_get_design_context 选择 editorial、task 或 learning,明确每页的用户任务、必备内容、主操作和状态。栖羽仅是用户认可的摄影内容型参考;设备与学习应用尚无用户认可标杆。studio_prepare_media 保留原图、来源、焦点和裁切配方;返回的 registerCommand 与图片节点改动一起送入 studio_apply_commands,用当前 baseRevision 和唯一 idempotencyKey。先比较图框与原图比例;主体超出保护区时调整配方。studio_review_design({pageId,baseRevision}),实际查看返回的图片。随后用同一版本的 reviewId 提交具体 observations:涉及哪些节点、哪里有问题、怎样改。提交命令后重新截图。过期记录不能用于评价新版本。findings 只是机器检查,agent-reviewed 只是模型看图记录;不得把它们称为审美通过或用户认可。空态、无图、长文本、列表数量与连续操作分别验收,不支持的情况明确说明。.rp。分开报告浏览器、原生结构、Axure 加载/预览、GUI 手工编辑及用户视觉认可;不可用截图替代可编辑成品。Studio 开发版本的验收层级、真实浏览器/Axure操作与字体边界见 Studio 验收说明。12个语义模板与已配置操作脚本的真实场景分别计数;缺少操作或不支持的断言不能记为通过。
已有全局自定义样式可用 list_custom_styles 查询、rename_custom_style 级联改名、rebind_widgets 批量绑定。全局定义先在 Axure UI 创建并保存,不直接注入新 StyleSheet.CustomStyles;详见 样式工作流。
⚡ 零跳读声明:本文件已包含日常原型创作、单图视觉联审与增量改稿所需的全部 RP/1 语法、宏属性表、完整范例与 MCP 调用模板。日常从零做原型与改稿只需读完本文件即可直接动手,无需再翻阅
references/子文档或scripts/源码!
.rp1 源码(或直接选内置范例 recipe: "mobile-cards" | "list-detail" | "step-form"),调用 MCP generate_prototype:
{"source": "/abs/path/app.rp1", "output": "/abs/path/app.rp", "strictAudit": true}
autoHeal: false,与 CLI 一致;显式传 true 时尝试自愈,完整重验后回退引入新错误的变更,审计记录属性清单与回退原因,并产出 <output>.baseline.json。read_file 读取返回结果 previews 同目录下的 pages-sheet.png(或顶层 contactSheet 字段,全页面横向拼图)与 states-sheet.png(或顶层 statesSheet 字段,过滤内部合成态后的纯净动态面板状态拼图),无需逐页翻看单张 01-*.png。revise_prototype(保留原文件,输出新文件名或设 "output": "auto" 自动递增 -v2.rp):
{
"source": "/abs/path/app.rp1",
"rp": "/abs/path/app.rp",
"output": "/abs/path/app-v2.rp",
"operations": [
{"target": "home/hero", "property": "title", "value": "全新主标题"},
{"target": "home/nested_btn", "property": "text", "value": "面板内深层节点直改"},
{"op": "add", "path": "after:home/hero", "value": "list-item #item_new [fillxhug] tag=\"新增\" tagTone=\"brand\" title=\"结构级插入项\" subtitle=\"直接传 .rp1 片段\" rightBadge=\"待办\" rightTone=\"warning\" goto=\"detail\""},
{"op": "remove", "path": "home/old_id"},
{"path": "/palette/brand", "value": "#2563EB"}
]
}
target 支持 <page>/<id> 直接跨动态面板状态唯一定位深层子节点,也支持完整路径 <page>/<panel>/<state>/<id>。op: "add" 的 path 支持 "after:<page>/<sibling_id>"、"before:<page>/<sibling_id>" 或容器 "<page>/<container_id>",value 直接传 .rp1 文本片段。async: true,立即返回任务句柄,用 jobs_get({id}) 取 result;生成与改稿均支持,改稿可同时传 dryRun: true。成功改稿的预览、编译结果与报告位于 <output>.assets/,临时 .revision-* 自动删除。inspect / edit_text / rename_widget / set_widget_geometry / set_widget_style 的 target 接受 locate 返回的 {record,id,container} 对象或该对象的 JSON 文本。read_interactions 读取统一的 items 分页列表(页面事件、顶层/嵌套元件、母版);offset 是跳过条数,returned 是本次条数,按 nextOffset 继续。contained 仅列嵌套元件,为空不代表无交互;可用 widget: "page/id" 缩小范围。[fillxhug] 模式)[fillxhug](宽铺满、高按内容自动测量;panel 自动取最高 :state 高度),按钮/输入框写 [fillx44] 或 [120x44]。节点 ID 前的 # 可写可省略。fontSize 范围为 (0,120](含字号简写与 spans),letterSpacing 非负;after 必须引用同容器中的另一个节点,不存在会报 E_REFERENCE。未知属性、未知宏插槽名(slots)、progress-bar 同时声明 percent 与 value、以及对非 enum 字段声明 filters: "auto" 均返回 E_PROPERTY 错误,任何无法生效的声明或守卫(如 wizard-card 的 nextWhen)绝不静默丢弃。device=iphone-17(或顶层声明 device="iphone-17")即可自动匹配 402×874 屏幕与 442×914 钛金属外壳,推荐省略页面 [WxH]。strictAudit: true 零警告值):
gap / padding:0, 4, 6, 8, 10, 12, 16, 20, 24, 28, 32, 40, 48fontSize:11, 12, 13, 14, 15, 16, 18, 20, 22, 24, 28, 32, 36radius:0, 4, 6, 8, 10, 12, 14, 16, 20, 24, 28, 999| 类别 | 语法与全部核心属性(复制即用) |
|---|---|
| 顶层声明 | rp/1 target=9 name="应用名" domain=mobile theme=mobile-hifipalette: 下缩进写 $brand = "#10B981"(内置令牌:$bg, $surface, $surface-2, $border, $text, $muted, $brand, $brand-soft, $success, $warning, $error)var done: number = 2 或 var note: text = "默认备注" |
| 共享底栏 | 顶层写 tab-bar:,缩进写 item home "首页"(首参为目标 page 的 ID,次参为文案)。自动注入所有 phone-shell 页、高亮当前页并自动吸底固定(单页隐藏可在 phone-shell 加 tabBar=false)。 |
| 页面与外壳 | page #home name="首页" device=iphone-17 phone-shell #shell title="主标题" subtitle="副标题" gap=12 statusRight="5G 100%" |
指标卡行 stat-row |
stat-row #stats [fillxhug] gap=10 items=[{"label":"今日目标","value":"=var.done","sub":"已完成","color":"$brand"},{"label":"达标率","value":"85%","sub":"+5%","color":"$success"}] |
列表项 list-item |
list-item #row1 [fillxhug] tag="高频" tagTone="brand" title="主标题" subtitle="副标题说明" rightBadge="进行中" rightTone="success" goto="detail"(tagTone / rightTone 可选:brand | success | warning | error | neutral) |
内容卡 card |
一行内联模式:card #hero [fillxhug] padding=16 gap=8 tag="置顶" tagTone="brand" title="卡片标题" subtitle="副标题" body="自动折行正文内容" rightBadge="必做" rightTone="warning" actionText="立即前往" goto="detail"容器模式:card #box_card [fillxhug] padding=16 gap=10 后缩进写任意子元件。 |
多态面板 panel |
panel #view_panel [fillxhug] tabs=["清单视图","统计视图"]: 后缩进写 :state list 与 :state chart。每个 :state 下直接缩进写多个子元件(无需包 root 容器);tabs=[...] 自动在各态顶部生成对应高亮的分段切换栏。 |
进度条 progress-bar |
progress-bar #prog [fillxhug] value={"variable":"done"} max=5 label="完成进度" showValue=true barHeight=8(隐藏右侧数值设 showValue=false) |
| 基础元件 | - 单行/折行标签:label #lbl [fillxhug] "静态文字或 '=表达式'" fontSize=14 fontWeight=600 color=$text- 多行正文:paragraph #p [fillxhug] "长段落自动折行..." fontSize=14 lineHeight=22 color=$muted- 原生输入框:input #inp [fillx44] value="初始文本" placeholder="请输入..."(离线预览图直接渲染文本)- 按钮:button #btn [fillx44] "提交" variant=primary goto="detail"(variant 可选:primary/brand、secondary、outline、ghost、soft、danger/error、success、warning;可直接加 goto="页面ID" 跳页)- 布局盒:box #row_box [fillxhug] layout=row gap=8 padding=12 radius=12 fill=$surface(layout 可选 column | row | grid) |
| 事件与表达式 | 元件下缩进写 +onClick [...](动作数组):- 改变量:{"type":"set-variable","variable":"done","value":"=var.done + 1"}- 改文本:{"type":"set-text","target":"lbl","value":"='已记:' + @inp + ' (' + text(var.done) + ')'"}- 切面板:{"type":"set-panel-state","target":"view_panel","state":"chart"}- 跳页面:{"type":"link","page":"detail"}(亦支持别名 {"type":"goto","page":"detail"} 或 {"goto":"detail"})- 显隐控制:{"type":"show","target":"tip"} / {"type":"hide","target":"tip"}(节点初始隐藏可加属性 visible=false)表达式速记:读全局变量用 var.变量名,读同页输入框用 @输入框ID,拼接字符串用 ='前缀 ' + text(var.done) + ' 后缀'。 |
.rp1 模板rp/1 target=9 name="极速原型模板" domain=mobile theme=mobile-hifi
palette:
$brand = "#10B981"
var done: number = 2
var note: text = "晨间专注"
tab-bar:
item home "今日"
item detail "录入"
page #home name="今日总览" device=iphone-17
phone-shell #shell title="今日计划" subtitle="零手算流式布局示范" gap=12
stat-row #stats [fillxhug] gap=10 items=[{"label":"已完成","value":"=var.done","sub":"今日打卡","color":"$brand"},{"label":"专注主题","value":"=var.note","sub":"当前任务","color":"$success"}]
progress-bar #prog [fillxhug] value={"variable":"done"} max=5 label="今日目标进度" showValue=true barHeight=8
panel #main_panel [fillxhug] tabs=["待办清单","重点卡片"]:
:state list
list-item #item1 [fillxhug] tag="高频" tagTone="brand" title="核心概念主动回忆" subtitle="点击跳转录入页更新备注" rightBadge="进行中" rightTone="success" goto="detail"
list-item #item2 [fillxhug] tag="复盘" tagTone="warning" title="错题归因整理" subtitle="整理今日 3 道易错题" rightBadge="待办" rightTone="neutral" goto="detail"
:state focus
card #focus_card [fillxhug] padding=16 gap=8 tag="必做" tagTone="brand" title="深度专注 25 分钟" subtitle="番茄工作法" body="关闭通知干扰,完成一次完整的高强度知识检索。" rightBadge="推荐" rightTone="success" actionText="去打卡" goto="detail"
page #detail name="打卡录入" device=iphone-17
phone-shell #shell2 title="打卡与备注" subtitle="实时修改变量并跨页同步" gap=12
card #form_card [fillxhug] padding=16 gap=12
label #form_title [fillxhug] "更新当前专注主题" fontSize=16 fontWeight=600
input #note_inp [fillx44] value="晚间复盘" placeholder="输入新的专注主题..."
label #feedback [fillxhug] "='当前已打卡 ' + text(var.done) + ' 次,主题:' + var.note" fontSize=14 color=$muted
button #save_btn [fillx44] "打卡 +1 并同步主题" variant=primary
+onClick [{"type":"set-variable","variable":"done","value":"=var.done + 1"},{"type":"set-variable","variable":"note","value":"=@note_inp"},{"type":"set-text","target":"feedback","value":"='已更新!共 ' + text(var.done) + ' 次,主题:' + @note_inp"}]
视觉细节:单个 label 在 align=center justify=center 的 row/column 中默认居中(显式 align 优先);image.radius/opacity 写入图片 Alpha。导航可用 activeIndicator=underline|dot|none、activeVariant、justify、itemFlex,或让 phone-shell.tabBar 接完整 box。panel [fillxhug] 取所有状态的最大高度;状态拼图标注 viewport/content 尺寸。RP/1 暂无 fontFamily 和独立 previewInitial;字体、位图光效、初始态和导航示例见 视觉创作说明。
安全与证据原则:切勿覆盖用户原始 .rp(可用 AXURE_PROTECTED_PATHS / AXURE_WRITE_ROOT 限制);汇报时区分结构校验、Axure 打开、离线预览、GUI 编辑与保存重开。
按需扩展文档(仅在对应特殊任务时读取):
.rp:generate_from_image({image, output, scale, replace}) → screenshot-workflow.md.rp 检查/会话改名改字/三方同步:verify / locate / inspect / edit_text / rename_widget / sync_prototype → mcp-prototype.mddiagnose_prototype / explain_binding / runtime_info → authoring-workflow.mdTurn a screenshot, a brief or RP/1 source into a native .rp you can keep editing, not another prototype screenshot.
Axure RP 9 / RP 11 · AI-native canvas · CLI and MCP
Get started · Workflow · Screens · Studio · RP/1 · Version parity · FAQ · 简体中文
AI drafts. You decide. Axure finishes the job. Pages, components, variables and interactions live in a versionable RP/1 source file, then compile into a native project.
| You give it | You get back |
|---|---|
| A screenshot, a brief, a PRD, or RP/1 source | A native .rp, a browser preview, HTML / CSS / JS export, and structure plus acceptance reports |
| Most screenshot-to-code tools | return_rp | |
|---|---|---|
| Output | HTML, images or a non-editable mockup | A native .rp, plus HTML / CSS / JS export |
| Design source | One-shot output that is hard to diff | RP/1 text source you can version and revise by layer |
| Agent collaboration | Often regenerates the whole page | Queries and edits by layer, semantics and scope |
| Axure versions | Usually one version | Bidirectional RP 9 / RP 11 parity |
| Verification | Look at a screenshot | Structure checks + browser interactions + Axure save/reopen and preview |
flowchart TD
A["Screenshot / brief / PRD"] --> B["RP/1 design source"]
B --> C["Studio canvas"]
C --> D["Native .rp"]
C --> E["Browser preview"]
D --> F["Keep editing in Axure"]
E --> G["HTML / CSS / JS export"]
One real run, end to end: the Studio canvas, the compiled native .rp opened in Axure RP 9, the browser preview, and the interaction flow that ships with it.
AI drafts. Author through RP/1 or commands; query layers and make targeted changes. You refine. Double-click text, Shift-drag a marquee, hold Option / Alt to measure, undo and redo. Verify together. Inspect real screenshots and exercise interactions before delivery.
Studio workflow ↗ AI authoring ↗ Acceptance layers
RP/1 keeps pages, layout, components, variables and interactions together. Agents can target specific changes while the design keeps its structure, revision identity and a place to continue.
rp/1 target=9 name="Next encounter" domain=mobile theme=mobile-hifi
page #home name="Discover" device=iphone-17-pro
phone-shell #shell title="Meet your feathered neighbors." gap=16
card #bird [fillxhug] title="Kingfisher" body="A flash of blue." actionText="Record" goto="notes"
page #notes name="Journal" device=iphone-17-pro
phone-shell #shell title="My first field note" gap=16
input #note [fillx44] value="I spotted it by the water today."
button #back [fillx44] "Back to discovery" goto="home"
Grow a page into a complete flow, revise with revise_prototype, and merge supported native edits back into source.
RP/1 reference ↗ Examples ↗ Native roundtrip
| Continue in | What stays with you |
|---|---|
| Studio | A shared design document, transactions and undo history |
| Axure | Native objects and supported interactions to keep editing |
| The browser | Runnable previews, plus standalone HTML / CSS / JS export |
| Deliverable | Details |
|---|---|
Native .rp |
Targets RP 11 by default; use target=9 or AXURE_TARGET_VERSION=9 for RP 9 |
| Browser preview | Real interaction scenarios with clicks, navigation and state changes |
| Code export | Standalone HTML / CSS / JS for review or embedding |
| Structure and acceptance reports | Zero-error checks (zero unparseable records, dangling references and problems), browser assertions and Axure roundtrips recorded separately |
Pages, variables, dynamic panels and navigation ship together, alongside source, previews and verification reports.
Native export and sync ↗ Code export
Both versions share the same CLI, MCP and Studio. Anything one version can do will not end as unsupported on the other; gaps are registered and either warn at runtime or fail with an explicit diagnostic before writing. Nothing is silently dropped.
| Capability | RP 9 | RP 11 |
|---|---|---|
| RP/1 native compilation and scene writing | Supported | Supported |
| Blank template detection, trimming and dynamic panel cloning | Supported | Supported |
| Native form widgets and state styles | Supported | Supported |
| Native repeaters and data operations | Supported | Supported |
| Core interactions, actions and adaptive views | Supported | Supported |
| Local Studio RP/1 authoring | Supported | Supported |
| Automatic Axure preview (Swift / PowerShell host) | Supported | Supported |
| Offline image-to-native generation | Supported | Supported |
Registered boundaries are limited to a few cases: RP 11 has no panel registration chain model; RP 9 has no matching structure for zoom anchors, toggle-enabled state, apply-style actions and RP 11-only events/functions, so those fail with explicit diagnostics; RP 9 filter combo types and delete-repeater-row-by-index are rewritten as equivalent rules and marked partial.
Full capability matrix ↗ Capabilities and limits ↗ Troubleshooting
| Dependency | Version | Purpose |
|---|---|---|
| Node.js | 18+ | CLI, MCP, Studio and tests |
| Python | 3.10+ | Native compilation and image processing |
| Axure | RP 9 or RP 11 | Native generation, save/reopen and automatic preview (optional) |
git clone https://github.com/karlmoriaty/AxureRP-return-rp.git
cd AxureRP-return-rp
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
npm ci
Windows PowerShell:
git clone https://github.com/karlmoriaty/AxureRP-return-rp.git
cd AxureRP-return-rp
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
npm ci
You can also download return_rp-<version>-share.zip from Releases and run npm ci --ignore-scripts inside the extracted directory. The share package omits tests and private assets; native generation still needs local Axure and a blank project you saved yourself.
For CLI / MCP only, run directly from npm without cloning the repository (native generation and image processing still need the Python dependencies above):
npx -y -p return_rp return_rp --help
npx -y -p return_rp return_