Agent skill

Cm Miniprogram Engineer

by kingxiaozhe in kingxiaozhe/cm-workflow

微信小程序开发工程师 Skill,执行小程序开发任务,自动适配项目技术栈(原生小程序/Taro/uni-app 等),支持 Figma/Stitch 设计稿还原与云开发

MITAuto-check passedFrontend & Design

Install Cm Miniprogram Engineer

skills CLI
$ npx skills add kingxiaozhe/cm-workflow --skill cm-miniprogram-engineer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install kingxiaozhe/cm-workflow cm-miniprogram-engineer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/kingxiaozhe/cm-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cm-miniprogram-engineer .claude/skills/cm-miniprogram-engineer && rm -rf skills-src

Use ~/.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/

Facts

Skill name
cm-miniprogram-engineer
GitHub stars
104
Token cost
~1.2k tokens
SKILL.md length
311 words
Files
3 (incl. references)
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

微信小程序开发工程师 Skill,执行小程序开发任务,自动适配项目技术栈(原生小程序/Taro/uni-app 等),支持 Figma/Stitch 设计稿还原与云开发

  • Works in 5 steps: 设计稿检查 → 识别技术栈 → 读取上下文 → …
  • Frontend & Design work in your project
  • SKILL.md covers 触发条件, 工作流程, 常见坑 and 输出
  • Calls npm

What it does

Cm Miniprogram Engineer is an agent skill from kingxiaozhe/cm-workflow. 微信小程序开发工程师 Skill,执行小程序开发任务,自动适配项目技术栈(原生小程序/Taro/uni-app 等),支持 Figma/Stitch 设计稿还原与云开发

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/platform-readiness.md` and `references/release-checklist.md`).

It sits in Frontend & Design. It works with WeChat and Figma. The repository describes itself as: Codex-native, spec-driven AI Agent workflow with Claude Code compatibility, independent review, QA, fixes, and refactors. The licence is MIT.

When your agent uses it

  • Frontend & Design work in your project

Example prompts

  • “/cm-miniprogram-engineer”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. 设计稿检查
  2. 识别技术栈
  3. 读取上下文
  4. 开发
  5. 验证

What it can do on your machine

Read from SKILL.md and the folder at commit 971c231. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cm Miniprogram Engineer loads about 1.2k tokens when it runs, and up to ~3k if it reads all its reference files. Until then it costs about 27 tokens; SKILL.md has 311 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~27
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3k

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.

Safety

Auto-check passed

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from kingxiaozhe/cm-workflow at commit 971c231, republished under its MIT licence (© kingxiaozhe). 311 words, ~1,225 tokens.

Download SKILL.mdSave it as .claude/skills/cm-miniprogram-engineer/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
cm-miniprogram-engineer
description
微信小程序开发工程师 Skill,执行小程序开发任务,自动适配项目技术栈(原生小程序/Taro/uni-app 等),支持 Figma/Stitch 设计稿还原与云开发

cm-miniprogram-engineer — 微信小程序开发工程师

执行微信小程序开发任务。自动识别项目技术栈,遵循项目 .claude/rules/ 中的规范。

涉及账号主体、类目、支付/广告、权限、云能力或首次发布准备时,读取 references/platform-readiness.md;执行 feature 完成 QA、真机走查或发布准备时, 读取 references/release-checklist.md。平台规则属于易变外部事实,按参考文件在当前 官方文档/后台查证,不把固定门槛或社区经验当作长期规则。

触发条件

由 /cm-ai 自动调用,当 task 涉及微信小程序开发时触发。

工作流程

0. 设计稿检查

开发前先读取已审批 design.md 的「设计基准」及 design-baseline/:

  • 已明确“无设计稿/无基准,按 design.md 自行实现” → 直接开发,不得重复询问
  • 有 Figma 链接 → 调用 figma mcp
  • 有 Stitch 项目 → 调用 stitch mcp
  • 只有设计基准字段缺失、链接与落盘基准不一致、或 specs 内信息规格缺失或互相矛盾 时才暂停询问;新输入会改变批准方案时停止并要求 $cm-prd --change,不在 N3 临时改规格

设计稿与业务的关系:

  • 设计稿存在且完整 → 按设计稿还原
  • 设计稿存在但不是明显的缺失 → 自行补全功能
  • 设计稿存在但与业务需求有明显差距或缺失页面 → 主动询问用户是否需要先还原设计稿再开发功能,等待用户回复后再继续
  • 已审批为没有设计稿 → 根据 design.md 和业务需求自行实现
1. 识别技术栈

读取项目配置自动判断,不做硬编码假设:

  • project.config.json / project.private.config.json → 项目类型、appid、编译配置
  • app.json → 页面路由、分包配置、tabBar、窗口表现、原生组件
  • package.json(如存在)→ 跨端框架(Taro / uni-app / mpvue / Remax...)、构建工具、依赖
  • 框架判断 → 原生小程序(WXML/WXSS/JS/JSON)还是跨端框架(Taro = React 语法、uni-app = Vue 语法)
  • 是否启用 云开发(cloudfunctions/ 目录、wx.cloud)

识别为微信小程序后记录 DELIVERY_SHAPE=wechat-miniprogram。平台就绪项缺失但只影响 后续提审时允许继续本地开发并保留待决;功能本身依赖未确认的平台能力时 BLOCKED, 不得用假 AppID、假资质或 Web target 绕过。

2. 读取上下文
  • .claude/rules/miniprogram.md、.claude/rules/coding-style.md(如存在)
  • design.md 中当前任务相关的模块设计
  • 扫描 pages/、components/ 了解现有页面与组件结构和命名规律
  • 重点扫描项目已有的自定义组件库(components/、miniprogram/components/ 等),了解哪些组件已封装可复用
  • 查看 app.json 的 usingComponents、是否引入第三方 UI 库(Vant Weapp / TDesign / WeUI / ColorUI)
3. 开发

组件封装与复用(重要):

  • 开发前先检查项目已有的自定义组件,能复用的绝不重写
  • 新建通用组件用 Component 构造器,放入项目约定的公共组件目录,并在 usingComponents 中按需引入
  • 业务组件和基础 UI 组件分层:基础组件不含业务逻辑,业务页面组合基础组件
  • 如果项目引入了第三方组件库(Vant Weapp / TDesign 小程序版 / WeUI 等),优先用库内组件,不自己造轮子

样式(WXSS):

  • 尺寸优先用 rpx 做多机型适配(750rpx = 屏幕宽度),避免写死 px
  • 颜色、圆角、间距等通过 WXSS 变量或公共样式文件统一管理,不硬编码具体值
  • 复用样式通过 @import 公共样式或组件封装,而非到处复制
  • 注意小程序 WXSS 不支持 部分 CSS 选择器(如 *、属性选择器有限),用 class 选择器为主

页面与组件开发:

  • 页面用 Page({}),组件用 Component({}),遵循项目已有模式
  • 生命周期:页面 onLoad/onShow/onReady/onHide/onUnload,组件 lifetimes.attached/ready/detached
  • data 更新统一走 setData,只更新变化的字段,避免一次性 setData 大对象
  • properties / observers / 事件命名跟随项目约定,文件命名(page/component 四件套 .wxml/.wxss/.js/.json)跟随项目已有规律

状态管理:

  • 识别项目使用的方案(globalData / mobx-miniprogram / Taro 用 Redux·Zustand / uni-app 用 Vuex·Pinia)
  • 简单局部状态用页面/组件原生 data
  • 跨页面共享参考 design.md 中的状态流转设计

数据请求:

  • 原生:wx.request(封装统一的 request 工具,处理 baseURL、token、loading、错误)
  • 云开发:云函数 wx.cloud.callFunction、云数据库 db.collection()
  • 基于 design.md 中的接口契约;后端未就绪 → 先写 mock,标注 // TODO: replace mock when API ready
  • 统一处理错误提示(wx.showToast)和 loading 状态(wx.showLoading)

路由与导航:

  • 页面注册在 app.json 的 pages,tabBar 页面用 wx.switchTab,普通页面 wx.navigateTo/wx.redirectTo/wx.navigateBack
  • 页面栈最多 10 层,注意深层跳转改用 redirect
  • 参数通过 query 传递(navigateTo({url:'/pages/x?id=1'})),大对象用全局或本地缓存

登录与授权:

  • 登录走 wx.login 拿 code → 后端换 openid/session;用户信息用 wx.getUserProfile(需用户点击触发)
  • 手机号、位置等敏感权限走对应的 open-type 按钮或 wx.authorize,处理拒绝授权的兜底
4. 验证
bash
# 跨端框架(如项目使用)按实际命令执行
npm run lint
npm run build:weapp   # Taro 示例;uni-app 为 npm run dev:mp-weixin
  • 原生小程序:在微信开发者工具中编译,确认无报错、页面渲染正常
  • 检查 真机预览(部分 API 与样式在真机和模拟器表现不同)
  • 读取项目配置与微信官方当前限制核对包体积;超限时配置分包、压缩资源或移至 CDN
  • 按 references/release-checklist.md 选择本 feature 相关专项;Web/H5 预览不得冒充 微信开发者工具或真机证据。工具、扫码或账号权限不可用时如实标记 BLOCKED/待人工

常见坑

问题处理
setData 频繁/数据量大导致卡顿只 setData 变化字段,避免在循环/滚动中高频调用,长列表用虚拟列表
px 写死导致机型适配错乱改用 rpx,必要时结合 wx.getSystemInfo 动态计算
getUserProfile 不触发/拿不到信息必须由用户点击事件直接调用,不能在 onLoad 等生命周期里自动调
包体积超过当前平台限制核对官方当前限制,配置 subpackages,图片走 CDN,移除未用资源
WXSS 选择器不生效小程序不支持部分 CSS 选择器,改用 class;组件样式隔离用 styleIsolation
自定义组件样式被隔离 / 穿透失败用 externalClasses 或 :host,跨组件样式用全局类并设置隔离选项
wx.request 域名报错在小程序后台配置合法域名(request/socket/uploadFile/downloadFile)
组件重复造轮子开发前先搜索项目已有组件与第三方 UI 库,grep 关键词
设计稿颜色/间距与项目 token 不一致扩展公共样式变量而非硬编码 hex 值
跨端框架语法误用(Taro≈React/uni≈Vue)先确认框架,按对应语法写,不混用

输出

  • 创建/修改的文件列表(含 .wxml/.wxss/.js/.json 四件套及 app.json 路由变更)
  • 验证结果(开发者工具编译 / lint + build)
  • 设计稿还原情况(如有设计稿)
  • 需要其他工种配合的事项(如后端接口、合法域名配置、云函数部署)

© kingxiaozhe, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/cm-miniprogram-engineer of kingxiaozhe/cm-workflow.

  • SKILL.md
  • references/platform-readiness.md
  • references/release-checklist.md

Open the folder on GitHubat commit 971c231

Compare with similar skills

Cm Miniprogram Engineer 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.

Cm Miniprogram Engineer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cm Miniprogram Engineer this skillkingxiaozhe/cm-workflow104—~1.2kAutomated safety check: PassMIT
Figma Design System Builderwarpdotdev/warp65k2 repos~4.4kAutomated safety check: PassAGPL-3.0
Figma use_figma Plugin API Ruleswarpdotdev/warp65k4 repos~4.4kAutomated safety check: PassAGPL-3.0
Figma Design to Codewarpdotdev/warp65k4 repos~2.9kAutomated safety check: PassAGPL-3.0
Figma Design System Rules Generatorwarpdotdev/warp65k3 repos~4.6kAutomated safety check: PassAGPL-3.0
Taro UI Guidejd-opensource/taro-ui4.7k—~1.3kAutomated safety check: PassMIT

Similar skills

  • Builds or updates a design system in Figma from a codebase in ordered phases: discovery, variables and tokens, components, theming and documentation, with checkpoints.

    65k GitHub starsUsed in 2 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Required groundwork before any use_figma call: the rules and reference files for running JavaScript in a Figma file through the Plugin API without common failures.

    65k GitHub starsUsed in 4 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Figma Design to Code

    warpdotdev/warp

    Turns a Figma frame or component into production code that matches the design, using the Figma MCP server and the project's own design system.

    65k GitHub starsUsed in 4 repos~2.9k tokens
    Frontend & DesignAuto-check passed
  • Creates project-specific design system rules from your codebase so coding agents implement Figma designs with your components, naming and tokens.

    65k GitHub starsUsed in 3 repos~4.6k tokens
    Frontend & DesignAuto-check passed
  • Taro UI Guide

    jd-opensource/taro-ui

    Guides installing, configuring, styling and using taro-ui (At* components) in Taro apps for WeChat, Alipay, H5 and React Native.

    4.7k GitHub stars~1.3k tokensUpdated 12 days ago
    Frontend & DesignAuto-check passed
  • Maps published Figma components to their code implementations with Code Connect, using the Figma MCP suggestion and mapping tools.

    65k GitHub starsUsed in 2 repos~4.2k tokens
    Frontend & DesignAuto-check passed

More from kingxiaozhe/cm-workflow

All 23 skills in this repo
  • Cm AI

    kingxiaozhe/cm-workflow

    用户明确说“规格已确认,开始实现”或要求按已审批 CM specs 开发时使用。新任务默认由 JS workflow 驱动 N1-N8,完成开发、独立审查、QA 与文档同步;模糊点子、未审规格和单独一句“继续”不能触发编码批准。

    104 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Cm Check

    kingxiaozhe/cm-workflow

    用户说“检查工作流是否安装正确”“为什么找不到 cm 命令”时使用。默认查询 npm 稳定版,有新版自动升级已管理的 CM 安装,再检查插件、核心 Skills、兼容包装与模板引用;不测试或修改业务代码。

    104 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Cm Fix

    kingxiaozhe/cm-workflow

    用户说“修复这个可复现 bug”或要求根据失败报告修代码时使用。执行红灯测试、根因定位、最小修复、独立审查和回归;尚未确认的问题先用 cm-test,新功能和架构重设计转交 cm-prd。

    104 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Cm Idea

    kingxiaozhe/cm-workflow

    用户说“我有个点子”“帮我梳理产品”或需要先聊清目标时使用。通过逐题访谈整理为可交给 cm-prd 的 PRD;已有明确需求文档时改用 cm-prd,不写代码、不拆开发任务。

    104 GitHub stars~419 tokensUpdated yesterday
    Auto-check passed
  • Cm Init

    kingxiaozhe/cm-workflow

    用户说“第一次接管这个项目”“分析仓库并生成项目规则”时使用。分析已有代码并生成 Codex AGENTS.md 与 CM/Claude 兼容规则;仅适用于非空存量项目,不创建脚手架、不承接普通代码修改。

    104 GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Cm Prd

    kingxiaozhe/cm-workflow

    用户说“把需求拆成可开发规格”“变更现有功能需求”或要求整理方案、任务和验收时使用。支持新项目、存量二开与需求变更;完成后停在人审规格,不直接编码。

    104 GitHub stars~4.5k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Cm Miniprogram Engineer

What does Cm Miniprogram Engineer do?

微信小程序开发工程师 Skill,执行小程序开发任务,自动适配项目技术栈(原生小程序/Taro/uni-app 等),支持 Figma/Stitch 设计稿还原与云开发. Cm Miniprogram Engineer is an agent skill from kingxiaozhe/cm-workflow.

When should I use Cm Miniprogram Engineer?

Cm Miniprogram Engineer fits situations like: frontend & Design work in your project.

How do I install Cm Miniprogram Engineer in Claude Code?

Run `npx skills add kingxiaozhe/cm-workflow --skill cm-miniprogram-engineer -a claude-code`. Or copy the skill folder (skills/cm-miniprogram-engineer in kingxiaozhe/cm-workflow) into .claude/skills/cm-miniprogram-engineer in your project. Claude Code loads it when a task matches its description.

How do I install Cm Miniprogram Engineer in Codex?

Run `npx skills add kingxiaozhe/cm-workflow --skill cm-miniprogram-engineer -a codex`. Or copy the skill folder (skills/cm-miniprogram-engineer in kingxiaozhe/cm-workflow) into .agents/skills/cm-miniprogram-engineer in your project. Codex loads it when a task matches its description.

Can I use Cm Miniprogram Engineer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add kingxiaozhe/cm-workflow --skill cm-miniprogram-engineer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cm-miniprogram-engineer, .gemini/skills/cm-miniprogram-engineer, .github/skills/cm-miniprogram-engineer and .opencode/skills/cm-miniprogram-engineer in your project.

What does Cm Miniprogram Engineer need to run?

Going by SKILL.md and its folder, Cm Miniprogram Engineer needs the command-line tools its instructions call (npm).

Does Cm Miniprogram Engineer access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Cm Miniprogram Engineer safe to install?

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. Review the folder before installing.

What licence does Cm Miniprogram Engineer use?

Cm Miniprogram Engineer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cm Miniprogram Engineer use?

About 1.2k tokens (SKILL.md is roughly 4.9k 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 1.7k tokens, read only when the agent opens those files.

What are the alternatives to Cm Miniprogram Engineer?

Skills that share tags, products or a category with Cm Miniprogram Engineer: Figma Design System Builder (warpdotdev/warp, 65k stars), Figma use_figma Plugin API Rules (warpdotdev/warp, 65k stars), Figma Design to Code (warpdotdev/warp, 65k stars) and Figma Design System Rules Generator (warpdotdev/warp, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cm Miniprogram Engineer?

kingxiaozhe (a GitHub user) maintains it in kingxiaozhe/cm-workflow, which has 104 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on October 6, 2026.

Source: kingxiaozhe/cm-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.