Grilling Ideas
opsmill/infrahub
Stress-tests a fuzzy or vague feature idea before any PRD, spec, or ticket is written.
用户明确要求“只整理结构,不改变行为”时使用。执行边界分流、行为判官、分批重构和独立审查;缺陷修复转交 cm-fix,新增或变化的业务行为转交 cm-prd。
$ npx skills add kingxiaozhe/cm-workflow --skill cm-refactor -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install kingxiaozhe/cm-workflow cm-refactor --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/kingxiaozhe/cm-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cm-refactor .claude/skills/cm-refactor && 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 "cm-refactor" agent skill from https://github.com/kingxiaozhe/cm-workflow/tree/main/skills/cm-refactor into .claude/skills/cm-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cm-refactor", 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/kingxiaozhe/cm-workflow/tree/main/skills/cm-refactorType 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 kingxiaozhe/cm-workflow --skill cm-refactor -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install kingxiaozhe/cm-workflow cm-refactor --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/kingxiaozhe/cm-workflow.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/cm-refactor .agents/skills/cm-refactor && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cm-refactor" agent skill from https://github.com/kingxiaozhe/cm-workflow/tree/main/skills/cm-refactor into .agents/skills/cm-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cm-refactor", 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 kingxiaozhe/cm-workflow --skill cm-refactor -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install kingxiaozhe/cm-workflow cm-refactor --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/kingxiaozhe/cm-workflow.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/cm-refactor .cursor/skills/cm-refactor && 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 "cm-refactor" agent skill from https://github.com/kingxiaozhe/cm-workflow/tree/main/skills/cm-refactor into .cursor/skills/cm-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cm-refactor", 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/kingxiaozhe/cm-workflow.git --path skills/cm-refactor--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 kingxiaozhe/cm-workflow --skill cm-refactor -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install kingxiaozhe/cm-workflow cm-refactor --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/kingxiaozhe/cm-workflow.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/cm-refactor .gemini/skills/cm-refactor && 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 "cm-refactor" agent skill from https://github.com/kingxiaozhe/cm-workflow/tree/main/skills/cm-refactor into .gemini/skills/cm-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cm-refactor", 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 kingxiaozhe/cm-workflow cm-refactorInstalls 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 kingxiaozhe/cm-workflow --skill cm-refactor -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/kingxiaozhe/cm-workflow.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/cm-refactor .github/skills/cm-refactor && 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 "cm-refactor" agent skill from https://github.com/kingxiaozhe/cm-workflow/tree/main/skills/cm-refactor into .github/skills/cm-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cm-refactor", 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 kingxiaozhe/cm-workflow --skill cm-refactor -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install kingxiaozhe/cm-workflow cm-refactor --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/kingxiaozhe/cm-workflow.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/cm-refactor .opencode/skills/cm-refactor && 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 "cm-refactor" agent skill from https://github.com/kingxiaozhe/cm-workflow/tree/main/skills/cm-refactor into .opencode/skills/cm-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cm-refactor", 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.
cm-refactor用户明确要求“只整理结构,不改变行为”时使用。执行边界分流、行为判官、分批重构和独立审查;缺陷修复转交 cm-fix,新增或变化的业务行为转交 cm-prd。
Cm Refactor is an agent skill from kingxiaozhe/cm-workflow. 用户明确要求“只整理结构,不改变行为”时使用。执行边界分流、行为判官、分批重构和独立审查;缺陷修复转交 cm-fix,新增或变化的业务行为转交 cm-prd。
Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/js-batch.md` and `references/js-host.md`).
It sits in Product & Project Management, covering Refactoring and PRD writing. 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.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 82d43f0. 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.
Shell commands in SKILL.md call:
python3nodeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
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.
Cm Refactor loads about 2.7k tokens when it runs, and up to ~6.8k if it reads all its reference files. Until then it costs about 23 tokens; SKILL.md has 665 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); files beside SKILL.md are not scanned.
The full file from kingxiaozhe/cm-workflow at commit 82d43f0, republished under its MIT licence (© kingxiaozhe). 665 words, ~2,669 tokens.
.claude/skills/cm-refactor/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.执行前读取 ../../runtime/project-context.md、../../runtime/orchestration.md、
../../runtime/review.md、../../runtime/model-efficiency.md 与
../../runtime/logging.md。Codex 入口为 $cm-refactor;Claude Code 跨平台入口为
/cm-refactor,macOS/Linux 另有历史别名 /cm:refactor。
用户明确要求外部专家,或为本次重构开启 AUTO 时,按
../../runtime/external-expert.md 执行 ../external-expert/SKILL.md 的任务路由。
重构写入、行为判官与审查保持 LOCAL;复杂方案比较可 CONSULT,权威事实可 VERIFY。
外部结果只进入候选方案和风险清单,不得修改行为基线、代跑判官或满足独立审查。
用法:$cm-refactor {specs路径} {代码项目路径} 重构目标描述(哪块代码/为什么难维护)
在读取项目内容、解析角色、写 run_start、建立行为基线或修改代码前,先确认本轮有非空目标描述,
并按下方“分流门”将意图归为 defect、behavior-change、gradual-adoption 或
structure-only;不要把描述正文拼进 shell。随后执行:
node "{CM_WORKFLOW_ROOT}/scripts/cm-refactor-entry.mjs" \
--skill-dir "{CM_WORKFLOW_ROOT}/skills/cm-refactor" --project "{CODE_PROJECT}" \
[--specs "{SPECS_DIR}"] --intent "{四类意图之一}" [--target-present]没有 specs 的裸项目省略 --specs;有非空描述才传 --target-present。缺描述时入口返回
blocked / target_required。defect、behavior-change、gradual-adoption 分别只返回既有
$cm-fix、$cm-prd --change、普通改动出口并停止本流程,出口不构成执行授权;只有
structure-only 才继续校验项目/specs,ready / g0_feasibility 才进入 G0,且继续要求行为完全不变
与 G0 人签核。返回的角色、日志和
Learning 均为 pending,执行/写入权限为 false;入口不读取项目正文、不跑判官、不调用
provider/browser/外部专家、不写日志/档案/RULEBOOK,也不替代后续轻量道或批量道。
只读分流返回 ready / g0_feasibility 后,按 当前会话 JS 宿主
启动同一轻量/批量控制器;批量、准备、写回与恢复协议在需要时读取。
JS 宿主负责日志与状态,不再手工重复写 run_start。恢复保留原配置、结果和审查轮次;未知调用先核对。
批量默认串行、worker 只提议文本;真实宿主须保证 bakeoff 隔离和最终独立审查,不能用 header 自证。
不使用 JS 宿主时,两个路径校验通过后立即调用统一写入器记录 run_start;暂停/续跑沿用同一
.cm-run.json,完成收口人门后写 run_done。不得直接拼 JSON。
从代码项目根解析 coder、tester、reviewer,并按
runtime/workflow-routing.md 写 decision/phase: route。角色配置只选择请求的
实现、等价验证和独立审查适配器/模型别名;它不允许子代理提交 Git、改变规则手册、
跳过判官或把 declared-adapter 当成已执行。resolver 返回非零或配置错误时立即
BLOCKED,不得进入 G0、扇出或修改代码;配置缺失时使用当前默认执行方式。
managed-adapter 按 runtime/model-efficiency.md 返回文本建议并自动记录真实 usage;
行为基线、代码改动与独立审查仍保持本地。
角色调用按 runtime/model-efficiency.md 只传当前批次的行为基线、范围、diff、验证与
审查证据;不得重复发送其他批次或完整历史。精简仅影响模型上下文与输出,不降低
行为判官、独立审查或回归门禁。
结构调整专用闭环。前提:什么都没坏,行为一丝不变——设计依据见 docs/重构流程设计/(cm 小闭环纪律 × Anthropic 迁移方法论,核心教义:修规则,不修产物)。
分流门(先于一切,答错门就是错流程):
$cm-fix$cm-prd --change$cm-ai 全局规则同等生效:灾难级才暂停、多方案自主决策留痕、状态落盘(node 写 REFACTOR)、运行日志照记、审查按 runtime/review.md 执行。
续跑检测(先于 G0):{SPECS_DIR}/refactors/ 下存在未收口 slug(档案无收口节 / 运行日志该 slug 无 run_done 事件)→ 按磁盘状态定位续跑站点(RULEBOOK 版本、batch-log 完成集、队列缺口),G0 不重问、判官按 G0.5 重验后继续;无在制状态才走全新 G0。"队列=磁盘"的可恢复性必须有恢复入口才算数(对照系:cm:ai 有 tasks 断点、fix 有 slug 续跑,最长时的批量重构反而没有——本条补齐)。
{SPECS_DIR}/LESSONS.md 的「待触发备忘」段,结构类条目(标记来源含"重构/拆分/看不惯")与本次目标相关的 → 列入范围并在输出注明认领;收口时销账(改状态为已认领,注档案路径)——备忘的回流出口(实跑教训:备忘只写不读,到期无人认领)判官 = 能平等裁决改前改后代码的机械标准,分两层:
自验证(判官没被验证过,就不配当判官):
$cm-fix。夹带修复会毁掉差分判官:行为变了,是重构失手还是修复生效?无法归因{SPECS_DIR}/refactors/{YYYYMMDD}-{slug}.md(动机指标改前改后对照 / 等价验证方式与结果 / 发现未修缺陷清单);METRICS 行 Feature 列写 refactor;delivery=diff 不提交,branch/draft-mr 才 commit refactor: {一句话} (档案: refactors/xxx.md).claude/rules/ 对应文件——一次重构的规则,变成项目的永久基因;项目无 .claude/rules/(未经 $cm-init)→ 降级记入 LESSONS [仅记忆] 并在档案注明,提示补跑 $cm-init 后迁入(实跑 DEV-003:diff-lens 未 init,毕业规则无处可去){slug} 先规范成跨平台安全的 ASCII kebab;令
REVIEW_FEATURE=refactor-{slug}、REVIEW_TASK=T-REFACTOR-{slug}。主执行者按真实
diff 和判官证据写
{SPECS_DIR}/.reviews/refactor-{slug}-T-REFACTOR-{slug}-a{attempt}-handoff.json,
先按完整 changed_files 运行
cm-task-gate.py hash-implementation --project-root {CODE_PROJECT} --file ... 并把返回的
implementation_sha256 写入 handoff,然后真跑:
python3 {CM_WORKFLOW_ROOT}/scripts/cm-task-gate.py check-n4 \
--handoff {HANDOFF_PATH} --reviews-dir {SPECS_DIR}/.reviews \
--feature refactor-{slug} --task T-REFACTOR-{slug} --project-root {CODE_PROJECT}独立审查投喂全部 diff + RULEBOOK(批量道)+ judge-report/diff-report 摘要;凭证严格落
{SPECS_DIR}/.reviews/refactor-{slug}-T-REFACTOR-{slug}-r{attempt}.md 并绑定当前
handoff SHA。审查后必须真跑:
python3 {CM_WORKFLOW_ROOT}/scripts/cm-task-gate.py check-n5 \
--handoff {HANDOFF_PATH} --reviews-dir {SPECS_DIR}/.reviews \
--feature refactor-{slug} --task T-REFACTOR-{slug} --project-root {CODE_PROJECT}只有当前 attempt 的 verdict: approved 才能落盘/提交;changes_requested 生成
attempt 2 并复审,第 2 轮仍有阻断项写 blocked。旧凭证、空壳凭证或文件存在检查
均不得放行。
第一轮要求补判官或测试时,审查返回 judgeRevision:{paths,reason},只列启动时
testSetup.paths 内的文件;第二轮由宿主提议文本、控制器登记写入。先在启动时的业务原稿上
重建答案并重做判官自验证,再与第二轮重构稿比较;详见 判官修订与恢复。
教义:个别失败交给循环烧掉,重复失败控诉的是规则——修规则重新生成,不修产物。
{SPECS_DIR}/refactors/{slug}/RULEBOOK.md,meta 规则:两个 agent 会答得不同的问题,答案进手册(目标形态/命名映射/禁用模式/逃生舱标记 TODO(refactor):)refactor_rule_revision_required 停机、不发布对比报告也不启动试点,修订是否解决问题仍由后续独立审查判断。{CM_WORKFLOW_ROOT}/templates/refactor/cm-refactor-denies.json,将其约束注入每个 Codex 子代理:循环内禁 git 变更操作、禁重型测试命令。当前运行时无法保证这些边界时不扇出runtime/orchestration.md 为 Codex 子代理注入对应工种 skill 与 RULEBOOK 摘录;子代理只做指定文件、不碰界外、不自行标记或提交// REFACTOR STATUS: confidence={high|medium|low} todos={N};审查者对账实际 TODO(refactor) 数,尾注少报即为审查发现root. 写进无 root 绑定的 IIFE,启动即挂,站 5 金样前的 smoke 拦截)refactors/{slug}/ 目录,与 RULEBOOK 同处)、METRICS、规则毕业DEV-{序号} | 日期 | 跳过了什么 | 谁批准——没人记录的偏差就是没人批准的偏差🛑 双计数呈签核后本命令才算闭环:基线 {N} 项全绿 + 差分 {M} 组一致,连同档案、动机指标改前改后对照、预算对账(G0 预估 vs 实耗:agent 调用次数/时长,写入 METRICS 备注)一并打给人——不对账的预算永远是拍脑袋。与 G0、站 2 构成全流程恰好三处人门——门在阶段之间,签核=踢下一阶段,阶段内零停车(与 docs/重构流程设计/ 的图一致,图与实现不得漂移)。
REFACTOR,格式同 cm:ai 全局规则)node_enter:进入每道门/每站(G0、G0.5、规模门、各站、收口)pause / resume:三处人门各一对(G0 签核、站 2 规则定稿、收口 done-gate)——人门无 pause 记录 = 门没停,审计可查decision:规则修订采纳(修了哪条/为什么)、轨道选择、判官修复task_start / task_done:轻量道按次;批量道按批次记,detail 必带数字(完成 N/总数 M · 差分通过率 · 动机指标现值)——单文件粒度不灌主日志,进明细层 batch-log(见下节)error:判官假阳性排查、批次重生成(记明"第几次重复触发规则修订")、行为差异回滚run_done:收口(双计数与 slug 写进 detail/data)为什么比 feature 开发厚:新开发的失败是"没做出来",看得见;重构的失败是"悄悄改了行为",事后归因全靠明细。事件级日志答得了"发生过什么",答不了"这个行为差异是哪个文件、哪版规则、哪次批次引入的"。
refactors/{slug}/):判官档案——基线清单与结果、自验证变异清单(种了什么变异 / 抓到没有,漏抓的怎么修到抓到)、假阳性排查记录。判官的可信度证据,不是口头的"验证过了"{file, agent, model, rulebook_rev, diff_pass, todos, confidence, duration}——归因链的关键是 rulebook_rev:每个产物记录由哪版规则生成,行为差异出现时可精确定位"这批是坏规则的产物"而不是逐文件猜版本 | 日期 | 触发实例(哪个失败) | 旧条文 → 新条文 | 裁决人——规则演进必须可追溯,否则"修规则不修产物"就成了无账本的改法error 事件双写互指| 落盘物 | 位置 |
|---|---|
| 运行日志 + 状态 | {SPECS_DIR}/运行日志.jsonl 追加 · .cm-status.json(状态条自动显示 REFACTOR 进度) |
| 明细层(判官/差分/批次/回滚) | refactors/{slug}/ 下 judge-report.md · diff-report.md · batch-log.jsonl(批量道) |
| 可行性摘要 + 档案 | {SPECS_DIR}/refactors/{日期}-{slug}.md(批量道为同名目录) |
| RULEBOOK(批量道) | refactors/{slug}/RULEBOOK.md |
| 审查凭证 | {SPECS_DIR}/.reviews/refactor-{slug}-T-REFACTOR-{slug}-r{N}.md |
| 度量 | METRICS.md 追加行,Feature 列 refactor |
| 毕业规则 | 代码项目 .claude/rules/ 对应文件 |
| 备忘销账 | LESSONS.md 待触发备忘状态更新 |
docs/refactors/,凭证落 docs/refactors/.reviews/,METRICS 跳过(同 $cm-fix 惯例)对上游方法论的三处有意改编(是取舍不是遗漏,放弃了什么留痕):
$cm-prd 立项——cm 已有方案对抗审查链,不重复造© kingxiaozhe, MIT. 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 2 other files (references) in skills/cm-refactor of kingxiaozhe/cm-workflow.
Open the folder on GitHubat commit 82d43f0
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in kingxiaozhe/cm-workflow, which our catalogue first saw on October 7, 2026.
Cm Refactor 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 |
|---|---|---|---|---|---|---|
| Cm Refactor this skillkingxiaozhe/cm-workflow | 104 | 1 repos | ~2.7k | Automated safety check: Pass | MIT | |
| Grilling Ideasopsmill/infrahub | 531 | — | ~3.8k | Automated safety check: Pass | Apache-2.0 | |
| Experience Lwc Design Generateforcedotcom/sf-skills | 1.1k | — | ~4k | Automated safety check: Pass | Apache-2.0 | |
| Securability EngineeringOWASP/secure-agent-playbook | 187 | — | ~5.8k | Automated safety check: Pass | CC-BY-4.0 | |
| Avoid Feature Creepwaynesutton/builder-skills | 404 | — | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| Create Specbastani-inc/atomic | 846 | — | ~9.5k | Automated safety check: Pass | MIT |
opsmill/infrahub
Stress-tests a fuzzy or vague feature idea before any PRD, spec, or ticket is written.
forcedotcom/sf-skills
A skill your agent uses when you need to create a brand new Lightning Web Component from a Figma design, a Product Requirements Document, or another design artifact — orchestrating the five-phase…
OWASP/secure-agent-playbook
Generate, scaffold, or refactor code so it embodies FIASSE v1.0.4 SSEM qualities by default — 10 attributes, Transparency and Least-Astonishment principles, ASVS-aligned controls, defensive boundary…
waynesutton/builder-skills
Keeps a change scoped to what was asked. An agent skill from waynesutton/builder-skills.
bastani-inc/atomic
Create a detailed execution plan/spec/PRD for implementing features or refactors in a codebase, designed around the program's entrypoints, the doors that carry domain intent, by leveraging existing…
forcedotcom/sf-skills
A skill your agent uses to analyze a Salesforce Aura component bundle (.cmp, .app, .evt, .intf, Controller.js, Helper.js, Renderer.js) and produce a framework-agnostic migration blueprint (PRD.yaml…
kingxiaozhe/cm-workflow
用户说“修复这个可复现 bug”或要求根据失败报告修代码时使用。执行红灯测试、根因定位、最小修复、独立审查和回归;尚未确认的问题先用 cm-test,新功能和架构重设计转交 cm-prd。
kingxiaozhe/cm-workflow
用户说“我有个点子”“帮我梳理产品”或需要先聊清目标时使用。通过逐题访谈整理为可交给 cm-prd 的 PRD;已有明确需求文档时改用 cm-prd,不写代码、不拆开发任务。
kingxiaozhe/cm-workflow
用户运行 cm-security,或要求代码安全扫描、漏洞检查、密钥泄露排查、依赖漏洞检查时使用。默认检查当前分支相对主分支及已跟踪未提交修改,结合业务地图复核;--all 检查全部已跟踪文件。只报告问题,不自动修复、安装、升级或发布。安装自检用 cm-check,功能测试与覆盖率用 cm-test。
kingxiaozhe/cm-workflow
用户明确说“规格已确认,开始实现”或要求按已审批 CM specs 开发时使用。新任务默认由 JS workflow 驱动 N1-N8,完成开发、独立审查、QA 与文档同步;模糊点子、未审规格和单独一句“继续”不能触发编码批准。
kingxiaozhe/cm-workflow
用户说“检查工作流是否安装正确”“为什么找不到 cm 命令”时使用。默认查询 npm 稳定版,有新版自动升级已管理的 CM 安装,再检查插件、核心 Skills、兼容包装与模板引用;不测试或修改业务代码。
kingxiaozhe/cm-workflow
用户说“第一次接管这个项目”“分析仓库并生成项目规则”时使用。分析已有代码并生成 Codex AGENTS.md 与 CM/Claude 兼容规则;仅适用于非空存量项目,不创建脚手架、不承接普通代码修改。
Categories
用户明确要求“只整理结构,不改变行为”时使用。执行边界分流、行为判官、分批重构和独立审查;缺陷修复转交 cm-fix,新增或变化的业务行为转交 cm-prd。. Cm Refactor is an agent skill from kingxiaozhe/cm-workflow.
Cm Refactor fits situations like: tasks that involve Refactoring; tasks that involve PRD writing.
Run `npx skills add kingxiaozhe/cm-workflow --skill cm-refactor -a claude-code`. Or copy the skill folder (skills/cm-refactor in kingxiaozhe/cm-workflow) into .claude/skills/cm-refactor in your project. Claude Code loads it when a task matches its description.
Run `npx skills add kingxiaozhe/cm-workflow --skill cm-refactor -a codex`. Or copy the skill folder (skills/cm-refactor in kingxiaozhe/cm-workflow) into .agents/skills/cm-refactor 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 kingxiaozhe/cm-workflow --skill cm-refactor -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-refactor, .gemini/skills/cm-refactor, .github/skills/cm-refactor and .opencode/skills/cm-refactor in your project.
Going by SKILL.md and its folder, Cm Refactor needs the command-line tools its instructions call (python3 and node). Our summary lists: Python 3.
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.
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.
Cm Refactor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k 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 4.2k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Cm Refactor: Grilling Ideas (opsmill/infrahub, 531 stars), Experience Lwc Design Generate (forcedotcom/sf-skills, 1.1k stars), Securability Engineering (OWASP/secure-agent-playbook, 187 stars) and Avoid Feature Creep (waynesutton/builder-skills, 404 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.