一键导入
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: 用户提供原型目录(如已发布的 Axure HTML 文件夹)、详设/需求文档、字段或字典资料、已有页面目录等业务资料,并希望沉淀业务理解、对齐产品/后端、维护字段字典或维护待确认事项。Skill 不依赖固定关键词,依据资料源 + 用户意图 + 范围完整度智能判断;碎片化问答、单截图、小修小改默认不触发。Triggers on (语义级,仅作示例): 业务梳理 / 业务文档 / docs/business / 模块大纲 / 字段字典整理 / 待确认事项 / 产品确认 / 业务全景 / 原型转业务文档 / 详设转业务文档 / 业务闭环。
Use when: auditing project source code against the 14 modular standards in .github/standards/. Outputs deviation report and component-extraction suggestions to reports/. Triggers on: 规范审计, 规范检查, 代码审计, 对齐规范, 规范偏差, 接手新项目, 存量代码分析, 项目体检, audit code, check conventions, onboard project.
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.
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 detailed design documents (MD/Word) or natural language descriptions as input. Triggers on: prototype analysis, axure scan, page inventory, 原型解析, 页面清单, axure转vue, 详设文档, design doc, 详细设计, 口述需求, 自然语言建页面, natural language page request, 建个页面, 写个页面, 口头描述页面.
Use when: extracting domain-specific page templates from existing project pages and contributing them to skills/core/page-codegen/templates/domains/. Triggers on: 提取模板, 抽取模板, 沉淀模板, 模板贡献, extract template, contribute template.
| 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,回到挑选界面
| 原则 | 说明 |
|---|---|
| 不修 🔴 | 严重偏差必须人工或 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 才有输入 |
| page-codegen | 互斥:生成新页面用 codegen,不用 fix |
| template-extract | 无直接关系 |