ai-engineering-init 1.3.3 → 1.4.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.
- package/.claude/hooks/skill-forced-eval.js +4 -1
- package/.claude/settings.json +3 -3
- package/.claude/skills/add-skill/SKILL.md +252 -116
- package/.claude/skills/api-development/SKILL.md +83 -377
- package/.claude/skills/architecture-design/SKILL.md +138 -632
- package/.claude/skills/backend-annotations/SKILL.md +134 -506
- package/.claude/skills/banana-image/SKILL.md +10 -3
- package/.claude/skills/brainstorm/SKILL.md +103 -535
- package/.claude/skills/bug-detective/SKILL.md +147 -1097
- package/.claude/skills/bug-detective/references/error-patterns.md +242 -0
- package/.claude/skills/code-patterns/SKILL.md +116 -426
- package/.claude/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.claude/skills/crud-development/SKILL.md +64 -304
- package/.claude/skills/data-permission/SKILL.md +105 -412
- package/.claude/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.claude/skills/file-oss-management/SKILL.md +106 -714
- package/.claude/skills/file-oss-management/references/entities.md +105 -0
- package/.claude/skills/file-oss-management/references/service-impl.md +104 -0
- package/.claude/skills/leniu-api-development/SKILL.md +142 -626
- package/.claude/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.claude/skills/leniu-architecture-design/SKILL.md +176 -391
- package/.claude/skills/leniu-backend-annotations/SKILL.md +132 -519
- package/.claude/skills/leniu-brainstorm/SKILL.md +132 -541
- package/.claude/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.claude/skills/leniu-crud-development/SKILL.md +232 -938
- package/.claude/skills/leniu-crud-development/references/templates.md +597 -0
- package/.claude/skills/leniu-customization-location/SKILL.md +410 -0
- package/.claude/skills/leniu-data-permission/SKILL.md +70 -0
- package/.claude/skills/leniu-java-entity/SKILL.md +76 -590
- package/.claude/skills/leniu-java-entity/references/templates.md +237 -0
- package/.claude/skills/leniu-java-export/SKILL.md +94 -379
- package/.claude/skills/leniu-java-logging/SKILL.md +106 -709
- package/.claude/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.claude/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.claude/skills/leniu-java-mybatis/SKILL.md +73 -446
- package/.claude/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.claude/skills/leniu-report-customization/SKILL.md +111 -325
- package/.claude/skills/leniu-report-customization/references/table-fields.md +93 -0
- package/.claude/skills/leniu-report-standard-customization/SKILL.md +328 -0
- package/.claude/skills/leniu-report-standard-customization/references/analysis-module.md +64 -0
- package/.claude/skills/leniu-report-standard-customization/references/table-fields.md +113 -0
- package/.claude/skills/leniu-security-guard/SKILL.md +133 -347
- package/.claude/skills/mysql-debug/SKILL.md +364 -0
- package/.claude/skills/openspec-apply-change/SKILL.md +10 -1
- package/.claude/skills/openspec-archive-change/SKILL.md +9 -1
- package/.claude/skills/openspec-bulk-archive-change/SKILL.md +9 -1
- package/.claude/skills/openspec-continue-change/SKILL.md +9 -1
- package/.claude/skills/openspec-explore/SKILL.md +10 -1
- package/.claude/skills/openspec-ff-change/SKILL.md +9 -1
- package/.claude/skills/openspec-new-change/SKILL.md +9 -1
- package/.claude/skills/openspec-onboard/SKILL.md +15 -130
- package/.claude/skills/openspec-sync-specs/SKILL.md +9 -1
- package/.claude/skills/openspec-verify-change/SKILL.md +9 -1
- package/.claude/skills/performance-doctor/SKILL.md +110 -434
- package/.claude/skills/redis-cache/SKILL.md +89 -595
- package/.claude/skills/redis-cache/references/listeners.md +23 -0
- package/.claude/skills/scheduled-jobs/SKILL.md +88 -407
- package/.claude/skills/security-guard/SKILL.md +137 -532
- package/.claude/skills/security-guard/references/encrypt-config.md +103 -0
- package/.claude/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.claude/skills/sms-mail/SKILL.md +116 -574
- package/.claude/skills/sms-mail/references/mail-config.md +88 -0
- package/.claude/skills/sms-mail/references/sms-config.md +74 -0
- package/.claude/skills/social-login/SKILL.md +112 -514
- package/.claude/skills/social-login/references/provider-configs.md +118 -0
- package/.claude/skills/tenant-management/SKILL.md +129 -444
- package/.claude/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.claude/skills/test-development/SKILL.md +86 -540
- package/.claude/skills/test-development/references/parameterized-examples.md +119 -0
- package/.claude/skills/utils-toolkit/SKILL.md +52 -305
- package/.claude/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.claude/skills/websocket-sse/SKILL.md +105 -550
- package/.claude/skills/workflow-engine/SKILL.md +147 -502
- package/.codex/skills/add-skill/SKILL.md +252 -116
- package/.codex/skills/api-development/SKILL.md +172 -599
- package/.codex/skills/architecture-design/SKILL.md +138 -504
- package/.codex/skills/backend-annotations/SKILL.md +134 -496
- package/.codex/skills/banana-image/SKILL.md +10 -3
- package/.codex/skills/brainstorm/SKILL.md +103 -535
- package/.codex/skills/bug-detective/SKILL.md +147 -1097
- package/.codex/skills/bug-detective/references/error-patterns.md +242 -0
- package/.codex/skills/code-patterns/SKILL.md +120 -282
- package/.codex/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.codex/skills/crud-development/SKILL.md +64 -292
- package/.codex/skills/data-permission/SKILL.md +108 -407
- package/.codex/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.codex/skills/database-ops/SKILL.md +8 -154
- package/.codex/skills/error-handler/SKILL.md +10 -0
- package/.codex/skills/file-oss-management/SKILL.md +106 -714
- package/.codex/skills/file-oss-management/references/entities.md +105 -0
- package/.codex/skills/file-oss-management/references/service-impl.md +104 -0
- package/.codex/skills/git-workflow/SKILL.md +27 -5
- package/.codex/skills/leniu-api-development/SKILL.md +142 -626
- package/.codex/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.codex/skills/leniu-architecture-design/SKILL.md +176 -391
- package/.codex/skills/leniu-backend-annotations/SKILL.md +132 -519
- package/.codex/skills/leniu-brainstorm/SKILL.md +132 -541
- package/.codex/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.codex/skills/leniu-crud-development/SKILL.md +232 -938
- package/.codex/skills/leniu-crud-development/references/templates.md +597 -0
- package/.codex/skills/leniu-customization-location/SKILL.md +410 -0
- package/.codex/skills/leniu-data-permission/SKILL.md +70 -0
- package/.codex/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.codex/skills/leniu-java-entity/SKILL.md +76 -590
- package/.codex/skills/leniu-java-entity/references/templates.md +237 -0
- package/.codex/skills/leniu-java-export/SKILL.md +94 -379
- package/.codex/skills/leniu-java-logging/SKILL.md +106 -709
- package/.codex/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.codex/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.codex/skills/leniu-java-mybatis/SKILL.md +73 -446
- package/.codex/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.codex/skills/leniu-report-customization/SKILL.md +111 -325
- package/.codex/skills/leniu-report-customization/references/table-fields.md +93 -0
- package/.codex/skills/leniu-report-standard-customization/SKILL.md +328 -0
- package/.codex/skills/leniu-report-standard-customization/references/analysis-module.md +64 -0
- package/.codex/skills/leniu-report-standard-customization/references/table-fields.md +113 -0
- package/.codex/skills/leniu-security-guard/SKILL.md +133 -347
- package/.codex/skills/mysql-debug/SKILL.md +364 -0
- package/.codex/skills/openspec-apply-change/SKILL.md +10 -1
- package/.codex/skills/openspec-archive-change/SKILL.md +9 -1
- package/.codex/skills/openspec-bulk-archive-change/SKILL.md +9 -1
- package/.codex/skills/openspec-continue-change/SKILL.md +9 -1
- package/.codex/skills/openspec-explore/SKILL.md +10 -1
- package/.codex/skills/openspec-ff-change/SKILL.md +9 -1
- package/.codex/skills/openspec-new-change/SKILL.md +9 -1
- package/.codex/skills/openspec-onboard/SKILL.md +15 -130
- package/.codex/skills/openspec-sync-specs/SKILL.md +9 -1
- package/.codex/skills/openspec-verify-change/SKILL.md +9 -1
- package/.codex/skills/performance-doctor/SKILL.md +110 -434
- package/.codex/skills/project-navigator/SKILL.md +20 -1
- package/.codex/skills/redis-cache/SKILL.md +93 -589
- package/.codex/skills/redis-cache/references/listeners.md +23 -0
- package/.codex/skills/scheduled-jobs/SKILL.md +88 -407
- package/.codex/skills/security-guard/SKILL.md +141 -527
- package/.codex/skills/security-guard/references/encrypt-config.md +103 -0
- package/.codex/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.codex/skills/sms-mail/SKILL.md +116 -574
- package/.codex/skills/sms-mail/references/mail-config.md +88 -0
- package/.codex/skills/sms-mail/references/sms-config.md +74 -0
- package/.codex/skills/social-login/SKILL.md +112 -514
- package/.codex/skills/social-login/references/provider-configs.md +118 -0
- package/.codex/skills/store-pc/SKILL.md +258 -383
- package/.codex/skills/tenant-management/SKILL.md +129 -444
- package/.codex/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.codex/skills/test-development/SKILL.md +86 -540
- package/.codex/skills/test-development/references/parameterized-examples.md +119 -0
- package/.codex/skills/ui-pc/SKILL.md +350 -387
- package/.codex/skills/utils-toolkit/SKILL.md +52 -283
- package/.codex/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.codex/skills/websocket-sse/SKILL.md +105 -550
- package/.codex/skills/workflow-engine/SKILL.md +147 -502
- package/.cursor/hooks.json +3 -3
- package/.cursor/rules/skill-activation.mdc +2 -0
- package/.cursor/skills/add-skill/SKILL.md +252 -116
- package/.cursor/skills/api-development/SKILL.md +83 -377
- package/.cursor/skills/architecture-design/SKILL.md +138 -632
- package/.cursor/skills/backend-annotations/SKILL.md +134 -506
- package/.cursor/skills/banana-image/SKILL.md +10 -3
- package/.cursor/skills/brainstorm/SKILL.md +103 -535
- package/.cursor/skills/bug-detective/SKILL.md +147 -1097
- package/.cursor/skills/bug-detective/references/error-patterns.md +242 -0
- package/.cursor/skills/code-patterns/SKILL.md +116 -426
- package/.cursor/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.cursor/skills/crud-development/SKILL.md +64 -304
- package/.cursor/skills/data-permission/SKILL.md +105 -412
- package/.cursor/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.cursor/skills/file-oss-management/SKILL.md +106 -714
- package/.cursor/skills/file-oss-management/references/entities.md +105 -0
- package/.cursor/skills/file-oss-management/references/service-impl.md +104 -0
- package/.cursor/skills/git-workflow/SKILL.md +27 -5
- package/.cursor/skills/leniu-api-development/SKILL.md +142 -626
- package/.cursor/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.cursor/skills/leniu-architecture-design/SKILL.md +176 -391
- package/.cursor/skills/leniu-backend-annotations/SKILL.md +132 -519
- package/.cursor/skills/leniu-brainstorm/SKILL.md +132 -541
- package/.cursor/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.cursor/skills/leniu-crud-development/SKILL.md +232 -938
- package/.cursor/skills/leniu-crud-development/references/templates.md +597 -0
- package/.cursor/skills/leniu-customization-location/SKILL.md +410 -0
- package/.cursor/skills/leniu-data-permission/SKILL.md +70 -0
- package/.cursor/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.cursor/skills/leniu-java-entity/SKILL.md +76 -590
- package/.cursor/skills/leniu-java-entity/references/templates.md +237 -0
- package/.cursor/skills/leniu-java-export/SKILL.md +94 -379
- package/.cursor/skills/leniu-java-logging/SKILL.md +106 -709
- package/.cursor/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.cursor/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.cursor/skills/leniu-java-mybatis/SKILL.md +73 -446
- package/.cursor/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.cursor/skills/leniu-report-customization/SKILL.md +111 -325
- package/.cursor/skills/leniu-report-customization/references/table-fields.md +93 -0
- package/.cursor/skills/leniu-report-standard-customization/SKILL.md +328 -0
- package/.cursor/skills/leniu-report-standard-customization/references/analysis-module.md +64 -0
- package/.cursor/skills/leniu-report-standard-customization/references/table-fields.md +113 -0
- package/.cursor/skills/leniu-security-guard/SKILL.md +133 -347
- package/.cursor/skills/mysql-debug/SKILL.md +364 -0
- package/.cursor/skills/openspec-apply-change/SKILL.md +10 -1
- package/.cursor/skills/openspec-archive-change/SKILL.md +9 -1
- package/.cursor/skills/openspec-bulk-archive-change/SKILL.md +9 -1
- package/.cursor/skills/openspec-continue-change/SKILL.md +9 -1
- package/.cursor/skills/openspec-explore/SKILL.md +10 -1
- package/.cursor/skills/openspec-ff-change/SKILL.md +9 -1
- package/.cursor/skills/openspec-new-change/SKILL.md +9 -1
- package/.cursor/skills/openspec-onboard/SKILL.md +15 -130
- package/.cursor/skills/openspec-sync-specs/SKILL.md +9 -1
- package/.cursor/skills/openspec-verify-change/SKILL.md +9 -1
- package/.cursor/skills/performance-doctor/SKILL.md +110 -434
- package/.cursor/skills/redis-cache/SKILL.md +89 -595
- package/.cursor/skills/redis-cache/references/listeners.md +23 -0
- package/.cursor/skills/scheduled-jobs/SKILL.md +88 -407
- package/.cursor/skills/security-guard/SKILL.md +137 -532
- package/.cursor/skills/security-guard/references/encrypt-config.md +103 -0
- package/.cursor/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.cursor/skills/sms-mail/SKILL.md +116 -574
- package/.cursor/skills/sms-mail/references/mail-config.md +88 -0
- package/.cursor/skills/sms-mail/references/sms-config.md +74 -0
- package/.cursor/skills/social-login/SKILL.md +112 -514
- package/.cursor/skills/social-login/references/provider-configs.md +118 -0
- package/.cursor/skills/tenant-management/SKILL.md +129 -444
- package/.cursor/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.cursor/skills/test-development/SKILL.md +86 -540
- package/.cursor/skills/test-development/references/parameterized-examples.md +119 -0
- package/.cursor/skills/utils-toolkit/SKILL.md +52 -305
- package/.cursor/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.cursor/skills/websocket-sse/SKILL.md +105 -550
- package/.cursor/skills/workflow-engine/SKILL.md +147 -502
- package/AGENTS.md +1 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* UserPromptSubmit Hook - 强制技能评估 (跨平台版本)
|
|
4
4
|
* 功能: 开发场景下,将 Skills 激活率从约 25% 提升到 90% 以上
|
|
5
5
|
*
|
|
6
|
-
* 适配项目:
|
|
6
|
+
* 适配项目: leniu (纯后端项目)
|
|
7
7
|
* 架构: 三层架构 (Controller → Service → Mapper)
|
|
8
8
|
* 包名: org.dromara.*
|
|
9
9
|
*/
|
|
@@ -72,6 +72,7 @@ const instructions = `## 强制技能激活流程(必须执行)
|
|
|
72
72
|
- ai-langchain4j: AI/大模型/ChatGPT/DeepSeek
|
|
73
73
|
- media-processing: 图片处理/二维码/水印/Excel
|
|
74
74
|
- bug-detective: Bug/报错/异常/不工作
|
|
75
|
+
- mysql-debug: 查数据库/查表/执行SQL/查记录/mysql查询/数据库排查/验证数据/数据库调试/db查询
|
|
75
76
|
- error-handler: 异常处理/ServiceException
|
|
76
77
|
- performance-doctor: 性能/慢查询/优化/缓存
|
|
77
78
|
- data-permission: 数据权限/@DataPermission/DataScope/行级权限
|
|
@@ -107,6 +108,8 @@ const instructions = `## 强制技能激活流程(必须执行)
|
|
|
107
108
|
- leniu-java-task: 定时任务/XXL-Job/@XxlJob/TenantLoader/任务调度/分布式定时
|
|
108
109
|
- leniu-java-total-line: 合计行/totalLine/报表合计/SUM合计/ReportBaseTotalVO/合计查询
|
|
109
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
|
|
110
113
|
- leniu-crud-development: CRUD/增删改查/新建模块/Business层/Service/Mapper/Controller/分页查询/LeRequest/PageDTO/PageVO/事务管理
|
|
111
114
|
- leniu-database-ops: 数据库/SQL/建表/双库/商户库/系统库/审计字段/crby/crtime/del_flag
|
|
112
115
|
- leniu-utils-toolkit: 工具类/BeanUtil/StrUtil/CollUtil/ObjectUtil/RedisUtil/JacksonUtil/LeBeanUtil
|
package/.claude/settings.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"hooks": [
|
|
8
8
|
{
|
|
9
9
|
"type": "command",
|
|
10
|
-
"command": "node
|
|
10
|
+
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/skill-forced-eval.js\""
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"hooks": [
|
|
19
19
|
{
|
|
20
20
|
"type": "command",
|
|
21
|
-
"command": "node
|
|
21
|
+
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/pre-tool-use.js\"",
|
|
22
22
|
"timeout": 5000
|
|
23
23
|
}
|
|
24
24
|
]
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"hooks": [
|
|
31
31
|
{
|
|
32
32
|
"type": "command",
|
|
33
|
-
"command": "node
|
|
33
|
+
"command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/stop.js\"",
|
|
34
34
|
"timeout": 10000
|
|
35
35
|
}
|
|
36
36
|
]
|
|
@@ -16,20 +16,105 @@ description: |
|
|
|
16
16
|
|
|
17
17
|
## 概述
|
|
18
18
|
|
|
19
|
-
本指南用于在
|
|
19
|
+
本指南用于在 leniu-tengyun-core 项目中添加新的技能(Skill)。项目同时支持三个 AI 编码平台,技能需在所有平台保持一致。
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
## 核心设计原则
|
|
22
22
|
|
|
23
|
+
### 精简至上
|
|
24
|
+
|
|
25
|
+
上下文窗口是共享资源。技能与系统提示、对话历史、其他技能元数据共享窗口。
|
|
26
|
+
|
|
27
|
+
**默认假设:AI 已经很聪明。** 只添加 AI 本身不具备的知识。每段内容都应自问:"AI 真的需要这个解释吗?"、"这段内容值得占用 token 吗?"
|
|
28
|
+
|
|
29
|
+
**优先用简洁的代码示例代替冗长的文字说明。**
|
|
30
|
+
|
|
31
|
+
### 自由度控制
|
|
32
|
+
|
|
33
|
+
根据任务的脆弱性和变化性,匹配不同的指定程度:
|
|
34
|
+
|
|
35
|
+
| 自由度 | 适用场景 | 形式 |
|
|
36
|
+
|--------|---------|------|
|
|
37
|
+
| **高** | 多种方案均可,依赖上下文决策 | 文字描述指导 |
|
|
38
|
+
| **中** | 有推荐模式但允许变通 | 伪代码/带参数脚本 |
|
|
39
|
+
| **低** | 操作脆弱易错,必须严格一致 | 精确脚本/步骤 |
|
|
40
|
+
|
|
41
|
+
### 渐进披露
|
|
42
|
+
|
|
43
|
+
技能使用三级加载系统管理上下文:
|
|
44
|
+
|
|
45
|
+
1. **元数据(name + description)** — 始终在上下文中(~100 词)
|
|
46
|
+
2. **SKILL.md 正文** — 技能触发时加载(< 500 行)
|
|
47
|
+
3. **捆绑资源** — 按需加载(无限制)
|
|
48
|
+
|
|
49
|
+
**SKILL.md 正文控制在 500 行以内。** 接近上限时拆分到独立文件。拆分后必须在 SKILL.md 中引用并说明何时读取。
|
|
50
|
+
|
|
51
|
+
**大技能拆分模式**:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
技能名/
|
|
55
|
+
├── SKILL.md # 核心流程 + 导航(< 500 行)
|
|
56
|
+
├── references/ # 按需加载的参考文档
|
|
57
|
+
│ ├── patterns.md # 设计模式详解
|
|
58
|
+
│ └── examples.md # 完整代码示例
|
|
59
|
+
└── assets/ # 输出资源(模板、图片等)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
当技能支持多种变体时,按变体组织 references:
|
|
63
|
+
```
|
|
64
|
+
leniu-report-xxx/
|
|
65
|
+
├── SKILL.md
|
|
66
|
+
└── references/
|
|
67
|
+
├── basic-report.md # 基础报表模式
|
|
68
|
+
├── summary-report.md # 汇总报表模式
|
|
69
|
+
└── analysis-report.md # 分析报表模式
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 三平台架构
|
|
73
|
+
|
|
74
|
+
| 平台 | 技能目录 | Hook 文件 | 激活方式 |
|
|
75
|
+
|------|---------|-----------|---------|
|
|
76
|
+
| **Claude Code** | `.claude/skills/{技能名}/SKILL.md` | `.claude/hooks/skill-forced-eval.js` | `Skill(技能名)` 工具调用 |
|
|
77
|
+
| **Codex CLI** | `.codex/skills/{技能名}/SKILL.md` | 无独立 hook | 依赖 AGENTS.md 引导 |
|
|
78
|
+
| **Cursor** | `.cursor/skills/{技能名}/SKILL.md` | `.cursor/hooks/cursor-skill-eval.js` | Read 文件读取 |
|
|
79
|
+
|
|
80
|
+
### 技能系统工作原理
|
|
81
|
+
|
|
82
|
+
**Claude Code**:
|
|
23
83
|
```
|
|
24
84
|
用户提交问题
|
|
25
85
|
↓ skill-forced-eval.js Hook 触发
|
|
26
|
-
|
|
86
|
+
注入技能评估指令(列出可用技能 + 触发词)
|
|
27
87
|
↓ AI 评估匹配的技能
|
|
28
88
|
逐个调用 Skill(技能名)
|
|
29
89
|
↓ 读取 .claude/skills/{技能名}/SKILL.md
|
|
30
90
|
AI 获得领域知识后开始实现
|
|
31
91
|
```
|
|
32
92
|
|
|
93
|
+
**Cursor**:
|
|
94
|
+
```
|
|
95
|
+
用户提交问题
|
|
96
|
+
↓ cursor-skill-eval.js Hook 触发
|
|
97
|
+
扫描 skillMap 关键词匹配
|
|
98
|
+
↓ 注入读取指令
|
|
99
|
+
AI 读取 .cursor/skills/{技能名}/SKILL.md
|
|
100
|
+
↓ 同时 skill-activation.mdc 规则也可触发读取
|
|
101
|
+
AI 获得领域知识后开始实现
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 各平台注册位置速查
|
|
105
|
+
|
|
106
|
+
新建技能需要修改以下文件:
|
|
107
|
+
|
|
108
|
+
| # | 文件 | 作用 | 必须 |
|
|
109
|
+
|---|------|------|------|
|
|
110
|
+
| 1 | `.claude/skills/{技能名}/SKILL.md` | 技能主文件 | 是 |
|
|
111
|
+
| 2 | `.claude/hooks/skill-forced-eval.js` | Claude Code 触发词注册 | 是 |
|
|
112
|
+
| 3 | `AGENTS.md` | Codex 技能清单 | 是 |
|
|
113
|
+
| 4 | `.cursor/skills/{技能名}/SKILL.md` | Cursor 技能文件 | 是 |
|
|
114
|
+
| 5 | `.cursor/hooks/cursor-skill-eval.js` | Cursor 关键词映射 | 是 |
|
|
115
|
+
| 6 | `.cursor/rules/skill-activation.mdc` | Cursor 规则触发 | 是 |
|
|
116
|
+
| 7 | `.codex/skills/{技能名}/SKILL.md` | Codex 技能文件 | 是 |
|
|
117
|
+
|
|
33
118
|
---
|
|
34
119
|
|
|
35
120
|
## YAML 头部规范
|
|
@@ -60,59 +145,34 @@ description: |
|
|
|
60
145
|
| **格式** | kebab-case(全小写,横线连接) | `json-serialization` |
|
|
61
146
|
| **禁止** | 下划线、驼峰、空格 | ~~`json_serialization`~~, ~~`jsonSerialization`~~ |
|
|
62
147
|
| **长度** | 1-4 个单词 | `ui-pc`, `crud-development`, `redis-cache` |
|
|
148
|
+
| **leniu 前缀** | leniu 专项技能加 `leniu-` 前缀 | `leniu-crud-development` |
|
|
63
149
|
|
|
64
150
|
### description 第一行风格
|
|
65
151
|
|
|
66
|
-
第一行没有强制格式,参考现有技能的两种常见风格:
|
|
67
|
-
|
|
68
152
|
**风格 A:直述型**(多数技能采用)
|
|
69
153
|
```yaml
|
|
70
154
|
description: |
|
|
71
|
-
后端 CRUD
|
|
72
|
-
|
|
73
|
-
后端工具类使用指南。包含 MapstructUtils、StringUtils 等。
|
|
155
|
+
后端 CRUD 开发规范。基于四层架构(Controller → Business → Service → Mapper)。
|
|
156
|
+
后端安全开发规范。包含认证授权、数据脱敏。
|
|
74
157
|
```
|
|
75
158
|
|
|
76
159
|
**风格 B:触发型**
|
|
77
160
|
```yaml
|
|
78
161
|
description: |
|
|
79
162
|
当需要进行技术选型、对比方案时自动使用此 Skill。
|
|
80
|
-
当需要为框架增加新技能时自动使用此 Skill。
|
|
81
163
|
```
|
|
82
164
|
|
|
83
|
-
### 实际技能 YAML 头部示例
|
|
84
|
-
|
|
85
|
-
```yaml
|
|
86
165
|
---
|
|
87
|
-
name: crud-development
|
|
88
|
-
description: |
|
|
89
|
-
后端 CRUD 开发规范。基于 RuoYi-Vue-Plus 三层架构(Controller → Service → Mapper),无独立 DAO 层。
|
|
90
166
|
|
|
91
|
-
|
|
92
|
-
- 新建业务模块的 CRUD 功能
|
|
93
|
-
- 创建 Entity、BO、VO、Service、Mapper、Controller
|
|
94
|
-
- 分页查询、新增、修改、删除、导出
|
|
95
|
-
- 查询条件构建(buildQueryWrapper)
|
|
167
|
+
## 第 0 步:理解需求
|
|
96
168
|
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
```
|
|
169
|
+
> 跳过条件:技能的使用模式已经很清楚时可跳过。
|
|
100
170
|
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
name: redis-cache
|
|
104
|
-
description: |
|
|
105
|
-
当需要使用Redis缓存、分布式锁、限流等功能时自动使用此Skill。
|
|
171
|
+
创建有效技能前,先用具体示例理解技能将如何被使用:
|
|
106
172
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
- 实现分布式锁
|
|
111
|
-
- 实现接口限流
|
|
112
|
-
|
|
113
|
-
触发词:Redis、缓存、Cache、@Cacheable、@CacheEvict、@CachePut、RedisUtils、CacheUtils、分布式锁、RLock、限流、RateLimiter
|
|
114
|
-
---
|
|
115
|
-
```
|
|
173
|
+
1. **收集使用场景**:用户会说什么触发这个技能?
|
|
174
|
+
2. **识别可复用内容**:哪些代码/模板/参考文档在每次使用时都会重复?
|
|
175
|
+
3. **确定资源类型**:重复代码/技术文档 → `references/`;输出模板 → `assets/`;高频规则 → SKILL.md 正文
|
|
116
176
|
|
|
117
177
|
---
|
|
118
178
|
|
|
@@ -120,37 +180,26 @@ description: |
|
|
|
120
180
|
|
|
121
181
|
### 1.1 定义技能属性
|
|
122
182
|
|
|
123
|
-
创建前先明确:
|
|
124
|
-
|
|
125
183
|
| 属性 | 说明 | 示例 |
|
|
126
184
|
|------|------|------|
|
|
127
|
-
| **名称** | kebab-case 格式 | `payment-gateway` |
|
|
128
|
-
| **类别** |
|
|
185
|
+
| **名称** | kebab-case 格式 | `leniu-payment-gateway` |
|
|
186
|
+
| **类别** | 后端/通用/前端 | 后端 |
|
|
129
187
|
| **触发场景** | 至少 3 个具体场景 | 支付接入、退款处理、对账 |
|
|
130
188
|
| **触发词** | 至少 5 个关键词 | 支付、退款、订单、对账、Payment |
|
|
131
|
-
| **参考代码** | 项目中的真实代码位置 | `
|
|
189
|
+
| **参考代码** | 项目中的真实代码位置 | `sys-canteen/.../order/` |
|
|
132
190
|
|
|
133
191
|
### 1.2 检查范围冲突
|
|
134
192
|
|
|
135
193
|
查看现有技能列表,确保不与已有技能重叠:
|
|
136
194
|
|
|
137
|
-
|
|
195
|
+
```bash
|
|
196
|
+
# 查看所有技能
|
|
197
|
+
ls .claude/skills/
|
|
198
|
+
```
|
|
138
199
|
|
|
139
|
-
|
|
140
|
-
|------|------|
|
|
141
|
-
| 后端开发 | crud-development, api-development, database-ops, backend-annotations, utils-toolkit, error-handler |
|
|
142
|
-
| 安全权限 | security-guard, data-permission, tenant-management |
|
|
143
|
-
| 中间件 | redis-cache, json-serialization, scheduled-jobs, file-oss-management |
|
|
144
|
-
| 通信集成 | websocket-sse, sms-mail, social-login, workflow-engine |
|
|
145
|
-
| 质量保障 | test-development, bug-detective, performance-doctor, code-patterns |
|
|
146
|
-
| 架构决策 | architecture-design, tech-decision, brainstorm, project-navigator |
|
|
147
|
-
| 工具流程 | git-workflow, task-tracker, add-skill |
|
|
148
|
-
| 前端(需 plus-ui) | ui-pc, store-pc |
|
|
149
|
-
| 特殊功能 | banana-image, collaborating-with-codex, collaborating-with-gemini |
|
|
150
|
-
|
|
151
|
-
如果新技能与现有技能有交集,在 SKILL.md 中用"注意"段落说明边界:
|
|
200
|
+
如果新技能与现有技能有交集,在 SKILL.md 末尾用"注意"段落说明边界:
|
|
152
201
|
```markdown
|
|
153
|
-
注意:如果是认证授权(登录、Token
|
|
202
|
+
注意:如果是认证授权(登录、Token),请使用 leniu-security-guard。
|
|
154
203
|
```
|
|
155
204
|
|
|
156
205
|
---
|
|
@@ -196,27 +245,28 @@ description: |
|
|
|
196
245
|
### 2.3 内容质量要点
|
|
197
246
|
|
|
198
247
|
- **代码示例必须来自项目实际代码**,不要虚构类名、方法名
|
|
199
|
-
- **包名统一 `org.dromara
|
|
200
|
-
-
|
|
201
|
-
- **对象转换用 `
|
|
248
|
+
- **包名统一 `net.xnzn.core.*`**,不要出现 `org.dromara.*` 或 `com.ruoyi.*`
|
|
249
|
+
- **四层架构**:Controller → Business → Service → Mapper
|
|
250
|
+
- **对象转换用 `BeanUtil.copyProperties()`**(Hutool),不要写 MapstructUtils
|
|
251
|
+
- **异常用 `LeException`**,不要写 ServiceException
|
|
252
|
+
- **审计字段**:`crby/crtime/upby/uptime`,不要写 createBy/createTime
|
|
202
253
|
- 技能不需要固定行数要求,以内容实用为准(实际范围 200-650 行)
|
|
203
254
|
|
|
204
255
|
### 2.4 不同类型技能的侧重
|
|
205
256
|
|
|
206
|
-
| 类型 | 侧重 |
|
|
207
|
-
|
|
208
|
-
| 后端开发类 | 代码模板、标准写法、禁止项 |
|
|
209
|
-
|
|
|
210
|
-
|
|
|
211
|
-
| 流程类 | 步骤说明、决策树、检查清单 | brainstorm |
|
|
257
|
+
| 类型 | 侧重 |
|
|
258
|
+
|------|------|
|
|
259
|
+
| 后端开发类 | 代码模板、标准写法、禁止项 |
|
|
260
|
+
| 工具/中间件类 | API 列表、配置方法、使用示例 |
|
|
261
|
+
| 流程/报表类 | 步骤说明、SQL 模板、决策树 |
|
|
212
262
|
|
|
213
263
|
---
|
|
214
264
|
|
|
215
|
-
## 第 3
|
|
265
|
+
## 第 3 步:注册技能(Claude Code)
|
|
216
266
|
|
|
217
|
-
|
|
267
|
+
技能需要在 **两个** 位置注册,才能被 Claude Code 识别和激活。
|
|
218
268
|
|
|
219
|
-
### 3.1 在 Hook 中注册
|
|
269
|
+
### 3.1 在 Claude Hook 中注册
|
|
220
270
|
|
|
221
271
|
**文件**:`.claude/hooks/skill-forced-eval.js`
|
|
222
272
|
|
|
@@ -228,43 +278,97 @@ description: |
|
|
|
228
278
|
|
|
229
279
|
**示例**:
|
|
230
280
|
```javascript
|
|
231
|
-
- payment-gateway: 支付/退款/对账/Payment/支付宝/微信支付
|
|
281
|
+
- leniu-payment-gateway: 支付/退款/对账/Payment/支付宝/微信支付
|
|
232
282
|
```
|
|
233
283
|
|
|
234
|
-
|
|
284
|
+
**注意**:按逻辑分组插入(leniu 专项技能放在一起),不是追加到末尾。
|
|
235
285
|
|
|
236
286
|
### 3.2 在 AGENTS.md 中注册
|
|
237
287
|
|
|
238
288
|
**文件**:`AGENTS.md` 的"技能清单与触发条件"表格
|
|
239
289
|
|
|
240
|
-
在对应分类下添加一行:
|
|
241
|
-
|
|
242
290
|
```markdown
|
|
243
291
|
| `{技能名}` | {触发条件简述} |
|
|
244
292
|
```
|
|
245
293
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
294
|
+
### 3.3 验证 Claude Code 注册
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
grep "{技能名}" .claude/hooks/skill-forced-eval.js
|
|
298
|
+
grep "{技能名}" AGENTS.md
|
|
249
299
|
```
|
|
250
300
|
|
|
251
|
-
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## 第 4 步:注册技能(Cursor)
|
|
304
|
+
|
|
305
|
+
Cursor 有**三处**需要注册。
|
|
306
|
+
|
|
307
|
+
### 4.1 复制 SKILL.md 到 Cursor
|
|
252
308
|
|
|
253
309
|
```bash
|
|
254
|
-
|
|
255
|
-
|
|
310
|
+
mkdir -p .cursor/skills/{技能名}
|
|
311
|
+
cp .claude/skills/{技能名}/SKILL.md .cursor/skills/{技能名}/SKILL.md
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### 4.2 在 Cursor Hook 中注册
|
|
315
|
+
|
|
316
|
+
**文件**:`.cursor/hooks/cursor-skill-eval.js`
|
|
256
317
|
|
|
257
|
-
|
|
258
|
-
|
|
318
|
+
在 `skillMap` 数组的对应分组中添加条目:
|
|
319
|
+
|
|
320
|
+
```javascript
|
|
321
|
+
// 在 skillMap 数组中找到对应分组,添加:
|
|
322
|
+
{
|
|
323
|
+
name: '{技能名}',
|
|
324
|
+
keywords: ['关键词1', '关键词2', '关键词3', '关键词4', '关键词5']
|
|
325
|
+
},
|
|
259
326
|
```
|
|
260
327
|
|
|
261
|
-
|
|
328
|
+
**分组说明**(按注释标记):
|
|
329
|
+
- `// ========== leniu 专项技能 ==========` — leniu 前缀的技能
|
|
330
|
+
- `// ========== OpenSpec 工作流 ==========` — openspec 技能
|
|
331
|
+
- `// ========== 通用技能 ==========` — 通用技能(无 leniu 前缀)
|
|
332
|
+
|
|
333
|
+
**示例**:
|
|
334
|
+
```javascript
|
|
335
|
+
{
|
|
336
|
+
name: 'leniu-payment-gateway',
|
|
337
|
+
keywords: ['leniu-支付', 'leniu-退款', 'leniu-对账', '支付宝', '微信支付']
|
|
338
|
+
},
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### 4.3 在 Cursor Rules 中注册
|
|
342
|
+
|
|
343
|
+
**文件**:`.cursor/rules/skill-activation.mdc`
|
|
344
|
+
|
|
345
|
+
在对应分组的表格中添加一行:
|
|
346
|
+
|
|
347
|
+
```markdown
|
|
348
|
+
| {触发词,用/分隔} | `.cursor/skills/{技能名}/SKILL.md` |
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
**分组说明**:
|
|
352
|
+
- `### leniu 专项技能` — leniu 前缀的技能
|
|
353
|
+
- `### OpenSpec 工作流技能` — openspec 技能
|
|
354
|
+
- `### 通用技能` — 通用技能
|
|
355
|
+
|
|
356
|
+
**示例**:
|
|
357
|
+
```markdown
|
|
358
|
+
| leniu-支付/leniu-退款/leniu-对账/支付宝/微信支付 | `.cursor/skills/leniu-payment-gateway/SKILL.md` |
|
|
359
|
+
```
|
|
262
360
|
|
|
263
|
-
|
|
361
|
+
### 4.4 验证 Cursor 注册
|
|
264
362
|
|
|
265
|
-
|
|
363
|
+
```bash
|
|
364
|
+
grep "{技能名}" .cursor/hooks/cursor-skill-eval.js
|
|
365
|
+
grep "{技能名}" .cursor/rules/skill-activation.mdc
|
|
366
|
+
ls .cursor/skills/{技能名}/SKILL.md
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
---
|
|
266
370
|
|
|
267
|
-
|
|
371
|
+
## 第 5 步:Codex 同步
|
|
268
372
|
|
|
269
373
|
```bash
|
|
270
374
|
# 1. 创建 Codex 目录
|
|
@@ -279,74 +383,106 @@ diff .claude/skills/{技能名}/SKILL.md .codex/skills/{技能名}/SKILL.md
|
|
|
279
383
|
|
|
280
384
|
**注意**:
|
|
281
385
|
- `.codex/skills/` 中额外存放斜杠命令型技能(如 dev, crud, check 等),这些不需要在 `.claude/` 中创建
|
|
282
|
-
-
|
|
386
|
+
- 普通技能(非斜杠命令)需要保持三个目录一致
|
|
283
387
|
|
|
284
388
|
---
|
|
285
389
|
|
|
286
|
-
## 第
|
|
390
|
+
## 第 6 步:验证
|
|
287
391
|
|
|
288
392
|
### 完整检查清单
|
|
289
393
|
|
|
290
|
-
|
|
394
|
+
**主文件**:
|
|
291
395
|
- [ ] `.claude/skills/{技能名}/SKILL.md` 已创建
|
|
396
|
+
|
|
397
|
+
**Claude Code 注册**:
|
|
398
|
+
- [ ] `.claude/hooks/skill-forced-eval.js` 已添加技能条目
|
|
399
|
+
- [ ] `AGENTS.md` 已添加技能条目
|
|
400
|
+
|
|
401
|
+
**Cursor 注册**:
|
|
402
|
+
- [ ] `.cursor/skills/{技能名}/SKILL.md` 已同步
|
|
403
|
+
- [ ] `.cursor/hooks/cursor-skill-eval.js` skillMap 已添加条目
|
|
404
|
+
- [ ] `.cursor/rules/skill-activation.mdc` 已添加触发行
|
|
405
|
+
|
|
406
|
+
**Codex 同步**:
|
|
292
407
|
- [ ] `.codex/skills/{技能名}/SKILL.md` 已同步
|
|
293
408
|
|
|
294
409
|
**YAML 头部**:
|
|
295
410
|
- [ ] `name` 使用 kebab-case 格式
|
|
296
411
|
- [ ] description 包含触发场景(至少 3 个)
|
|
297
412
|
- [ ] description 包含触发词(至少 5 个)
|
|
298
|
-
- [ ] 各部分之间有空行
|
|
299
|
-
|
|
300
|
-
**注册**:
|
|
301
|
-
- [ ] `.claude/hooks/skill-forced-eval.js` 已添加技能条目
|
|
302
|
-
- [ ] `AGENTS.md` 已添加技能条目
|
|
303
413
|
|
|
304
414
|
**内容**:
|
|
305
415
|
- [ ] 代码示例来自项目实际代码,无虚构内容
|
|
306
|
-
- [ ] 包名使用 `
|
|
416
|
+
- [ ] 包名使用 `net.xnzn.core.*`
|
|
307
417
|
- [ ] 与现有技能无范围冲突(或已说明边界)
|
|
308
418
|
|
|
419
|
+
### 一键验证命令
|
|
420
|
+
|
|
421
|
+
```bash
|
|
422
|
+
SKILL_NAME="{技能名}"
|
|
423
|
+
|
|
424
|
+
echo "=== Claude ===" && \
|
|
425
|
+
ls .claude/skills/$SKILL_NAME/SKILL.md && \
|
|
426
|
+
grep "$SKILL_NAME" .claude/hooks/skill-forced-eval.js && \
|
|
427
|
+
grep "$SKILL_NAME" AGENTS.md && \
|
|
428
|
+
echo "" && echo "=== Cursor ===" && \
|
|
429
|
+
ls .cursor/skills/$SKILL_NAME/SKILL.md && \
|
|
430
|
+
grep "$SKILL_NAME" .cursor/hooks/cursor-skill-eval.js && \
|
|
431
|
+
grep "$SKILL_NAME" .cursor/rules/skill-activation.mdc && \
|
|
432
|
+
echo "" && echo "=== Codex ===" && \
|
|
433
|
+
ls .codex/skills/$SKILL_NAME/SKILL.md && \
|
|
434
|
+
echo "" && echo "=== 三平台一致性 ===" && \
|
|
435
|
+
diff .claude/skills/$SKILL_NAME/SKILL.md .cursor/skills/$SKILL_NAME/SKILL.md && \
|
|
436
|
+
diff .claude/skills/$SKILL_NAME/SKILL.md .codex/skills/$SKILL_NAME/SKILL.md && \
|
|
437
|
+
echo "全部通过"
|
|
438
|
+
```
|
|
439
|
+
|
|
309
440
|
---
|
|
310
441
|
|
|
311
442
|
## 常见陷阱
|
|
312
443
|
|
|
313
|
-
### 1.
|
|
444
|
+
### 1. 遗漏注册(最常见)
|
|
314
445
|
|
|
315
446
|
**症状**:技能文件存在但从不被激活
|
|
316
447
|
|
|
317
|
-
**原因**:只创建了 SKILL.md
|
|
448
|
+
**原因**:只创建了 SKILL.md,没有完成注册。三平台共 **7 处**需要操作。
|
|
318
449
|
|
|
319
|
-
|
|
450
|
+
**解决**:对照第 6 步检查清单逐项确认
|
|
320
451
|
|
|
321
|
-
### 2.
|
|
452
|
+
### 2. Cursor Hook 遗漏
|
|
322
453
|
|
|
323
|
-
|
|
454
|
+
**症状**:Claude Code 中正常,Cursor 中技能不激活
|
|
324
455
|
|
|
325
|
-
|
|
456
|
+
**原因**:只注册了 `.cursor/rules/skill-activation.mdc`,忘了注册 `.cursor/hooks/cursor-skill-eval.js`(或反之)
|
|
326
457
|
|
|
327
|
-
|
|
458
|
+
**解决**:Cursor 有两处需要注册——Hook 负责编程匹配触发,Rules 负责规则文本触发,**两处都需要**
|
|
328
459
|
|
|
329
|
-
### 3.
|
|
460
|
+
### 3. 三平台 SKILL.md 不一致
|
|
330
461
|
|
|
331
|
-
|
|
462
|
+
**症状**:不同平台的 AI 给出不同的代码建议
|
|
332
463
|
|
|
333
|
-
|
|
464
|
+
**原因**:修改了 `.claude/` 中的 SKILL.md 后,忘记同步到 `.cursor/` 和 `.codex/`
|
|
334
465
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
466
|
+
**解决**:修改后执行同步:
|
|
467
|
+
```bash
|
|
468
|
+
SKILL_NAME="{技能名}"
|
|
469
|
+
cp .claude/skills/$SKILL_NAME/SKILL.md .cursor/skills/$SKILL_NAME/SKILL.md
|
|
470
|
+
cp .claude/skills/$SKILL_NAME/SKILL.md .codex/skills/$SKILL_NAME/SKILL.md
|
|
471
|
+
```
|
|
338
472
|
|
|
339
|
-
|
|
473
|
+
### 4-7. 其他常见问题
|
|
340
474
|
|
|
341
|
-
|
|
475
|
+
| # | 症状 | 原因 | 解决 |
|
|
476
|
+
|---|------|------|------|
|
|
477
|
+
| 4 | 技能频繁误触发 | 触发词太通用(如"开发") | 用具体术语(如"CRUD开发") |
|
|
478
|
+
| 5 | 生成代码引用不存在的类 | 代码示例虚构 | 编写前用 Grep/Glob 确认类和方法存在 |
|
|
479
|
+
| 6 | 多技能触发、指导矛盾 | 技能范围重叠 | SKILL.md 末尾添加"注意"段落说明边界 |
|
|
480
|
+
| 7 | 生成代码编译失败 | 写了 `org.dromara.*` | 统一使用 `net.xnzn.core.*` |
|
|
342
481
|
|
|
343
|
-
|
|
482
|
+
---
|
|
344
483
|
|
|
345
|
-
|
|
484
|
+
## 迭代优化
|
|
346
485
|
|
|
347
|
-
|
|
486
|
+
技能创建后持续改进:使用技能完成真实任务 → 发现不足 → 更新 SKILL.md → 同步三平台 → 重新测试。
|
|
348
487
|
|
|
349
|
-
|
|
350
|
-
```
|
|
351
|
-
注意:如果是行级数据权限(@DataPermission),请使用 data-permission。
|
|
352
|
-
```
|
|
488
|
+
> **提示**:不要创建多余的文档文件(README.md 等)。技能只包含 AI 执行任务所需的信息。
|