Agent skill

Cm UI Engineer

by kingxiaozhe in kingxiaozhe/cm-workflow

UI 还原工程师 Skill,把已确认的设计基准像素级还原为生产代码(token 先行、原子顺序、按交付形态量化验收:Web 用 BackstopJS、App 用 Maestro+模拟器截图);有基准才出场,不做业务逻辑

MITAuto-check passedMobile

Install Cm UI Engineer

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

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

GitHub CLI
$ gh skill install kingxiaozhe/cm-workflow cm-ui-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-ui-engineer .claude/skills/cm-ui-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-ui-engineer
GitHub stars
104
Token cost
~1.1k tokens
SKILL.md length
281 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

UI 还原工程师 Skill,把已确认的设计基准像素级还原为生产代码(token 先行、原子顺序、按交付形态量化验收:Web 用 BackstopJS、App 用 Maestro+模拟器截图);有基准才出场,不做业务逻辑

  • Works in 6 steps: 读取基准 → Token 先行(共享状态纪律) → 原子顺序还原 → …
  • Tasks that involve Mobile testing and debugging
  • SKILL.md covers 出场条件(有基准才出场), 职责边界, 工作流程 and 常见坑, plus 1 more section
  • Calls npx

What it does

Cm UI Engineer is an agent skill from kingxiaozhe/cm-workflow. UI 还原工程师 Skill,把已确认的设计基准像素级还原为生产代码(token 先行、原子顺序、按交付形态量化验收:Web 用 BackstopJS、App 用 Maestro+模拟器截图);有基准才出场,不做业务逻辑

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Mobile testing and debugging. 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

  • Tasks that involve Mobile testing and debugging

Example prompts

  • “/cm-ui-engineer”

Requirements

  • Node.js

Workflow steps

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

  1. 读取基准
  2. Token 先行(共享状态纪律)
  3. 原子顺序还原
  4. 交互态核对
  5. 反 AI slop 与品牌资产纪律
  6. 量化验收(按 CLAUDE.md 交付形态选链,二选一)

What it can do on your machine

Read from SKILL.md and the folder at commit 82d43f0. 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:

    • npx

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

  • Network

    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.

  • 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 UI Engineer loads about 1.1k tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 281 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~31
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

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 82d43f0, republished under its MIT licence (© kingxiaozhe). 281 words, ~1,056 tokens.

Download SKILL.mdSave it as .claude/skills/cm-ui-engineer/SKILL.md (or your agent's skills folder).
name
cm-ui-engineer
description
UI 还原工程师 Skill,把已确认的设计基准像素级还原为生产代码(token 先行、原子顺序、按交付形态量化验收:Web 用 BackstopJS、App 用 Maestro+模拟器截图);有基准才出场,不做业务逻辑

cm-ui-engineer — UI 还原工程师

把设计基准工程化还原进项目代码库。管"像不像",不管"能不能用"——业务逻辑、状态、API 归 cm-frontend-engineer。

出场条件(有基准才出场)

仅当 feature 存在已确认的设计基准(specs/{N}.{feature}/design-baseline/,由 /cm-prd 阶段生成并经人审规格确认)时,才生成和执行 UI 还原任务。无基准 → 本角色不出场,UI 由前端按现有行为实现。

执行期零决策:方向确认已在规格期完成(人审规格时看过原型/基准),本 skill 执行时不得中途向用户征求设计意见;发现基准缺失或矛盾 → 上报,不脑补。

职责边界

  • 管:design token、纯展示组件(props 驱动)、静态页面结构、样式、资产、像素级验收
  • 不管:业务逻辑/状态/API(→ cm-frontend-engineer)、设计基准生成(→ /cm-prd 阶段)
  • 契约:组件契约(组件名 / props / 事件)写在 design.md,与前端的交接以此为准,适用三级契约协议(只报不改)

工作流程

1. 读取基准
  • specs/{N}.{feature}/design-baseline/:截图、导出的 HTML/CSS、token 提取物
  • 逐元素规格表(design-baseline/spec-sheet.json,prd 8.5 产出)——还原的对表依据,没有规格表不许开工看图猜值:基准可渲染(HTML/Stitch 导出)→ 从当前 Skill 向上解析 workflow root,用 {CM_WORKFLOW_ROOT}/templates/ui-lens/cm-ui-lens-extract.mjs 跑基准补一份;纯截图基准 → 色板精确采样、几何标「估算档」,汇报注明精度降级并建议人补设计源
  • design.md 的组件契约与基准路径
  • 不得修改基准文件;基准与需求矛盾 → 上报
2. Token 先行(共享状态纪律)

先建立/对齐 design token(颜色、间距、字号、圆角、阴影 → Tailwind theme 或 CSS 变量),后续所有组件只引用 token,不写裸值。

token 是跨 feature 共享状态:

  • 新增 token → 自由添加
  • 修改既有 token 值 → 按契约偏差处理:写入汇报「契约相关」栏,由主流程评估波及的已完成页面,必要时问人——绝不默默改(一个颜色值的变更会让已验收页面全部变样)
3. 原子顺序还原

token → 基础组件(按钮/输入框/标签)→ 组合组件(卡片/表单)→ 页面。不跳级——页面还原中发现缺基础组件,先补组件再拼页面。

  • 遵循项目组件目录约定,新组件入公共目录确保复用
  • 组件纯 props 驱动,不含业务逻辑;接口与 design.md 组件契约一致
  • 响应式:按基准标注的断点逐档实现,未标注的断点行为上报确认(规格期遗漏的补充问题)
3.5 环境对齐与页面内循环(值对齐才进像素验收)
  • 环境对齐前置(强制):design-baseline 内的基准字体文件在还原页先行加载;对比统一 viewport 与 DPR——环境不对齐时代码全对也能 diff 出 8%,执行者会被噪声逼到放弃或滥用白名单
  • 每页内循环:渲染 → lens-extract 提取还原页计算值 → 与规格表对差(字体五件套/色值/几何) → 修 → 复跑;计算值全对齐(或差异均有归因)才进第 6 步像素验收。像素级是迭代出来的,一次性生成只有八成;对表循环比像素对比快一个量级,BackstopJS 留作终验
  • 教义一句话:截图给人看,规格表给 AI 抄——看图估值天花板极低,抄表填值天花板是 100%(实跑反馈:还原度不理想的头号根因)
4. 交互态核对

先定交互模型再实现(防"看静态估行为",与§3.5"看图估值"同类根因):对滚动区/切换区/吸顶导航等动态区块,实现前先从基准交互走查清单认定其驱动方式——滚动驱动(IntersectionObserver/scroll-snap/sticky)、点击驱动、悬停、定时,四选一显式认定,禁止默认点击驱动。判错代价是整块重写而非改 CSS(把滚动驱动做成点击 tab、反之亦然)。清单未标注驱动方式 → 上报,不脑补。

对照基准中的状态设计(hover / active / disabled / loading / 空态 / 错误态)逐一实现。基准缺失的状态 → 上报(规格期应已确认过一轮,执行期仍缺失说明规格有洞)。

5. 反 AI slop 与品牌资产纪律
  • 品牌资产协议:logo、品牌色、字体一律使用基准中的真实资产文件,禁止凭记忆编造色值或找相似替代
  • 反 AI slop 清单(无基准细节可依时的兜底审美纪律):不用紫蓝渐变默认色、不用 emoji 充当图标、不无脑圆角+阴影卡片、间距用 token 刻度不用随机值
6. 量化验收(按 CLAUDE.md 交付形态选链,二选一)

Web / 小程序等浏览器可渲染产物 —— BackstopJS 链:

bash
npx backstop test   # reference = design-baseline 截图, test = 还原页面截图
  • 默认 mismatch ≤ 1%(.claude/rules/ 有规定时以 rules 为准)
  • 特殊效果(复杂渐变、毛玻璃、动效帧)白名单制:列明白名单项及理由,其余差异修复后复测
  • 逐断点跑一遍;差异报告随任务汇报输出,供 N6 可视化回归复用
  • 像素基准档的交互验收:按 design.md 提取的交互走查清单逐条 E2E 断言(跳转目标、状态切换、操作反馈)——UI 像了但交互不 1:1,同样是验收失败
  • 多镜头验收模式(像素基准档 且 页面 ≥2 时启用;单页小任务用上面的常规链即可):lens-extract 同脚本跑基准与还原页出双表 → 低配 agent 产分维度偏差表(字体/样式/布局/交互) → 高配裁决 agent 归并归因——跨页聚类:同维度同期望值的偏差出现 ≥2 页 = 上游缺陷,修 token/基础组件一处重渲,不逐页补(修规则不修产物的 UI 版);裁决的对抗职责:BackstopJS 每块 diff 热区必须被某条偏差解释,解释不了的热区 = 镜头盲区,先补镜头再信记分卡。产出分维度记分卡(像素 x% · 字体 n · 样式 n · 布局 n · 交互 n/m)与白名单表,凭证落 {SPECS_DIR}/.reviews/ui-{页面}-lens-r{轮次}.md,N6 可视化回归复用;修复循环 ≤2 轮仍不达标 → 上报

App(React Native / Expo)—— Maestro 链:

App 产物不在浏览器里,BackstopJS/Playwright 不适用;react-native-web 的浏览器渲染只可用于开发期快速目检,不作为任何验收证据。

  • 交互验收:Maestro flow(YAML)逐条断言 design.md 的交互走查清单(跳转目标、状态切换、操作反馈),在 iOS/Android 模拟器上执行
  • 像素验收:Maestro takeScreenshot 采集模拟器截图,与 design-baseline 截图分辨率对齐后逐屏对比(odiff/pixelmatch,默认 mismatch ≤ 1%,白名单制同上)
  • 环境降级:本机无模拟器或装不上 Maestro → 上报并降级为 Expo Go 真机人工对照(并排截图发人确认),METRICS 备注"App 像素验收降级"——不得静默改用浏览器截图充当验收

两条链共同要求:首个页面任务的汇报必须附"实现 vs 基准"并排截图(App 形态截图必须来自模拟器/真机)——人眼对照点前置到第一个页面完成时,不等全部做完(历史事故教训)

常见坑

问题处理
改全局 token 导致已验收页面变样修改既有 token 值必须走契约偏差上报,不默默改
硬编码 hex/px 绕过 token全部走 token 引用,review 时 grep 裸值
字体渲染差异导致像素对比误报对比容器锁定字体与尺寸,阈值内噪声不追
只还原了理想态交互态清单逐项核对,缺失上报
把滚动驱动区块做成点击 tab(或反之)实现前四选一认定交互模型,清单缺标注则上报,不默认点击驱动
组件 props 与前端预期不一致以 design.md 组件契约为准,偏差只报不改

输出

  • 创建/修改的文件列表(token / 组件 / 页面 / 资产)
  • BackstopJS 对比结果(各断点 mismatch 值 + 白名单项)
  • 契约相关:组件契约实现情况及偏差、token 变更清单(无则写"无")
  • 需要其他工种配合的事项(前端可接线的组件清单及 props)

© 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

Just SKILL.md in skills/cm-ui-engineer of kingxiaozhe/cm-workflow.

Open the folder on GitHubat commit 82d43f0

Compare with similar skills

Cm UI 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 UI Engineer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cm UI Engineer this skillkingxiaozhe/cm-workflow104—~1.1kAutomated safety check: PassMIT
Fieldworks Uia2 Parity Testingsillsdev/FieldWorks110—~1kAutomated safety check: PassCustom licence
UI Verificationmblode/agent-skills143—~3.5kAutomated safety check: PassMIT
Phone HarnessShawnPana/phone-harness3.2k—~4.3kAutomated safety check: PassMIT
Maa Issue Log AnalysisMaaAssistantArknights/MaaAssistantArknights24k—~4kAutomated safety check: PassAGPL-3.0
Mobile QAtloncorp/tlon-apps107—~2.4kAutomated safety check: PassMIT

Similar skills

  • Design or review FieldWorks UI automation and accessibility tests: UIA2, FlaUI, Appium, WinAppDriver, Avalonia.Headless, keyboard, focus, IME, and automation-id strategy.

    110 GitHub stars~1k tokensUpdated today
    MobileAuto-check passed
  • UI Verification

    mblode/agent-skills

    Runs scoped browser probes for focus, hit targets, overflow, themes, request failures, and performance attribution, with evidence linked to UI rule IDs.

    143 GitHub stars~3.5k tokensUpdated 2 days ago
    MobileAuto-check passed
  • Phone Harness

    ShawnPana/phone-harness

    Control the user's phone — an iPhone through the Mac's iPhone Mirroring window, an Android over adb, or a rented cloud Android: open apps, tap, type, swipe, read the screen.

    3.2k GitHub stars~4.3k tokensUpdated 10 days ago
    MobileAuto-check passed
  • Maa Issue Log Analysis

    MaaAssistantArknights/MaaAssistantArknights

    分析 MaaAssistantArknights 上游仓库公开 Issue(https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/...

    24k GitHub stars~4k tokensUpdated today
    MobileAuto-check passed
  • Mobile QA

    tloncorp/tlon-apps

    Run a mobile QA checklist on a physical Android device over adb for tlon-apps, then triage what fails into fixes.

    107 GitHub stars~2.4k tokensUpdated today
    MobileAuto-check passed
  • Store Listing Screenshots

    therxmv/Telegram-Themer

    Generate TelegramThemer's Play Store listing images — capture the 8 required app screenshots on a running emulator/device by driving the real UI with adb, then composite them into the final…

    119 GitHub stars~2.5k tokensUpdated 27 days ago
    MobileAuto-check passed

More from kingxiaozhe/cm-workflow

All 23 skills in this repo
  • Cm Fix

    kingxiaozhe/cm-workflow

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

    104 GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Cm Idea

    kingxiaozhe/cm-workflow

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

    104 GitHub starsUsed in 1 repo~419 tokens
    Auto-check passed
  • Cm Refactor

    kingxiaozhe/cm-workflow

    用户明确要求“只整理结构,不改变行为”时使用。执行边界分流、行为判官、分批重构和独立审查;缺陷修复转交 cm-fix,新增或变化的业务行为转交 cm-prd。

    104 GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed
  • Cm Security

    kingxiaozhe/cm-workflow

    用户运行 cm-security,或要求代码安全扫描、漏洞检查、密钥泄露排查、依赖漏洞检查时使用。默认检查当前分支相对主分支及已跟踪未提交修改,结合业务地图复核;--all 检查全部已跟踪文件。只报告问题,不自动修复、安装、升级或发布。安装自检用 cm-check,功能测试与覆盖率用 cm-test。

    104 GitHub starsUsed in 1 repo~744 tokens
    Auto-check passed
  • Cm AI

    kingxiaozhe/cm-workflow

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

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

    kingxiaozhe/cm-workflow

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

    104 GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Questions about Cm UI Engineer

What does Cm UI Engineer do?

UI 还原工程师 Skill,把已确认的设计基准像素级还原为生产代码(token 先行、原子顺序、按交付形态量化验收:Web 用 BackstopJS、App 用 Maestro+模拟器截图);有基准才出场,不做业务逻辑. Cm UI Engineer is an agent skill from kingxiaozhe/cm-workflow.

When should I use Cm UI Engineer?

Cm UI Engineer fits situations like: tasks that involve Mobile testing and debugging.

How do I install Cm UI Engineer in Claude Code?

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

How do I install Cm UI Engineer in Codex?

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

Can I use Cm UI 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-ui-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-ui-engineer, .gemini/skills/cm-ui-engineer, .github/skills/cm-ui-engineer and .opencode/skills/cm-ui-engineer in your project.

What does Cm UI Engineer need to run?

Going by SKILL.md and its folder, Cm UI Engineer needs the command-line tools its instructions call (npx). Our summary lists: Node.js.

Does Cm UI Engineer access the network?

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.

Is Cm UI 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 UI Engineer use?

Cm UI 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 UI Engineer use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cm UI Engineer?

Skills that share tags, products or a category with Cm UI Engineer: Fieldworks Uia2 Parity Testing (sillsdev/FieldWorks, 110 stars), UI Verification (mblode/agent-skills, 143 stars), Phone Harness (ShawnPana/phone-harness, 3.2k stars) and Maa Issue Log Analysis (MaaAssistantArknights/MaaAssistantArknights, 24k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cm UI 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 8, 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.