Uniapp App Generate Skill
jiushiwon/wg-skills
This skill should be used when the user wants to create a standardized uni-app project for WeChat mini-program, H5, and App from scratch.
Mpx 跨端输出 RN(简称 Mpx2RN 或 Mpx2DRN)的开发适配指南,覆盖模板、脚本、样式、JSON 配置四大维度。当用户进行 Mpx2RN 相关任务时强制调用,包括但不限于:技术方案设计、页面 / 组件的开发迭代、旧项目跨端适配改造、编译和运行时报错排查、Code Review 等。当用户问题不涉及 Mpx2RN 时不应调用,如 Mpx 小程序开发问题,RN…
$ npx skills add didi/mpx --skill mpx2rn -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install didi/mpx mpx2rn --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/didi/mpx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/mpx2rn .claude/skills/mpx2rn && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "mpx2rn" agent skill from https://github.com/didi/mpx/tree/master/.agents/skills/mpx2rn into .claude/skills/mpx2rn/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mpx2rn", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/didi/mpx/tree/master/.agents/skills/mpx2rnType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add didi/mpx --skill mpx2rn -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install didi/mpx mpx2rn --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/didi/mpx.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/mpx2rn .agents/skills/mpx2rn && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mpx2rn" agent skill from https://github.com/didi/mpx/tree/master/.agents/skills/mpx2rn into .agents/skills/mpx2rn/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mpx2rn", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add didi/mpx --skill mpx2rn -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install didi/mpx mpx2rn --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/didi/mpx.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/mpx2rn .cursor/skills/mpx2rn && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "mpx2rn" agent skill from https://github.com/didi/mpx/tree/master/.agents/skills/mpx2rn into .cursor/skills/mpx2rn/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mpx2rn", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/didi/mpx.git --path .agents/skills/mpx2rn--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add didi/mpx --skill mpx2rn -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install didi/mpx mpx2rn --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/didi/mpx.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/mpx2rn .gemini/skills/mpx2rn && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "mpx2rn" agent skill from https://github.com/didi/mpx/tree/master/.agents/skills/mpx2rn into .gemini/skills/mpx2rn/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mpx2rn", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install didi/mpx mpx2rnInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add didi/mpx --skill mpx2rn -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/didi/mpx.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/mpx2rn .github/skills/mpx2rn && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "mpx2rn" agent skill from https://github.com/didi/mpx/tree/master/.agents/skills/mpx2rn into .github/skills/mpx2rn/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mpx2rn", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add didi/mpx --skill mpx2rn -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install didi/mpx mpx2rn --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/didi/mpx.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/mpx2rn .opencode/skills/mpx2rn && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "mpx2rn" agent skill from https://github.com/didi/mpx/tree/master/.agents/skills/mpx2rn into .opencode/skills/mpx2rn/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mpx2rn", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
mpx2rnMpx 跨端输出 RN(简称 Mpx2RN 或 Mpx2DRN)的开发适配指南,覆盖模板、脚本、样式、JSON 配置四大维度。当用户进行 Mpx2RN 相关任务时强制调用,包括但不限于:技术方案设计、页面 / 组件的开发迭代、旧项目跨端适配改造、编译和运行时报错排查、Code Review 等。当用户问题不涉及 Mpx2RN 时不应调用,如 Mpx 小程序开发问题,RN…
Mpx2rn is an agent skill from didi/mpx. Mpx 跨端输出 RN(简称 Mpx2RN 或 Mpx2DRN)的开发适配指南,覆盖模板、脚本、样式、JSON 配置四大维度。当用户进行 Mpx2RN 相关任务时强制调用,包括但不限于:技术方案设计、页面 / 组件的开发迭代、旧项目跨端适配改造、编译和运行时报错排查、Code Review 等。当用户问题不涉及 Mpx2RN 时不应调用,如 Mpx 小程序开发问题,RN 原生开发问题、Mpx2Web 相关问题等。
Its SKILL.md is about 3.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 16 other files, including scripts and reference files (for example `references/conditional-compile.md`, `references/project-structure-and-single-file-component.md` and `references/rn-api-reference.md`).
It sits in Development. It works with WeChat and Vue.js. The repository describes itself as: Mpx,一款具有优秀开发体验和深度性能优化的增强型跨端小程序框架. The licence is Apache-2.0.
8 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e2a7612. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 3 files in scripts/ (JavaScript), which the agent can run.
Shell commands in SKILL.md call:
nodenpxFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Mpx2rn loads about 3.7k tokens when it runs, and up to ~90k if it reads all its reference files. Until then it costs about 54 tokens; SKILL.md has 953 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from didi/mpx at commit e2a7612, republished under its Apache-2.0 licence (© didi). 953 words, ~3,683 tokens.
.claude/skills/mpx2rn/SKILL.md (or your agent's skills folder). This skill also uses 14 other files; get the full folder from GitHub.Mpx 是一个以微信小程序语法为基础、进行了类 Vue 语法拓展支持的跨端开发框架,支持将同一套代码输出到小程序(微信、支付宝、百度等)、Web 和 React Native 平台。Mpx2RN 在编译时和运行时对模板、脚本、样式与 JSON 配置四大维度的开发能力进行了全面抹平,但与小程序、Web 平台仍存在一定能力差异。
本 SKILL 是 Mpx2RN 开发适配的统一指南,覆盖模板、脚本、样式、JSON 配置四大维度。涉及 Mpx2RN 的任务均应在动笔前阅读本 SKILL 的 Mpx2RN 跨端开发约束,包括但不限于:
.mpx 页面与组件(参见下文任务二);以下场景与 Mpx2RN 无关,不应调用本 SKILL:
| 知识库 | 说明 |
|---|---|
| 项目结构与单文件组件 | Mpx 项目的典型目录、页面与组件注册关系,以及 .mpx 单文件组件的基本结构与语法 |
| 条件编译 | 模板、脚本、样式、JSON 等不同部分的条件编译语法,遇到无法跨端等效实现需分平台处理时读取 |
| 跨端输出 RN 模板能力参考 | 模板部分跨端能力详情:数据绑定、模板指令、事件、Slot、WXML 模板、i18n、无障碍访问、基础组件清单及其属性/事件支持情况 |
| 跨端输出 RN 脚本能力参考 | 脚本部分跨端能力详情:构造选项、生命周期、实例方法/属性、组合式 API、运行时导出、状态管理 |
| 跨端输出 RN 编译与运行时配置参考 | MpxWebpackPlugin 编译选项、编译期 rnConfig 与运行时 Mpx.config / Mpx.config.rnConfig;配置目标平台、基础组件替换、分包、导航或宿主能力时读取 |
| 跨端输出 RN 样式能力参考 | 样式部分跨端能力详情:选择器、单位、颜色、文本继承、CSS 变量、媒体查询、动画、背景图与逐项样式属性支持情况;明确查询某项样式能力是否支持时直接读取 |
| 跨端输出 RN 样式开发最佳实践 | 常用选择器与样式属性的跨端兼容方案;样式适配或开发时优先读取并直接应用命中的场景,未命中时再查样式能力参考 |
| Mpx2RN 原子 CSS 能力参考 | 基于 UnoCSS 的 RN 原子类接入、工具类、variants、directives 与 variant groups 支持范围、颜色透明度约束及编译排查;项目启用原子类或任务涉及 utility class 时读取 |
| 跨端输出 RN 环境 API 参考 | @mpxjs/api-proxy 提供的环境 API 跨端支持情况,涉及网络、存储、界面、设备、媒体、位置等 |
| 跨端输出 RN JSON 配置参考 | 应用、页面、组件三层 JSON 配置在 RN 平台的支持范围与差异 |
| Mpx 与 RN 混合开发 | 在 .mpx 内直接使用 React Native 组件、Hooks 的方式与跨端隔离方案 |
参考文档体量较大,不要一次性预读全部参考,按需取用即可:
SKILL.md;不要在动笔前预读 references 目录,完成实现后重新按本 SKILL 的跨端开发约束逐项核实。rn-style-practice.md)。rn-atomic-css.md;仅需核对底层样式属性时再补读 rn-style-reference.md,不要预读全部样式参考。rn-style-practice.md 的相关小节,存在命中场景则直接应用;未命中相关内容时,再读取 rn-style-reference.md 的相关小节获取更广泛的知识参考。只有当任务明确查询某项样式能力是否支持时,才直接读取 rn-style-reference.md。project-structure-and-single-file-component.md:仅当不熟悉 Mpx 项目结构、页面与组件注册关系或 SFC 基本结构时读取;已熟悉相关写法可跳过。无论是适配改造、新建组件还是 Code Review,都应遵循以下约束。开始实现前以本节指导开发,完成实现后再按本节逐项核实。
产物代码须在原平台与 RN 平台均能正常运行。引入 numberOfLines@ios|android|harmony、hairlineWidth 等仅 RN 生效的写法时,通过条件编译限定在 RN 输出,并同步保留原平台原有写法,避免 RN 适配造成原平台行为退化。
rnConfig.customBuiltInComponents 扩展了能力,以用户说明为准。onPullDownRefresh / onReachBottom / onPageScroll 不会触发;需要滚动时使用 scroll-view 及其等效能力。tap / longpress / touchstart / touchmove / touchend / touchcancel 使用冒泡和捕获语义。computed / wxs 实现;i18n 翻译函数除外。useI18n() 解构出的翻译函数以原名 t / tc / te / tm 暴露给模板,不要重命名。bindtap="handleTap('param')")传递,不要使用 data- dataset 属性绕行传参。text 显式包裹,避免依赖框架为 view 中的裸文字补节点;跨平台布局对齐方案见样式开发最佳实践 · text 跨平台布局对齐。class / style 使用 wx:class / wx:style 指令,不要在属性值内使用 {{}} 拼接。wx:ref,完成编译期映射。onShareTimeline / onTabItemTap / onAddToFavorites / onSaveExitState 等无默认驱动的声明须由业务提供适配并通过 implement 登记,或使用 remove: true 移除,不得仅登记便视为能力已实现。@mpxjs/api-proxy 提供的 mpx.xxx 调用环境能力,不要直接使用 wx.xxx / my.xxx;具体支持范围以环境 API 参考为准。若用户通过 custom 配置扩展了能力,以用户说明为准。@mpxjs/api-proxy 开启 usePromise 时,参与 Promise 化的异步 API 必须使用 await 或 .then() / .catch(),不得传入 success / fail 回调。详见环境 API 参考 · Promise 化。selectComponent / selectAllComponents / createSelectorQuery / createIntersectionObserver 等 selector API 仅使用 #id / .class,且对应模板节点须声明空 wx:ref。详见逻辑能力参考 · 页面 / 组件实例方法与属性。props / data / computed / methods / setup return / inject 等)不得使用 id / dataset / data,避免触发 reserved keyword of miniprogram 错误。<script setup> 显式暴露:模板引用的数据与方法须通过 defineExpose() 显式声明,不要暴露模板未使用的大型 store、RN 原生对象等无 UI 数据。calc()、媒体查询、rpx、颜色格式和文本继承等能力无需额外替换或条件编译。<template> 与 <script> 中的引用。逗号分隔的并列单类选择器可以直接使用。wx:class / wx:style 指令,不要在 class / style 属性中拼接 {{}} 插值表达式。enable-var / enable-text-pass-through / enable-background / enable-animation 在首次渲染时预声明;hover-class 的存在状态和 enable-animation 的动画类型在同一组件实例生命周期内保持稳定。仅普通值变化且能力类型始终存在时无需冗余预声明。详见样式开发最佳实践 · 按需样式能力预声明。key / wx:key;无法提供时,按所有可能能力的并集在每个可能复用的节点上添加 enable-* 预声明,避免复用前后改变 Hook 调用。grid / float 改为 Flex 布局。numberOfLines@ios|android|harmony;1rpx 极细线在原平台保留 1rpx 边框、RN 侧使用 hairlineWidth。/*use rpx*/ 与 /*use px*/ 注释,编译期会据此批量切换样式单位。safelist;颜色透明度使用 bg-red-500/50 等斜杠 alpha 语法,不要使用独立 *-opacity-* 组合。margin 简写与长写。仅对确认在原平台发生折叠且同一间距由两侧共同表达的节点,将折叠后的有效间距归到单侧;先排除 Flex / Grid、浮动、position: absolute/fixed、clearance、父子关系中的 BFC 与分隔条件、空块阻断条件等不折叠场景,无法确认时保持原样。详见样式开发最佳实践 · 处理垂直 margin 折叠。tabBar 等不支持字段通过条件编译隔离。<script name="json"> 并通过 __mpx_mode__ / __mpx_env__ 动态生成。disableScroll 设为 true,样式声明 page { height: 100%; },并使用开启 scroll-y 的 scroll-view 承载滚动内容。
- 原平台条件根据用户项目配置确定,一般为
__mpx_mode__ === 'wx' || __mpx_mode__ === 'ali' || __mpx_mode__ === 'web'。- RN 平台条件根据用户项目配置确定,一般为
__mpx_mode__ === 'ios' || __mpx_mode__ === 'android' || __mpx_mode__ === 'harmony'。
expected "indent", got "outdent" 等错误。/* @mpx-if (...) */,模板使用 wx:if="{{...}}" 或 @mode 属性后缀,脚本和 JSON 使用 if (__mpx_mode__ === ...);新增代码不要使用历史兼容语法 @_mode。详见条件编译。<template> 中使用的基础组件及其属性与事件逐一核对 RN 支持情况。class / style 是否使用了 {{}} 拼接字符串,统一改造为 wx:class / wx:style 指令绑定。<script> 中 selector 类 API 引用的节点是否声明空 wx:ref,未声明的须补齐。@mode / mpxTagName@mode)进行平台隔离,并添加 todo 注释记录差异原因。<script> 中的生命周期、构造选项、实例方法与环境 API 调用逐一核对 RN 支持情况。wx.xxx / my.xxx)统一替换为 mpx.xxx 接入 @mpxjs/api-proxy 抹平的实现。#id / .class 写法,并在对应模板节点添加空 wx:ref。todo 注释记录差异原因。sass / less / stylus 等支持嵌套写法的预处理语言,先将 <style> 中的嵌套选择器展开铺平为传统选择器写法,便于后续兼容性判断。<template> 与 <script> 中的类名引用。<style>、<template>、<script> 中命中的样式场景直接改造为跨端兼容的等效实现;未命中相关内容时,再读取 样式能力参考 的相关小节获取更广泛的知识参考。明确需要查询某项样式能力是否支持时,直接读取样式能力参考。<template> 中的实际相邻关系审计垂直 margin,并展开理解 margin 简写以及 margin-top / margin-bottom 长写。先按 样式开发最佳实践 · 处理垂直 margin 折叠 的反向约束排除 Flex / Grid、浮动、position: absolute/fixed、clearance,以及父子关系中的 BFC 与分隔条件;仅当确认原平台会发生 margin 折叠且同一间距由两侧共同表达时,才归到单侧并保留原平台折叠后的有效间距,避免 RN 将两侧数值叠加。不要只检查属性是否受 RN 支持,因为 margin 本身受支持但布局语义不同。todo 注释记录差异原因。<script type="application/json"> 或 <script name="json"> 中所用字段在 RN 平台的支持情况。<script name="json"> 形式,借助 __mpx_mode__ 进行 配置条件编译。npx eslint path/to/component.mpx),无 lint 错误与警告。hybrid-card.mpx / hybrid-card.ios.mpx),在独立文件中引入 react-native 依赖,避免原平台构建解析。@mode / mpxTagName@mode)隔离 RN 专属属性或少量节点。按 SFC 四个区块依次实现,全程遵循 Mpx2RN 跨端开发约束:
<template>:读取 模板能力参考,仅选用 RN 支持的基础组件、属性与事件;动态样式类名绑定使用 wx:class / wx:style;selector 类 API 涉及节点声明空 wx:ref。<script>:读取 逻辑能力参考 与 环境 API 参考,仅使用 RN 支持的生命周期、构造选项与 API;统一通过 mpx.xxx 调用环境能力。<script setup> 风格的组合式 API 编写逻辑,生命周期须在 <script setup> 顶层同步注册,详见 逻辑能力参考 · 组合式 API。@mpxjs/pinia:新项目、新状态域或与组合式 API 协同时,使用 @mpxjs/pinia(Pinia 风格);仅当工程已深度使用 @mpxjs/store(Vuex 风格)时继续维护沿用,避免同一业务域两套方案并存。详见 逻辑能力参考 · 状态管理。<style>:优先读取 样式开发最佳实践,从一开始就应用其中命中的单类选择器、Flex 布局、rpx 单位、hover-class 等跨端兼容写法;未命中相关内容时,再读取 样式能力参考 的相关小节。明确需要查询某项样式能力是否支持时,直接读取样式能力参考。项目启用 UnoCSS 时再读取 Mpx2RN 原子 CSS 能力参考,只使用 RN 支持的工具类与 variants。<script name="json"> 形式动态生成。脚本位置:编译校验脚本随本 skill 一同分发,位于 skill 目录下 的
scripts/compile-validate.js(即<skill-root>/scripts/compile-validate.js),下文所有命令示例均使用 指向 skill 目录的路径调用该脚本,不要尝试在宿主项目根目录或node_modules中查找它。
该脚本基于宿主项目内安装的 @mpxjs/mpx-cli-service 进行真实编译校验:会自动从输入 .mpx 文件向上探测宿主项目根目录、加载工程编译配置、按指定 target 进行编译,并按 style / template / script / json / dependency / other 分类聚合错误与警告。默认通过前置 loader 从目标文件中剥离 usingComponents,不解析或编译子组件,仅验证目标 .mpx 文件本身;因此默认不会校验子组件路径与配置。改造或新建组件后建议作为强制环节运行。
| 参数 | 默认 | 说明 |
|---|---|---|
<file.mpx>... | - | 一个或多个待校验的 .mpx 绝对/相对路径 |
--target=<mode> | ios | 编译目标,多个用逗号分隔(如 wx,ios,web) |
--type=<page|component> | component | 入口类型,决定使用 getPageEntry 还是 getComponentEntry |
--project-root=<path> | 自动探测 | 显式指定宿主项目根目录 |
--no-ignore-sub-components | 关闭 | 保留 usingComponents,解析并递归编译所有子组件 |
--json | 关闭 | 输出结构化 JSON 结果 |
退出码:0 校验通过(无错误、无警告);1 存在编译错误或警告;2 运行期异常(如未找到 @mpxjs/mpx-cli-service)。
下方示例中的
<skill-root>表示本 skill 在宿主环境中的实际安装路径(例如.agents/skills/mpx2rn、.claude/skills/mpx2rn或~/.claude/skills/mpx2rn等,以实际安装位置为准);调用时使用该绝对路径,不要在宿主项目根目录下查找scripts/compile-validate.js。
# 单组件、默认 target=ios
node <skill-root>/scripts/compile-validate.js src/components/foo.mpx
# 显式指定为页面
node <skill-root>/scripts/compile-validate.js src/pages/index.mpx --type=page --target=ios
# 跨端多目标校验
node <skill-root>/scripts/compile-validate.js src/components/foo.mpx --target=wx,ios,web
# 输出结构化 JSON 便于二次处理
node <skill-root>/scripts/compile-validate.js src/components/foo.mpx --target=ios --json
# 同时递归校验子组件(默认行为是仅校验目标自身)
node <skill-root>/scripts/compile-validate.js src/components/foo.mpx --target=ios --no-ignore-sub-components校验失败时按错误或警告的 category 字段回到对应任务步骤定位与修正问题,再次运行直至无错误、无警告。
© didi, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 14 other files (scripts, references) in .agents/skills/mpx2rn of didi/mpx.
Open the folder on GitHubat commit e2a7612
Mpx2rn next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Mpx2rn this skilldidi/mpx | 3.9k | — | ~3.7k | Automated safety check: Pass | Apache-2.0 | |
| Uniapp App Generate Skilljiushiwon/wg-skills | 110 | — | ~5k | Automated safety check: Notes | Apache-2.0 | |
| AI Model WebTencentCloudBase/CloudBase-AI-Toolkit | 1.1k | 2 repos | ~6.1k | Automated safety check: Notes | MIT | |
| AI Model Webmajiayu000/claude-skill-registry | 666 | 2 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Generate Release Notesteambit/bit | 18k | — | ~2.2k | Automated safety check: Pass | Custom licence | |
| Wagmi Feature Developmentwevm/wagmi | 6.8k | — | ~3.8k | Automated safety check: Pass | MIT |
jiushiwon/wg-skills
This skill should be used when the user wants to create a standardized uni-app project for WeChat mini-program, H5, and App from scratch.
TencentCloudBase/CloudBase-AI-Toolkit
A skill your agent uses when a browser/Web app (React, Vue, Next, Nuxt, static sites, SPAs, dashboards, AI chat UI, 页面, 前端, 网页) needs AI models via @cloudbase/js-sdk.
majiayu000/claude-skill-registry
A skill your agent uses when developing browser/Web applications (React/Vue/Angular, static websites, SPAs) that need AI capabilities.
teambit/bit
Generate comprehensive release notes for Bit from git commits and pull requests.
wevm/wagmi
Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.
teambit/bit
Work on the pnpm Rust engine (@pnpm/napi, the pacquet crates) that bit install runs through.
didi/mpx
审计存量 Mpx 项目迁移到“mode 只负责目标筛选、srcMode 只负责源码方言”的新版编译语义。只要用户提到升级 Mpx 后检查条件编译、排查 .ali/.swan 等条件文件、mode/src-mode 区块、@mode/@mode、modeRules/srcModeRules 或外部模板迁移,就应使用本 Skill;不用于与该语义变更无关的普通 Mpx 升级。
didi/mpx
Mpx 跨端输出 RN(简称 Mpx2RN 或 Mpx2DRN)的开发适配指南,覆盖模板、脚本、样式、JSON 配置四大维度。当用户进行 Mpx2RN 相关任务时强制调用,包括但不限于:技术方案设计、页面 / 组件的开发迭代、旧项目跨端适配改造、编译和运行时报错排查、Code Review 等。当用户问题不涉及 Mpx2RN 时不应调用,如 Mpx 小程序开发问题,RN…
didi/mpx
当用户要求评审循环、自评审工作流、planner/reviewer/coder/code-reviewer 协作、先方案后编码、多轮 Agent 评审,或要求稳定的子 Agent 工作流依次产出方案、等待用户确认、实现代码、评审差异并保留修订记录时,使用此 Skill。此 Skill 必须使用真实子 Agent,不得退化为单 Agent 角色扮演。
didi/mpx
通过查看当前最新版本与上一版本间的git提交记录与代码变更,生成版本变更日志,当用户询问“创建/生成变更日志”、“创建/生成changelog”时使用。
didi/mpx
Helps when network-related commands (like curl, git, npm, pip, brew) are failing, timing out, or running slowly due to network issues.
didi/mpx
将传统文档导向的 Procedural Skill 转换为紧凑的 Strategy Gene 格式。基于论文 "From Procedural Skills to Strategy Genes" 的 Gene Evolution Protocol (GEP),将 ~2500 token 的文档型 Skill 蒸馏为 ~200-300 token 的控制型 Gene 集合。当用户要求将…
Categories
Mpx 跨端输出 RN(简称 Mpx2RN 或 Mpx2DRN)的开发适配指南,覆盖模板、脚本、样式、JSON 配置四大维度。当用户进行 Mpx2RN 相关任务时强制调用,包括但不限于:技术方案设计、页面 / 组件的开发迭代、旧项目跨端适配改造、编译和运行时报错排查、Code Review 等。当用户问题不涉及 Mpx2RN 时不应调用,如 Mpx 小程序开发问题,RN…. Mpx2rn is an agent skill from didi/mpx.
Mpx2rn fits situations like: development work in your project.
Run `npx skills add didi/mpx --skill mpx2rn -a claude-code`. Or copy the skill folder (.agents/skills/mpx2rn in didi/mpx) into .claude/skills/mpx2rn in your project. Claude Code loads it when a task matches its description.
Run `npx skills add didi/mpx --skill mpx2rn -a codex`. Or copy the skill folder (.agents/skills/mpx2rn in didi/mpx) into .agents/skills/mpx2rn in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add didi/mpx --skill mpx2rn -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mpx2rn, .gemini/skills/mpx2rn, .github/skills/mpx2rn and .opencode/skills/mpx2rn in your project.
Going by SKILL.md and its folder, Mpx2rn needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node and npx). Our summary lists: Node.js.
SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Mpx2rn is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.7k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 86k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Mpx2rn: Uniapp App Generate Skill (jiushiwon/wg-skills, 110 stars), AI Model Web (TencentCloudBase/CloudBase-AI-Toolkit, 1.1k stars), AI Model Web (majiayu000/claude-skill-registry, 666 stars) and Generate Release Notes (teambit/bit, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
didi (a GitHub organization) maintains it in didi/mpx, which has 3,941 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on September 29, 2026.
Source: didi/mpx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.