一键导入
code-fix
Use when: fixing code convention issues found in convention-audit reports. Triggers on: 自动修复, 整改偏差, 修复报告, 规范整改, 修复偏差, code fix, 整改规范.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when: fixing code convention issues found in convention-audit reports. Triggers on: 自动修复, 整改偏差, 修复报告, 规范整改, 修复偏差, code fix, 整改规范.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when: designing API contracts between frontend and backend based on prototype page inventory, defining request/response field structures, establishing naming conventions, and generating an api.md file per page for team alignment before coding. Triggers on: api contract, interface design, 接口约定, 前后端对齐, 字段定义, 接口设计, api.md.
Use when: generating complete Vue 3 page code (index.vue + data.ts + modal components + api.md + pages.ts registration) from a prototype page inventory and API contract, strictly following the cx-ui-produce project conventions. Read SKILL.md first (rules+constraints), then read the matching TPL-*.md for the template code. Triggers on: generate page, create page, code generation, 生成页面, 页面代码, 代码生成, vue页面, 帮我生成, natural language page generation. NOTE: 口述需求/建个页面/写个页面/按原型生成 belong to prototype-scan first (page-codegen chains from it via 模式 0).
Use when: analyzing Axure exported HTML prototype files to extract page inventory, classify interaction patterns, identify reusable components, and produce a structured page checklist for Vue development. Also supports NON-standard detailed design documents (free-form MD/Word) or natural language descriptions as input. DO NOT use for standard requirement-spec documents produced by wl-skills-design (path contains .wl-skills/docs/spec/, has function codes like PMMB001, IPO tables, flow five-elements) — route those to spec-doc-parse instead. Triggers on: prototype analysis, axure scan, page inventory, 原型解析, 页面清单, axure转vue, 口述需求, 自然语言建页面, natural language page request, 建个页面, 写个页面, 口头描述页面.
Use when: parsing STANDARD requirement-design specification documents produced by wl-skills-design (path contains .wl-skills/docs/spec/, files like ch1-3.md / 4.x-{module}.md / 4.N-data-report.md, with function codes like PMMB001, IPO tables containing 处理逻辑, and flow descriptions with five-elements) into the SAME page-spec JSON consumed by page-codegen. This is the 规范线 (spec line) counterpart to prototype-scan (原型线). Self-validating, self-correcting, report-producing. Triggers on: 解析说明书, 解析需求文档, 解析详设, 规范文档转页面, 根据说明书生成, spec doc parse, IPO 转页面, .wl-skills/docs/spec, 功能编码, 需求设计说明书.
Use when: creating system menus for newly generated pages, batch registering menus, or syncing pages.ts entries to the backend menu table. Triggers on: 创建菜单, 注册菜单, 同步菜单, 补菜单, menu sync, create menu, register menu.
Use when: managing roles, authorizing menus to roles, attaching action buttons (type=A) to page menus, or wiring permission field in data.ts toolbar config. Triggers on: 创建角色, 角色管理, 角色授权, 给角色分配菜单, 挂动作, 添加动作按钮, 同步权限, 权限码注册, role assign, permission sync.
| name | code-fix |
| description | Use when: fixing code convention issues found in convention-audit reports. Triggers on: 自动修复, 整改偏差, 修复报告, 规范整改, 修复偏差, code fix, 整改规范. |
读取 reports/规范审查报告.md 中的偏差条目,在用户确认 diff 后执行单条或分组修复。
前置:必须先运行
convention-audit生成审计报告,code-fix 依赖其输出。
范围:仅修复 🟡 / 🟢 等级偏差;🔴 严重偏差必须人工或 page-codegen 重新生成。
reports/规范审查报告.md(convention-audit 输出)
│
▼
[1] 用户从报告挑选 issueId(或 issueGroup),或说"列出可修复项"
│
▼
[2] 解析 issue → 定位文件 + 行号 + 偏差类型
│
▼
[3] 选择修复策略:
├─ rule-based(如缺 :scoped、缺 cid 等)→ 直接按规则生成 patch
└─ ai-based(语义性偏差)→ AI 生成 patch
│
▼
[4] Pre-flight 输出 diff 预览(人读,必须等待确认)
│
▼
[5] 用户 yes → 写入文件 + 在报告中标记该条目为 ✅ 已修复
用户 no → 跳过该 issue,回到挑选界面
│
▼
[6] ★ 强制复扫验证(闭环关键步骤,不可跳过)
├─ 本轮修复完成后,自动执行 wl-skills validate 检测修复结果
├─ 如仍有 error → 提示未完全修复,建议继续处理
└─ 全部通过 → 输出 ✔ 闭环完成,可安全提交
闭环原则:code-fix 修复后必须验证修复效果,不允许"改完就走"。
AI 在完成本轮全部修复后(单条或批量),必须自动执行:
wl-skills validate(或 MCP wls_validate_page)对修复文件检测## 完成摘要
- 修复项:{N} 条(rule-based {N} / ai-based {N})
- 复扫结果:✔ 通过 / ✖ 残余 {N} 个 error
- 涉及文件:{file list}
## 复扫验证
- 执行:wl-skills validate
- error: 0 / warn: {N}
- 结论:可安全提交 / 需继续处理
## 建议下一步
- next_suggest:git add + git commit(复扫通过时)
- next_suggest:继续 code-fix 或人工处理(复扫未通过时)
不可跳过:即使用户说"不用验证了",AI 也必须执行复扫。这是闭环完整性的硬性约束。
| 原则 | 说明 |
|---|---|
| 不修 🔴 | 严重偏差必须人工或 page-codegen 处理,code-fix 不介入 |
| 不破坏功能 | 只改报告点名的行,不顺手"重构"周边代码 |
| 不批量盲改 | 每个文件都先 diff 预览,禁止跳过用户确认 |
| 不生成新逻辑 | 只修偏差,不做功能补全(那是 page-codegen 的职责) |
| 范围明确 | 若用户引导修改业务逻辑,必须拒绝并说明原因 |
| 偏差类型 | 来源 standards | 策略 |
|---|---|---|
| EColumn 缺 cid | standards/12-base-table.md | rule-based |
列级 cid 只用缩写前缀(如 mca-steelCode) | standards/12-base-table.md | rule-based |
scss 文件缺 :scoped 包裹 | standards/02-code-structure.md | rule-based |
| import 路径不规范 | standards/04-coding-basics.md | rule-based |
any 滥用(> 3 处/页) | standards/09-typescript.md | ai-based |
| API_CONFIG URL 命名偏差 | api-contract.md | ai-based |
| 表格列定义与 api.md 字段不一致 | api-contract + data-ts | ai-based |
| 业务语义偏差(流程不对) | 多 standards 综合 | 不修复,标记人工 |
"修复 reports/规范审查报告.md 中的 issue#3" → 单条修复
"修复 reports/规范审查报告.md 中所有 scss 偏差" → 分组修复
"修复全部 rule-based 偏差,跳过 ai-based" → 受控批量
"列出可修复的 issue" → 仅列清单,不动任何文件
🚀 已触发技能 ops/code-fix/SKILL.md → 受控自动修复偏差
✅ 已读取 reports/规范审查报告.md → 找到 12 条偏差(rule-based 8 条,ai-based 4 条)
✅ 当前目标:issue#3(EColumn 缺 cid)→ 文件 src/views/sale/order/data.ts L42
⚠️ 以下操作会修改文件,请在 diff 预览后确认
| Skill | 关系 |
|---|---|
| convention-audit | 前置:必须先有审计报告,code-fix 才有输入 |
| wl-skills validate | 后置:修复完成后必须复扫验证(闭环保障) |
| convention-audit(复扫) | 后置可选:大规模修复后可触发 --quick 模式复扫 |
| page-codegen | 互斥:生成新页面用 codegen,不用 fix |
| template-extract | 无直接关系 |