ai-engineering-init 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/.claude/agents/code-reviewer.md +3 -130
  2. package/.claude/hooks/skill-forced-eval.js +46 -60
  3. package/.claude/hooks/stop.js +24 -1
  4. package/.claude/settings.json +10 -1
  5. package/.claude/skills/api-development/SKILL.md +179 -130
  6. package/.claude/skills/architecture-design/SKILL.md +102 -212
  7. package/.claude/skills/backend-annotations/SKILL.md +166 -220
  8. package/.claude/skills/bug-detective/SKILL.md +225 -186
  9. package/.claude/skills/code-patterns/SKILL.md +127 -244
  10. package/.claude/skills/codex-code-review/SKILL.md +327 -0
  11. package/.claude/skills/collaborating-with-codex/SKILL.md +96 -113
  12. package/.claude/skills/crud-development/SKILL.md +226 -307
  13. package/.claude/skills/data-permission/SKILL.md +131 -202
  14. package/.claude/skills/database-ops/SKILL.md +158 -355
  15. package/.claude/skills/error-handler/SKILL.md +224 -285
  16. package/.claude/skills/file-oss-management/SKILL.md +174 -169
  17. package/.claude/skills/git-workflow/SKILL.md +123 -341
  18. package/.claude/skills/json-serialization/SKILL.md +121 -137
  19. package/.claude/skills/leniu-report-customization/SKILL.md +82 -2
  20. package/.claude/skills/leniu-report-standard-customization/SKILL.md +65 -2
  21. package/.claude/skills/loki-log-query/SKILL.md +400 -0
  22. package/.claude/skills/mysql-debug/SKILL.md +58 -22
  23. package/.claude/skills/performance-doctor/SKILL.md +83 -89
  24. package/.claude/skills/redis-cache/SKILL.md +134 -185
  25. package/.claude/skills/scheduled-jobs/SKILL.md +187 -224
  26. package/.claude/skills/security-guard/SKILL.md +168 -276
  27. package/.claude/skills/sms-mail/SKILL.md +266 -228
  28. package/.claude/skills/social-login/SKILL.md +257 -195
  29. package/.claude/skills/sync-back-merge/SKILL.md +66 -0
  30. package/.claude/skills/tenant-management/SKILL.md +172 -188
  31. package/.claude/skills/utils-toolkit/SKILL.md +214 -222
  32. package/.claude/skills/websocket-sse/SKILL.md +251 -172
  33. package/.claude/skills/workflow-engine/SKILL.md +178 -250
  34. package/.claude/skills/yunxiao-task-management/SKILL.md +489 -0
  35. package/.codex/skills/api-development/SKILL.md +179 -130
  36. package/.codex/skills/architecture-design/SKILL.md +102 -212
  37. package/.codex/skills/backend-annotations/SKILL.md +166 -220
  38. package/.codex/skills/bug-detective/SKILL.md +225 -186
  39. package/.codex/skills/code-patterns/SKILL.md +127 -244
  40. package/.codex/skills/collaborating-with-codex/SKILL.md +96 -113
  41. package/.codex/skills/crud-development/SKILL.md +226 -307
  42. package/.codex/skills/data-permission/SKILL.md +131 -202
  43. package/.codex/skills/database-ops/SKILL.md +158 -355
  44. package/.codex/skills/error-handler/SKILL.md +224 -285
  45. package/.codex/skills/file-oss-management/SKILL.md +174 -169
  46. package/.codex/skills/git-workflow/SKILL.md +123 -341
  47. package/.codex/skills/json-serialization/SKILL.md +121 -137
  48. package/.codex/skills/leniu-report-customization/SKILL.md +82 -2
  49. package/.codex/skills/leniu-report-standard-customization/SKILL.md +65 -2
  50. package/.codex/skills/loki-log-query/SKILL.md +400 -0
  51. package/.codex/skills/loki-log-query/environments.json +45 -0
  52. package/.codex/skills/mysql-debug/SKILL.md +58 -22
  53. package/.codex/skills/performance-doctor/SKILL.md +83 -89
  54. package/.codex/skills/redis-cache/SKILL.md +134 -185
  55. package/.codex/skills/scheduled-jobs/SKILL.md +187 -224
  56. package/.codex/skills/security-guard/SKILL.md +168 -276
  57. package/.codex/skills/skill-creator/LICENSE.txt +202 -0
  58. package/.codex/skills/skill-creator/SKILL.md +479 -0
  59. package/.codex/skills/skill-creator/agents/analyzer.md +274 -0
  60. package/.codex/skills/skill-creator/agents/comparator.md +202 -0
  61. package/.codex/skills/skill-creator/agents/grader.md +223 -0
  62. package/.codex/skills/skill-creator/assets/eval_review.html +146 -0
  63. package/.codex/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  64. package/.codex/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  65. package/.codex/skills/skill-creator/references/schemas.md +430 -0
  66. package/.codex/skills/skill-creator/scripts/__init__.py +0 -0
  67. package/.codex/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  68. package/.codex/skills/skill-creator/scripts/generate_report.py +326 -0
  69. package/.codex/skills/skill-creator/scripts/improve_description.py +248 -0
  70. package/.codex/skills/skill-creator/scripts/package_skill.py +136 -0
  71. package/.codex/skills/skill-creator/scripts/quick_validate.py +103 -0
  72. package/.codex/skills/skill-creator/scripts/run_eval.py +310 -0
  73. package/.codex/skills/skill-creator/scripts/run_loop.py +332 -0
  74. package/.codex/skills/skill-creator/scripts/utils.py +47 -0
  75. package/.codex/skills/sms-mail/SKILL.md +266 -228
  76. package/.codex/skills/social-login/SKILL.md +257 -195
  77. package/.codex/skills/sync-back-merge/SKILL.md +66 -0
  78. package/.codex/skills/tenant-management/SKILL.md +172 -188
  79. package/.codex/skills/utils-toolkit/SKILL.md +214 -222
  80. package/.codex/skills/websocket-sse/SKILL.md +251 -172
  81. package/.codex/skills/workflow-engine/SKILL.md +178 -250
  82. package/.codex/skills/yunxiao-task-management/SKILL.md +489 -0
  83. package/.cursor/hooks/cursor-skill-eval.js +66 -6
  84. package/.cursor/hooks/stop.js +23 -1
  85. package/.cursor/skills/api-development/SKILL.md +179 -130
  86. package/.cursor/skills/architecture-design/SKILL.md +102 -212
  87. package/.cursor/skills/backend-annotations/SKILL.md +166 -220
  88. package/.cursor/skills/bug-detective/SKILL.md +225 -186
  89. package/.cursor/skills/code-patterns/SKILL.md +127 -244
  90. package/.cursor/skills/collaborating-with-codex/SKILL.md +96 -113
  91. package/.cursor/skills/crud-development/SKILL.md +226 -307
  92. package/.cursor/skills/data-permission/SKILL.md +131 -202
  93. package/.cursor/skills/database-ops/SKILL.md +158 -355
  94. package/.cursor/skills/error-handler/SKILL.md +224 -285
  95. package/.cursor/skills/file-oss-management/SKILL.md +174 -169
  96. package/.cursor/skills/git-workflow/SKILL.md +123 -341
  97. package/.cursor/skills/json-serialization/SKILL.md +121 -137
  98. package/.cursor/skills/leniu-report-customization/SKILL.md +82 -2
  99. package/.cursor/skills/leniu-report-standard-customization/SKILL.md +65 -2
  100. package/.cursor/skills/loki-log-query/SKILL.md +400 -0
  101. package/.cursor/skills/loki-log-query/environments.json +45 -0
  102. package/.cursor/skills/mysql-debug/SKILL.md +58 -22
  103. package/.cursor/skills/performance-doctor/SKILL.md +83 -89
  104. package/.cursor/skills/redis-cache/SKILL.md +134 -185
  105. package/.cursor/skills/scheduled-jobs/SKILL.md +187 -224
  106. package/.cursor/skills/security-guard/SKILL.md +168 -276
  107. package/.cursor/skills/skill-creator/LICENSE.txt +202 -0
  108. package/.cursor/skills/skill-creator/SKILL.md +479 -0
  109. package/.cursor/skills/skill-creator/agents/analyzer.md +274 -0
  110. package/.cursor/skills/skill-creator/agents/comparator.md +202 -0
  111. package/.cursor/skills/skill-creator/agents/grader.md +223 -0
  112. package/.cursor/skills/skill-creator/assets/eval_review.html +146 -0
  113. package/.cursor/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  114. package/.cursor/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  115. package/.cursor/skills/skill-creator/references/schemas.md +430 -0
  116. package/.cursor/skills/skill-creator/scripts/__init__.py +0 -0
  117. package/.cursor/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  118. package/.cursor/skills/skill-creator/scripts/generate_report.py +326 -0
  119. package/.cursor/skills/skill-creator/scripts/improve_description.py +248 -0
  120. package/.cursor/skills/skill-creator/scripts/package_skill.py +136 -0
  121. package/.cursor/skills/skill-creator/scripts/quick_validate.py +103 -0
  122. package/.cursor/skills/skill-creator/scripts/run_eval.py +310 -0
  123. package/.cursor/skills/skill-creator/scripts/run_loop.py +332 -0
  124. package/.cursor/skills/skill-creator/scripts/utils.py +47 -0
  125. package/.cursor/skills/sms-mail/SKILL.md +266 -228
  126. package/.cursor/skills/social-login/SKILL.md +257 -195
  127. package/.cursor/skills/sync-back-merge/SKILL.md +66 -0
  128. package/.cursor/skills/tenant-management/SKILL.md +172 -188
  129. package/.cursor/skills/utils-toolkit/SKILL.md +214 -222
  130. package/.cursor/skills/websocket-sse/SKILL.md +251 -172
  131. package/.cursor/skills/workflow-engine/SKILL.md +178 -250
  132. package/.cursor/skills/yunxiao-task-management/SKILL.md +489 -0
  133. package/AGENTS.md +49 -540
  134. package/CLAUDE.md +73 -119
  135. package/README.md +37 -6
  136. package/bin/index.js +611 -25
  137. package/package.json +1 -1
  138. package/src/platform-map.json +4 -0
  139. package/src/skills/api-development/SKILL.md +179 -130
  140. package/src/skills/architecture-design/SKILL.md +102 -212
  141. package/src/skills/backend-annotations/SKILL.md +166 -220
  142. package/src/skills/bug-detective/SKILL.md +225 -186
  143. package/src/skills/code-patterns/SKILL.md +127 -244
  144. package/src/skills/codex-code-review/SKILL.md +261 -69
  145. package/src/skills/collaborating-with-codex/SKILL.md +96 -113
  146. package/src/skills/crud-development/SKILL.md +226 -307
  147. package/src/skills/data-permission/SKILL.md +131 -202
  148. package/src/skills/database-ops/SKILL.md +158 -355
  149. package/src/skills/error-handler/SKILL.md +224 -285
  150. package/src/skills/file-oss-management/SKILL.md +174 -169
  151. package/src/skills/git-workflow/SKILL.md +123 -341
  152. package/src/skills/json-serialization/SKILL.md +121 -137
  153. package/src/skills/leniu-report-customization/SKILL.md +82 -2
  154. package/src/skills/leniu-report-standard-customization/SKILL.md +65 -2
  155. package/src/skills/loki-log-query/SKILL.md +400 -0
  156. package/src/skills/loki-log-query/environments.json +45 -0
  157. package/src/skills/mysql-debug/SKILL.md +58 -22
  158. package/src/skills/performance-doctor/SKILL.md +83 -89
  159. package/src/skills/redis-cache/SKILL.md +134 -185
  160. package/src/skills/scheduled-jobs/SKILL.md +187 -224
  161. package/src/skills/security-guard/SKILL.md +168 -276
  162. package/src/skills/skill-creator/LICENSE.txt +202 -0
  163. package/src/skills/skill-creator/SKILL.md +479 -0
  164. package/src/skills/skill-creator/agents/analyzer.md +274 -0
  165. package/src/skills/skill-creator/agents/comparator.md +202 -0
  166. package/src/skills/skill-creator/agents/grader.md +223 -0
  167. package/src/skills/skill-creator/assets/eval_review.html +146 -0
  168. package/src/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  169. package/src/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  170. package/src/skills/skill-creator/references/schemas.md +430 -0
  171. package/src/skills/skill-creator/scripts/__init__.py +0 -0
  172. package/src/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  173. package/src/skills/skill-creator/scripts/generate_report.py +326 -0
  174. package/src/skills/skill-creator/scripts/improve_description.py +248 -0
  175. package/src/skills/skill-creator/scripts/package_skill.py +136 -0
  176. package/src/skills/skill-creator/scripts/quick_validate.py +103 -0
  177. package/src/skills/skill-creator/scripts/run_eval.py +310 -0
  178. package/src/skills/skill-creator/scripts/run_loop.py +332 -0
  179. package/src/skills/skill-creator/scripts/utils.py +47 -0
  180. package/src/skills/sms-mail/SKILL.md +266 -228
  181. package/src/skills/social-login/SKILL.md +257 -195
  182. package/src/skills/sync-back-merge/SKILL.md +66 -0
  183. package/src/skills/tenant-management/SKILL.md +172 -188
  184. package/src/skills/utils-toolkit/SKILL.md +214 -222
  185. package/src/skills/websocket-sse/SKILL.md +251 -172
  186. package/src/skills/workflow-engine/SKILL.md +178 -250
  187. package/src/skills/yunxiao-task-management/SKILL.md +489 -0
@@ -5,135 +5,8 @@ model: sonnet
5
5
  tools: Read, Grep, Glob
6
6
  ---
7
7
 
8
- 你是 leniu-tengyun-core(云食堂)的代码审查助手,负责在代码生成或修改后自动检查是否符合项目规范。
8
+ 你是 leniu-tengyun-core(云食堂)的代码审查助手。
9
9
 
10
- **核心架构**:四层架构(Controller → Business → Service → Mapper),包名 `net.xnzn.core.*`,JDK 21,双库物理隔离(无 tenant_id 字段)。
11
-
12
- ---
13
-
14
- ## 触发场景
15
-
16
- 1. `/dev` 或 `/crud` 命令完成后
17
- 2. 用户说"审查代码"、"检查代码"、"review"
18
-
19
- ---
20
-
21
- ## 后端审查清单
22
-
23
- ### 🔴 严重问题(必须修复)
24
-
25
- #### 1. 包名规范
26
- ```bash
27
- Grep pattern: "package org\.dromara\." path: [目标目录] # ❌ 必须为 0 个
28
- Grep pattern: "package net\.xnzn\." path: [目标目录] # ✅ 应有结果
29
- ```
30
- - ❌ `package org.dromara.xxx`
31
- - ✅ `package net.xnzn.core.xxx`
32
-
33
- #### 2. 禁止使用 RuoYi 工具类
34
- ```bash
35
- Grep pattern: "MapstructUtils" path: [目标目录] glob: "*.java"
36
- Grep pattern: "ServiceException" path: [目标目录] glob: "*.java"
37
- Grep pattern: "import javax\.validation" path: [目标目录] glob: "*.java"
38
- ```
39
- - ❌ `MapstructUtils.convert()` → ✅ `BeanUtil.copyProperties()`
40
- - ❌ `throw new ServiceException()` → ✅ `throw new LeException()`
41
- - ❌ `javax.validation.*` → ✅ `jakarta.validation.*`(JDK 21)
42
-
43
- #### 3. 审计字段名称
44
- ```bash
45
- Grep pattern: "private.*createBy\|private.*updateBy\|private.*createTime\|private.*updateTime" path: [目标目录] glob: "*.java"
46
- ```
47
- - ❌ `createBy / updateBy / createTime / updateTime`
48
- - ✅ `crby / upby / crtime / uptime`
49
-
50
- #### 4. del_flag 值语义
51
- ```bash
52
- Grep pattern: "delFlag.*=.*0\|del_flag.*=.*0" path: [目标目录] glob: "*.java"
53
- ```
54
- - ❌ `delFlag = 0`(RuoYi 的正常值)
55
- - ✅ `delFlag = 2`(leniu 的正常值,1=删除)
56
-
57
- #### 5. Entity 不含 tenant_id
58
- ```bash
59
- Grep pattern: "tenantId\|tenant_id" path: [目标目录] glob: "*.java"
60
- ```
61
- - ❌ Entity 中有 `tenantId` 字段(双库物理隔离,无需此字段)
62
-
63
- #### 6. 禁止 Map 传递业务数据
64
- ```bash
65
- Grep pattern: "Map<String,\s*Object>" path: [目标目录] glob: "*.java"
66
- ```
67
- - ❌ 返回 `Map<String, Object>` → ✅ 使用 VO 类
68
-
69
- ### 🟡 警告问题(建议修复)
70
-
71
- #### 7. 请求体封装
72
- ```bash
73
- Grep pattern: "@RequestBody [^L]" path: [目标目录] glob: "*Controller.java"
74
- ```
75
- - 建议所有 POST 请求使用 `@RequestBody LeRequest<T>` 封装
76
-
77
- #### 8. 依赖注入
78
- ```bash
79
- Grep pattern: "@Autowired" path: [目标目录] glob: "*.java"
80
- ```
81
- - 跨模块循环依赖时使用 `@Autowired @Lazy`
10
+ **审查流程**:请读取 `.claude/skills/codex-code-review/SKILL.md` 获取完整的审查清单和工作流,然后按照其中的 Phase 2(本地规范检查)执行审查。
82
11
 
83
- #### 9. 事务注解
84
- ```bash
85
- Grep pattern: "@Transactional" path: [目标目录] glob: "*Service*.java"
86
- ```
87
- - 写操作应使用 `@Transactional(rollbackFor = Exception.class)`
88
-
89
- #### 10. 国际化异常
90
- ```bash
91
- Grep pattern: 'new LeException\("[^"]*[\u4e00-\u9fa5]' path: [目标目录] glob: "*.java"
92
- ```
93
- - 建议使用 `I18n.getMessage()` 替代硬编码中文
94
-
95
- ---
96
-
97
- ## 前端审查(如涉及)
98
-
99
- 前端项目路径:`/Users/xujiajun/Developer/frontProj/web`
100
-
101
- ### 🔴 严重问题
102
-
103
- ```bash
104
- # 检查是否正确处理响应码
105
- Grep pattern: "\.code\s*==\s*200\|\.code\s*===\s*200" path: [前端目录] # ❌ 应为 10000
106
- Grep pattern: "Admin-Token" path: [前端目录] glob: "*.js" # Token key 验证
107
- ```
108
- - 成功码:`10000`(不是 200)
109
- - Token:`Admin-Token`(localStorage)
110
- - 租户:`MERCHANT-ID`(请求头)
111
- - 金额:后端返回分,前端用 `money()` 转元显示
112
-
113
- ---
114
-
115
- ## 审查报告格式
116
-
117
- ```
118
- # 代码审查报告
119
-
120
- 审查范围: [文件/模块]
121
-
122
- ## 严重问题(X 项)
123
- 1. [问题类型]
124
- 文件: path/to/file.java:行号
125
- 问题: 描述
126
- 修复: 代码示例
127
-
128
- ## 警告问题(X 项)
129
- ...
130
-
131
- ## 通过项
132
- - [x] 包名规范 (net.xnzn.core.*)
133
- - [x] 使用 LeException
134
- - [x] 审计字段正确 (crby/crtime/upby/uptime)
135
- - [x] del_flag 语义正确 (2=正常)
136
- ...
137
-
138
- 结论: ✅ 通过 / ⚠️ 需修复 / ❌ 不通过
139
- ```
12
+ **核心架构**:四层架构(Controller → Business → Service → Mapper),包名 `net.xnzn.core.*`,JDK 21,双库物理隔离(无 tenant_id 字段)。
@@ -3,9 +3,8 @@
3
3
  * UserPromptSubmit Hook - 强制技能评估 (跨平台版本)
4
4
  * 功能: 开发场景下,将 Skills 激活率从约 25% 提升到 90% 以上
5
5
  *
6
- * 适配项目: leniu (纯后端项目)
6
+ * 适配: 通用后端项目
7
7
  * 架构: 三层架构 (Controller → Service → Mapper)
8
- * 包名: org.dromara.*
9
8
  */
10
9
 
11
10
  const fs = require('fs');
@@ -62,21 +61,18 @@ const instructions = `## 强制技能激活流程(必须执行)
62
61
 
63
62
  针对用户问题,列出匹配的技能:\`技能名: 理由\`,无匹配则写"无匹配技能"
64
63
 
65
- 可用技能(纯后端项目):
64
+ 可用技能(后端项目):
66
65
  - crud-development: CRUD/业务模块/Entity/Service/Controller 开发
67
66
  - api-development: API设计/RESTful/接口规范
68
67
  - database-ops: 数据库/SQL/建表/字典/菜单
69
- - backend-annotations: 注解/@RateLimiter/@DataScope
70
- - utils-toolkit: 工具类/StringUtils/MapstructUtils
71
- - file-oss-management: 文件上传/OSS/云存储/MinIO
72
- - ai-langchain4j: AI/大模型/ChatGPT/DeepSeek
73
- - media-processing: 图片处理/二维码/水印/Excel
68
+ - backend-annotations: 注解/限流/防重复/脱敏/加密
69
+ - utils-toolkit: 工具类/对象转换/字符串/集合/日期
70
+ - file-oss-management: 文件上传/OSS/云存储
74
71
  - bug-detective: Bug/报错/异常/不工作
75
- - mysql-debug: 查数据库/查表/执行SQL/查记录/mysql查询/数据库排查/验证数据/数据库调试/db查询
76
- - error-handler: 异常处理/ServiceException
72
+ - error-handler: 异常处理/全局异常/业务异常
77
73
  - performance-doctor: 性能/慢查询/优化/缓存
78
- - data-permission: 数据权限/@DataPermission/DataScope/行级权限
79
- - security-guard: 安全/Sa-Token/认证授权/加密
74
+ - data-permission: 数据权限/行级权限/数据隔离
75
+ - security-guard: 安全/认证授权/加密/XSS/SQL注入防护
80
76
  - architecture-design: 架构/模块划分/重构
81
77
  - code-patterns: 规范/禁止/命名/Git提交
82
78
  - project-navigator: 项目结构/文件在哪/定位
@@ -86,55 +82,45 @@ const instructions = `## 强制技能激活流程(必须执行)
86
82
  - brainstorm: 头脑风暴/创意/方案设计
87
83
  - collaborating-with-codex: Codex协作/多模型/算法分析
88
84
  - collaborating-with-gemini: Gemini协作/前端原型/UI设计
89
- - workflow-engine: 工作流/审批流/Flowable/流程
85
+ - codex-code-review: 代码审查/review/代码检查/code review
86
+ - workflow-engine: 工作流/审批流/流程引擎
90
87
  - test-development: 测试/单元测试/@Test/JUnit5/Mockito
91
- - json-serialization: JSON/序列化/反序列化/JsonUtils/日期格式/BigDecimal/精度/类型转换
92
- - redis-cache: Redis/缓存/@Cacheable/@CacheEvict/RedisUtils/分布式锁/RLock/限流
93
- - scheduled-jobs: 定时任务/SnailJob/@Scheduled/@JobExecutor/任务调度/重试机制
94
- - add-skill: 添加技能/创建技能/新技能/技能开发/写技能
95
- - banana-image: 生成图片/AI图片/产品图/海报/缩略图/4K/高清/制作图片
96
- - websocket-sse: WebSocket/SSE/实时推送/消息通知/在线状态/双向通信/实时通信
97
- - sms-mail: 短信/邮件/SMS/验证码/通知/SMS4j/MailUtils/邮件发送/短信发送
98
- - social-login: 第三方登录/微信登录/QQ登录/OAuth/OAuth2/JustAuth/社交登录/扫码登录/授权登录
99
- - tenant-management: 多租户/租户隔离/TenantEntity/TenantHelper/租户ID/tenantId/跨租户/动态租户/SaaS
100
- - leniu-java-amount-handling: 金额处理/分转元/元转分/Long金额/money/fen/BigDecimal金额/金额字段
101
- - leniu-java-concurrent: 并发/CompletableFuture/线程池/ThreadPool/并发安全/异步处理/synchronized
102
- - leniu-java-entity: Entity实体类/VO视图对象/DTO数据传输/Param参数类/@TableName/@TableField/审计字段/字段映射
103
- - leniu-java-export: 导出/Excel导出/异步导出/分页导出/@ExcelProperty/exportApi/数据导出
104
- - leniu-java-logging: 日志/@Slf4j/log.info/log.error/log.debug/日志级别/logback/日志格式
105
- - leniu-java-mq: 消息队列/MQ/MqUtil/@MqConsumer/延迟消息/消息重试/事务消息
106
- - leniu-java-mybatis: MyBatis/MyBatisPlus/Mapper/LambdaQueryWrapper/XML映射/动态SQL/BaseMapper/@Select/resultMap
107
- - leniu-java-report-query-param: 报表查询入参/Param类/分页参数/时间范围查询/ReportBaseParam/exportCols
108
- - leniu-java-task: 定时任务/XXL-Job/@XxlJob/TenantLoader/任务调度/分布式定时
109
- - leniu-java-total-line: 合计行/totalLine/报表合计/SUM合计/ReportBaseTotalVO/合计查询
110
- - leniu-report-customization: 定制报表/汇总报表/report_order_info/report_order_detail/report_account_flow/退款汇总/消费金额统计/订单报表/流水报表
111
- - leniu-report-standard-customization: 标准版报表/core-report/report_refund/report_refund_detail/经营分析/营业额分析/用户活跃度/菜品排行/操作员统计/账户日结/钱包消费汇总/商户消费汇总/ReportOrderConsumeService/ReportAccountConsumeService
112
- - leniu-customization-location: 定制开发/定制代码位置/Dz前缀/leniu-yunshitang/dz_表名/定制仓库/覆盖Service/@Primary/迁移core文件/定制开始/定制结束/net.xnzn.yunshitang/wuhanxiehe定制/bootstrap-ext
113
- - leniu-crud-development: CRUD/增删改查/新建模块/Business层/Service/Mapper/Controller/分页查询/LeRequest/PageDTO/PageVO/事务管理
114
- - leniu-database-ops: 数据库/SQL/建表/双库/商户库/系统库/审计字段/crby/crtime/del_flag
115
- - leniu-utils-toolkit: 工具类/BeanUtil/StrUtil/CollUtil/ObjectUtil/RedisUtil/JacksonUtil/LeBeanUtil
116
- - leniu-error-handler: 异常处理/LeException/全局异常/参数校验/错误码/I18n/国际化/throw
117
- - leniu-backend-annotations: @RequiresAuthentication/@RequiresGuest/@Validated/@NotNull/@Api/@ApiOperation/@ApiModelProperty/分组校验/InsertGroup/UpdateGroup
118
- - leniu-api-development: API接口/Controller/RESTful/LeResult/LeResponse/LeRequest/接口开发/路由前缀
119
- - leniu-brainstorm: 头脑风暴/方案设计/怎么设计/创意探索/功能规划/可行性分析
120
- - leniu-architecture-design: 架构设计/双库架构/商户库/系统库/pigx框架/四层架构/模块划分/Business层
121
- - leniu-code-patterns: 代码禁令/代码规范/命名规范/代码风格/Git提交规范/包结构/禁止写法/审计字段规范/delFlag/crby
122
- - leniu-data-permission: 多租户/数据权限/@UseSystem/Executors.doInTenant/readInSystem/TenantContextHolder/MERCHANT-ID/双库隔离/数据源切换
123
- - leniu-redis-cache: Redis/缓存/RedisUtil/分布式锁/RLock/getLock/setNx/ZSet/限流/缓存击穿
124
- - leniu-security-guard: 安全认证/SQL注入防护/XSS防护/数据脱敏/SM4加密/接口安全/限流
125
- - leniu-mealtime: 餐次/mealtime/mealtimeType/早餐/午餐/晚餐/下午茶/夜宵/AllocMealtimeTypeEnum
126
- - leniu-marketing-price-rule-customizer: 营销计费/计价规则/RulePriceHandler/RulePriceEnum/折扣规则/满减规则/限额规则/补贴规则
127
- - leniu-marketing-recharge-rule-customizer: 营销充值/充值规则/RuleRechargeHandler/RuleRechargeEnum/满赠规则/充值赠送/管理费规则
128
- - openspec-new-change: 新建变更/开始新功能/opsx:new/openspec new/创建变更
129
- - openspec-ff-change: 快速推进/快速生成所有制品/opsx:ff/openspec ff/fast-forward
130
- - openspec-apply-change: 实现任务/开始实现/opsx:apply/openspec apply/执行变更
131
- - openspec-continue-change: 继续变更/创建下一个制品/opsx:continue/openspec continue
132
- - openspec-archive-change: 归档变更/完成变更/opsx:archive/openspec archive/归档
133
- - openspec-bulk-archive-change: 批量归档/批量完成/opsx:bulk-archive/批量变更
134
- - openspec-explore: 探索模式/思维伙伴/opsx:explore/openspec explore/探索问题
135
- - openspec-onboard: 新手引导/学习工作流/opsx:onboard/openspec onboard/入门教程
136
- - openspec-sync-specs: 同步规格/同步spec/opsx:sync/openspec sync/delta同步
137
- - openspec-verify-change: 验证变更/检查实现/opsx:verify/openspec verify/验证规格
88
+ - json-serialization: JSON/序列化/反序列化/日期格式/BigDecimal/精度
89
+ - redis-cache: Redis/缓存/@Cacheable/分布式锁/限流
90
+ - scheduled-jobs: 定时任务/@Scheduled/Quartz/XXL-Job/任务调度
91
+ - add-skill: 添加技能/创建技能/新技能/技能开发
92
+ - banana-image: 生成图片/AI图片/产品图/海报/缩略图
93
+ - websocket-sse: WebSocket/SSE/实时推送/消息通知/双向通信
94
+ - sms-mail: 短信/邮件/SMS/验证码/通知
95
+ - social-login: 第三方登录/OAuth/OAuth2/社交登录/授权登录
96
+ - tenant-management: 多租户/租户隔离/SaaS/数据隔离
97
+ - openspec-new-change: 新建变更/开始新功能/opsx:new/openspec new
98
+ - openspec-ff-change: 快速推进/opsx:ff/openspec ff/fast-forward
99
+ - openspec-apply-change: 实现任务/opsx:apply/openspec apply
100
+ - openspec-continue-change: 继续变更/opsx:continue/openspec continue
101
+ - openspec-archive-change: 归档变更/opsx:archive/openspec archive
102
+ - openspec-bulk-archive-change: 批量归档/opsx:bulk-archive
103
+ - openspec-explore: 探索模式/opsx:explore/openspec explore
104
+ - openspec-onboard: 新手引导/opsx:onboard/openspec onboard
105
+ - openspec-sync-specs: 同步规格/opsx:sync/openspec sync
106
+ - openspec-verify-change: 验证变更/opsx:verify/openspec verify
107
+ - ui-pc: 前端组件/Element UI/页面开发
108
+ - store-pc: Vuex/状态管理/store模块
109
+ - mysql-debug: MySQL调试/查数据库/执行SQL/数据库排查
110
+ - loki-log-query: Loki日志/日志查询/线上日志排查
111
+ - yunxiao-task-management: 云效任务/任务管理/需求管理
112
+ - crud: 快速CRUD生成/脚手架
113
+ - dev: 开发新功能/功能开发流程
114
+ - check: 代码检查/规范检查
115
+ - start: 项目启动/初始化/开始
116
+ - next: 下一步/继续/接下来做什么
117
+ - progress: 进度查看/当前状态
118
+ - sync: 同步/代码同步
119
+ - sync-back-merge: 回合并/sync back merge/主分支同步
120
+ - init-docs: 初始化文档/项目文档生成
121
+ - add-todo: 添加待办/TODO/任务添加
122
+ - update-status: 更新状态/状态变更
123
+ - skill-creator: 创建技能模板/技能脚手架/skill scaffold
138
124
 
139
125
  ### 步骤 2 - 激活(逐个调用,等待每个完成)
140
126
 
@@ -1,11 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
3
  * Stop Hook - Claude 回答结束时触发
4
- * 功能: nul 文件清理 + 智能完成通知(音效/系统通知/TTS)
4
+ * 功能: nul 文件清理 + 代码审查提示 + 智能完成通知(音效/系统通知/TTS)
5
5
  */
6
6
 
7
7
  const fs = require('fs');
8
8
  const path = require('path');
9
+ const { execSync } = require('child_process');
9
10
 
10
11
  // 清理可能误创建的 nul 文件(Windows 下 > nul 可能创建该文件)
11
12
  const findAndDeleteNul = (dir, depth = 0) => {
@@ -27,6 +28,28 @@ const findAndDeleteNul = (dir, depth = 0) => {
27
28
  };
28
29
  findAndDeleteNul(process.cwd());
29
30
 
31
+ // 代码审查提示:检测是否有未提交的代码变更
32
+ try {
33
+ const cwd = process.cwd();
34
+ const diff = execSync('git diff --name-only HEAD 2>/dev/null || true', { cwd, encoding: 'utf8' }).trim();
35
+ const staged = execSync('git diff --cached --name-only 2>/dev/null || true', { cwd, encoding: 'utf8' }).trim();
36
+ const allChanged = [diff, staged].filter(Boolean).join('\n');
37
+
38
+ if (allChanged) {
39
+ // 检查是否有业务代码变更(Java/XML/SQL/Vue/JS 等)
40
+ const codeExtensions = /\.(java|xml|sql|vue|js|ts|jsx|tsx|py|go|rs|kt)$/i;
41
+ const changedFiles = allChanged.split('\n').filter(f => codeExtensions.test(f));
42
+
43
+ if (changedFiles.length > 0) {
44
+ console.error(`\n💡 检测到 ${changedFiles.length} 个代码文件变更,建议执行代码审查:`);
45
+ console.error(` → 输入 "review" 或 "审查代码" 使用 code-reviewer 进行规范检查`);
46
+ console.error(` → 输入 "codex review" 调用 Codex 进行深度代码审查\n`);
47
+ }
48
+ }
49
+ } catch {
50
+ // git 不可用或非 git 仓库,静默跳过
51
+ }
52
+
30
53
  // 执行智能通知
31
54
  require('./lib/notify.js').run(process.cwd())
32
55
  .then(() => process.exit(0))
@@ -37,5 +37,14 @@
37
37
  }
38
38
  ]
39
39
  },
40
- "mcpServers": {}
40
+ "mcpServers": {
41
+ "sequential-thinking": {
42
+ "command": "npx",
43
+ "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
44
+ },
45
+ "context7": {
46
+ "command": "npx",
47
+ "args": ["-y", "@upstash/context7-mcp"]
48
+ }
49
+ }
41
50
  }