Agent skill

Cm AI

by kingxiaozhe in kingxiaozhe/cm-workflow

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

MITAuto-check passed

Install Cm AI

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

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

GitHub CLI
$ gh skill install kingxiaozhe/cm-workflow cm-ai --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-ai .claude/skills/cm-ai && 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-ai
GitHub stars
104
Token cost
~1.3k tokens
SKILL.md length
243 words
Files
11 (incl. references)
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 3 steps: 恢复已有运行:先读取原运行记录。已有 JS host/batch… → 新任务:默认读取 references/js-host.md,由共享 JS… → JS 准入失败或不支持:报告具体宿主、Node…
  • SKILL.md covers 流程图 and 全局规则
  • Calls node

What it does

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

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files (for example `references/N1-init.md`, `references/N2-enter-feature.md` and `references/N3-execute-task.md`).

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.

Example prompts

  • “规格已确认,开始实现”
  • “/cm-ai”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 恢复已有运行:先读取原运行记录。已有 JS host/batch 沿原身份与配置恢复;已配置 QA 因命令配置错误卡住时,按 references/js-host.md 的“QA 配置修订”显式授权,不重开已完成任务。
  2. 新任务:默认读取 references/js-host.md,由共享 JS 入口驱动阶段;当前会话只执行其工具请求。
  3. JS 准入失败或不支持:报告具体宿主、Node 版本、目录、配置或业务能力缺口并停止依赖该能力的执行;

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:

    • node

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

  • Network

    No URLs in SKILL.md.

    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 AI loads about 1.3k tokens when it runs, and up to ~34k if it reads all its reference files. Until then it costs about 30 tokens; SKILL.md has 243 words of instructions outside code blocks.

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

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). 243 words, ~1,308 tokens.

Download SKILL.mdSave it as .claude/skills/cm-ai/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
cm-ai
description
用户明确说“规格已确认,开始实现”或要求按已审批 CM specs 开发时使用。新任务默认由 JS workflow 驱动 N1-N8,完成开发、独立审查、QA 与文档同步;模糊点子、未审规格和单独一句“继续”不能触发编码批准。

cm-ai — 自动开发

执行前读取 ../../runtime/project-context.md、../../runtime/orchestration.md、 ../../runtime/task-gates.md、../../runtime/review.md 与 ../../runtime/model-efficiency.md、../../runtime/logging.md。Codex 入口为 $cm-ai;Claude Code 跨平台入口为 /cm-ai,macOS/Linux 另有历史别名 /cm:ai。

用户明确要求外部专家,或为本次开发任务开启 AUTO 时,按 ../../runtime/external-expert.md 执行 ../external-expert/SKILL.md 的任务路由。 编码、命令、测试执行、页面 QA、Git 与 N4 永远 LOCAL;AUTO 只能把可分离的复杂 研究、测试设计或方案批判路由到 CONSULT/VERIFY。外部建议由本地应用、测试与裁决, 其 .external/ 证据不得满足 N4/N5。

用户本轮输入 — specs 文件夹路径 + 代码项目路径。

bash
$cm-ai specs在~/projects/my-app-specs,代码在~/code/my-app
$cm-ai ~/projects/specs 前端~/code/fe 后端~/code/api

流程图

执行路由(新任务默认 JS)

先按下列顺序选择执行方式;用户无需额外说“使用 JS workflow”。路由选择不替代规格审批或实际调用授权。

  1. 恢复已有运行:先读取原运行记录。已有 JS host/batch 沿原身份与配置恢复;已配置 QA 因命令配置错误卡住时,按 references/js-host.md 的“QA 配置修订”显式授权,不重开已完成任务。 已确认的旧兼容任务沿原流程续接,不因升级迁移状态。记录缺失、冲突或无法确定归属时只读核对,不能猜测或另开运行绕过历史。
  2. 新任务:默认读取 references/js-host.md,由共享 JS 入口驱动阶段;当前会话只执行其工具请求。 只有用户明确选择旧兼容流程、且确认不是已有 JS 运行时,才进入下文兼容执行步骤;不新增 CLI 参数。
  3. JS 准入失败或不支持:报告具体宿主、Node 版本、目录、配置或业务能力缺口并停止依赖该能力的执行; 不静默回退兼容流程,不改 runId、runtime 或手工完成路径规避阻断。原生 Windows 尚不支持,Linux 支持声明不等于实机验收。

JS 路由中的状态、日志、handoff、Review 凭证与任务勾选由原 JS owner 和唯一完成门禁负责; 不得执行下文兼容步骤中的同类手工写入。节点参考的业务约束仍适用,默认路由不扩大开发、审查、QA、Git 或发布权限。

N1–N8 业务概览与兼容执行步骤

下列流程图说明共同业务顺序;JS 的执行操作以 references/js-host.md 为准。 仅已选定兼容流程时,按下文及 references/ 节点执行手工步骤;入口更新不代表已安装副本或全阶段实机验收。

text
START
  │
  ▼
[N1: 初始化] ── 解析输入、扫描 features、加载上下文
  │
  ▼
┌─► [N2: 进入 Feature] ── 读取 specs、分析依赖、输出执行计划
│     │
│     ▼
│   ┌─► [N3: 执行 Task] ── 开发 → 末任务文档同步 → Learning/handoff 定稿
│   │     │
│   │     ▼
│   │   [N4: Review] ── 主执行者自审 → 独立审查
│   │     │
│   │     ▼
│   │   [N5: 标记完成] ── tasks.md 标 [x]、写 LESSONS.md
│   │     │
│   │     ▼
│   │   [N6: QA 评估] ── 评分决定是否触发 cm-qa-engineer
│   │     │
│   │     ▼
│   │   [N7: 上下文管理] ── 从磁盘重读 specs 与项目约束
│   │     │
│   │     ▼
│   │   还有未完成 task? ──YES──┘
│   │     │
│   │    NO
│   │     │
│   │     ▼
│   └── Feature 完成 → 重建下一 Feature 的上下文
│         │
│         ▼
│       还有下一个 Feature? ──YES──┘
│         │
│        NO
│         │
│         ▼
      [N8: 完成] ── 只读文档/收尾核对 → 原完成门禁 → 输出总结
        │
        ▼
       END

全局规则

暂停(仅灾难级): 不可逆破坏(删数据、动线上、不可回滚迁移)、资金/密钥/合规风险、交付形态级架构错向、环境阻塞到无法继续。 不暂停(多方案自主决策): 执行中出现多个可选方案时——技术选型、实现路径、库/工具选择、审查意见分歧——自己分析利弊选最优解直接执行,不询问。代价是留痕义务:把「选了什么 / 为什么 / 放弃了什么」写进任务汇报,方向性取舍追记 LESSONS.md——人可以事后翻案,但流程不为选择题停车。业务逻辑歧义按需求文档最合理解释执行并显式记录所做假设,仅当触及灾难级清单才暂停。 节点间不停车: 除上述灾难级与各节点显式卡点(入口闸/降级知情/形态确认/涉合规走查)外,任何节点完成后直接进入下一节点——不得以"我将要…是否继续?"、"完成了 X,需要我继续吗?"这类问句收尾等待。阶段性汇报写在输出里照常可见,但回合不能停在等确认上(实跑反馈:执行器习惯性在节点末尾问一句,用户被迫每阶段点头,自动化名存实亡)。 度量: 每次暂停问人,恢复后在当前任务的 METRICS.md 记录里人工介入计 1 次并注明原因(见 N5)。 状态落盘(供状态条/看板实时点亮节点): 每进入一个节点(N1–N8),覆盖写入 {SPECS_DIR}/.cm-status.json 单行 JSON: {"node":"N4","feature":"1.xxx","task":"T-005","detail":"一句话当前动作","state":"running","at":"HH:MM:SS"} ——detail 必须写大白话,标准是"路过的非工程师扫一眼能懂":写"正在开发数据接口"不写"cm-backend-engineer 执行 T-004";写"第2轮代码审查"不写"对抗式子agent复审";写"确认一下:原型里有3个按钮点了没反应,要做吗?"不写"原型死区待确认"。节点号/任务号由状态条自动放在行尾角标,detail 里不要再写。 ——暂停等人时 state 改为 paused_for_human(detail 写等什么),全部完成时 N8 写 run_done。N1 时可将 specs 绝对路径同步到当前运行时的状态镜像(Claude 兼容运行时为 ~/.claude/cm-current-specs,Codex/OMX 为对应 session 状态),但 {SPECS_DIR}/.cm-status.json 始终是跨运行时真相。每节点至少写入一次;长步骤可在同一节点更新真实检查点,不得跳过。 运行日志(事后复盘与工作流优化的原始证据): 按 runtime/logging.md 调用统一写入器;它先追加 {SPECS_DIR}/运行日志.jsonl,再把 同一 event_id 镜像到 ~/.cm-workflow/logs/。at 一律 ISO 8601 带时区偏移, detail 用一句大白话;不直接拼 JSON,避免跨会话格式漂移。 必记事件(event 取值固定):run_start、node_enter、task_start / task_done、review、degrade、pause / resume、decision、warning、 error、progress、resource、qa、test_run、external_expert、 spec_lifecycle、delivery、run_done。写日志与状态落盘同节奏,不得跳过;详细 测试/审查/外部回答只写专项凭证,不灌主日志。长步骤和临时资源严格按 runtime/logging.md 配对,禁止用后台心跳制造虚假活跃。

角色路由投影: N1 用代码项目根读取有效配置;N3 每个实现任务解析 coder,N3 任务检查解析 tester,N4 解析 reviewer,并在 N6 QA 解析 tester。使用:

bash
node {CM_WORKFLOW_ROOT}/scripts/cm-workflow-config.mjs \
  --project {CODE_PROJECT} --role coder --runtime {codex|claude} --print-role

把返回的 adapter、model、source、route_state 注入当前角色提示和任务摘要, 并按 runtime/workflow-routing.md 写 decision/phase: route。每次 N7 恢复或进入 新角色边界都从磁盘重读;配置缺失使用默认路由。declared-adapter 只表示项目请求了 当前运行时未观察到的适配器,必须写 warning/degrade,不能声称该模型已执行;它 也不能绕过本地编码、测试、Git 或 N4 独立审查。 managed-adapter 只通过 runtime/model-efficiency.md 的内置调用边界返回文本角色结果; 主执行者仍负责本地改码、命令与证据,适配器回答本身不得满足 N4。版本 1 因此拒绝 reviewer.adapter: openai-compatible,N4 只使用 runtime/review.md 列出的本地审查通道。

每个角色调用按 runtime/model-efficiency.md 重建当前任务的最小包:N3 coder 只接收 当前 task/AC/相关设计与文件,tester 只接收测试合同和必要失败证据,N4 reviewer 接收 task-only handoff/diff 与验证摘要。稳定规则前缀不混入动态 diff/日志;角色只返回 既有 handoff、测试或 findings-first 结构,不复述输入。上下文缩小不得删减 N4 包的 强制证据,也不得减少测试、审查轮次或人工门禁。

任务状态镜像: tasks.md 是唯一权威任务源。运行时支持任务面板时,可将未完成任务镜像到 Codex/OMX 计划或 Claude 任务清单;N3/N5 同步状态。断点恢复必须由磁盘重建镜像:[x] 跳过或标为 completed,[DROPPED] 不镜像,不得重复创建条目。

执行策略: 遵守 runtime/orchestration.md;串行默认,只有无依赖、文件边界不重叠、契约已稳定且环境确实支持时才可并行。

© 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 10 other files (references) in skills/cm-ai of kingxiaozhe/cm-workflow.

  • SKILL.md
  • references/N1-init.md
  • references/N2-enter-feature.md
  • references/N3-execute-task.md
  • references/N4-review.md
  • references/N5-mark-done.md
  • references/N6-qa-eval.md
  • references/N7-context.md
  • references/N8-finish.md
  • references/js-host.md
  • references/knowledge-closeout.md

Open the folder on GitHubat commit 82d43f0

Compare with similar skills

Cm AI 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 AI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cm AI this skillkingxiaozhe/cm-workflow104—~1.3kAutomated safety check: PassMIT
Spec Writergarrytan/gstack136k—~14kAutomated safety check: NotesMIT
Specgarden-co/classic-jazz2.5k—~1.3kAutomated safety check: PassMIT
Spec Driven Workflowalirezarezvani/claude-skills28k—~3.9kAutomated safety check: PassMIT
Sparc Specruvnet/ruflo74k—~1.1kAutomated safety check: NotesMIT
Write A Specdifferent-ai/openwork24k—~3.3kAutomated safety check: PassCustom licence

Similar skills

  • Spec Writer

    garrytan/gstack

    Converts a vague idea into a precise, executable spec in five phases, files it as an issue and can start an agent on it in a fresh worktree.

    136k GitHub stars~14k tokensUpdated today
    DevelopmentAuto-check: notes
  • Spec

    garden-co/classic-jazz

    Implement features using Spec Driven Development (SDD) workflow.

    2.5k GitHub stars~1.3k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Spec Driven Workflow

    alirezarezvani/claude-skills

    A skill your agent uses when the user asks to write specs before code, define acceptance criteria, plan features before implementation, generate tests from specifications, or follow spec-first…

    28k GitHub stars~3.9k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Sparc Spec

    ruvnet/ruflo

    Run the SPARC Specification phase — gather requirements, define acceptance criteria, identify constraints, and store the spec in memory

    74k GitHub stars~1.1k tokensUpdated today
    Product & Project ManagementAuto-check: notes
  • Write A Spec

    different-ai/openwork

    Write or extend an E2E journey spec in evals/specs that proves a PR's change to a human reviewer.

    24k GitHub stars~3.3k tokensUpdated today
    Testing & QAAuto-check passed
  • To Spec

    vinvcn/mattpocock-skills-zh-CN

    把当前对话转成 spec 并发布到项目 issue tracker:不做访谈,只综合已经讨论的内容. An agent skill from vinvcn/mattpocock-skills-zh-CN.

    4.7k GitHub stars~441 tokensUpdated yesterday
    Product & Project ManagementAuto-check passed

More from kingxiaozhe/cm-workflow

All 23 skills in this repo
  • Cm Check

    kingxiaozhe/cm-workflow

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

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

    kingxiaozhe/cm-workflow

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

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

    kingxiaozhe/cm-workflow

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

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

    kingxiaozhe/cm-workflow

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

    104 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Cm Miniprogram Engineer

    kingxiaozhe/cm-workflow

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

    104 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Cm Prd

    kingxiaozhe/cm-workflow

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

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

Questions about Cm AI

What does Cm AI do?

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

How do I install Cm AI in Claude Code?

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

How do I install Cm AI in Codex?

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

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

What does Cm AI need to run?

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

Does Cm AI access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

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

Cm AI 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 AI use?

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

What are the alternatives to Cm AI?

Skills that share tags, products or a category with Cm AI: Spec Writer (garrytan/gstack, 136k stars), Spec (garden-co/classic-jazz, 2.5k stars), Spec Driven Workflow (alirezarezvani/claude-skills, 28k stars) and Sparc Spec (ruvnet/ruflo, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cm AI?

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 9, 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.