ai-engineering-init 1.3.4 → 1.4.1
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 +2 -0
- package/.claude/settings.json +3 -3
- package/.claude/skills/add-skill/SKILL.md +79 -32
- 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 -365
- package/.claude/skills/leniu-report-customization/references/table-fields.md +93 -0
- package/.claude/skills/leniu-report-standard-customization/SKILL.md +111 -334
- 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 +79 -32
- 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 -365
- package/.codex/skills/leniu-report-customization/references/table-fields.md +93 -0
- package/.codex/skills/leniu-report-standard-customization/SKILL.md +111 -334
- 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/cursor-skill-eval.js +53 -1
- package/.cursor/hooks.json +3 -3
- package/.cursor/skills/add-skill/SKILL.md +79 -32
- 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 -365
- package/.cursor/skills/leniu-report-customization/references/table-fields.md +93 -0
- package/.cursor/skills/leniu-report-standard-customization/SKILL.md +111 -334
- 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/package.json +1 -1
|
@@ -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/行级权限
|
|
@@ -108,6 +109,7 @@ const instructions = `## 强制技能激活流程(必须执行)
|
|
|
108
109
|
- leniu-java-total-line: 合计行/totalLine/报表合计/SUM合计/ReportBaseTotalVO/合计查询
|
|
109
110
|
- leniu-report-customization: 定制报表/汇总报表/report_order_info/report_order_detail/report_account_flow/退款汇总/消费金额统计/订单报表/流水报表
|
|
110
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
|
|
111
113
|
- leniu-crud-development: CRUD/增删改查/新建模块/Business层/Service/Mapper/Controller/分页查询/LeRequest/PageDTO/PageVO/事务管理
|
|
112
114
|
- leniu-database-ops: 数据库/SQL/建表/双库/商户库/系统库/审计字段/crby/crtime/del_flag
|
|
113
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
|
]
|
|
@@ -18,6 +18,57 @@ description: |
|
|
|
18
18
|
|
|
19
19
|
本指南用于在 leniu-tengyun-core 项目中添加新的技能(Skill)。项目同时支持三个 AI 编码平台,技能需在所有平台保持一致。
|
|
20
20
|
|
|
21
|
+
## 核心设计原则
|
|
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
|
+
|
|
21
72
|
### 三平台架构
|
|
22
73
|
|
|
23
74
|
| 平台 | 技能目录 | Hook 文件 | 激活方式 |
|
|
@@ -113,6 +164,18 @@ description: |
|
|
|
113
164
|
|
|
114
165
|
---
|
|
115
166
|
|
|
167
|
+
## 第 0 步:理解需求
|
|
168
|
+
|
|
169
|
+
> 跳过条件:技能的使用模式已经很清楚时可跳过。
|
|
170
|
+
|
|
171
|
+
创建有效技能前,先用具体示例理解技能将如何被使用:
|
|
172
|
+
|
|
173
|
+
1. **收集使用场景**:用户会说什么触发这个技能?
|
|
174
|
+
2. **识别可复用内容**:哪些代码/模板/参考文档在每次使用时都会重复?
|
|
175
|
+
3. **确定资源类型**:重复代码/技术文档 → `references/`;输出模板 → `assets/`;高频规则 → SKILL.md 正文
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
116
179
|
## 第 1 步:规划
|
|
117
180
|
|
|
118
181
|
### 1.1 定义技能属性
|
|
@@ -191,13 +254,11 @@ description: |
|
|
|
191
254
|
|
|
192
255
|
### 2.4 不同类型技能的侧重
|
|
193
256
|
|
|
194
|
-
| 类型 | 侧重 |
|
|
195
|
-
|
|
196
|
-
| 后端开发类 | 代码模板、标准写法、禁止项 |
|
|
197
|
-
|
|
|
198
|
-
|
|
|
199
|
-
| 流程类 | 步骤说明、决策树、检查清单 | leniu-brainstorm |
|
|
200
|
-
| 报表类 | SQL 模板、fix 模式、退款处理 | leniu-report-customization |
|
|
257
|
+
| 类型 | 侧重 |
|
|
258
|
+
|------|------|
|
|
259
|
+
| 后端开发类 | 代码模板、标准写法、禁止项 |
|
|
260
|
+
| 工具/中间件类 | API 列表、配置方法、使用示例 |
|
|
261
|
+
| 流程/报表类 | 步骤说明、SQL 模板、决策树 |
|
|
201
262
|
|
|
202
263
|
---
|
|
203
264
|
|
|
@@ -409,33 +470,19 @@ cp .claude/skills/$SKILL_NAME/SKILL.md .cursor/skills/$SKILL_NAME/SKILL.md
|
|
|
409
470
|
cp .claude/skills/$SKILL_NAME/SKILL.md .codex/skills/$SKILL_NAME/SKILL.md
|
|
410
471
|
```
|
|
411
472
|
|
|
412
|
-
### 4.
|
|
413
|
-
|
|
414
|
-
**症状**:技能在不相关场景被频繁误触发
|
|
415
|
-
|
|
416
|
-
**原因**:触发词太通用(如"开发"、"功能")
|
|
417
|
-
|
|
418
|
-
**解决**:使用具体术语(如"CRUD开发"、"支付接入")
|
|
473
|
+
### 4-7. 其他常见问题
|
|
419
474
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
### 6. 技能范围重叠
|
|
427
|
-
|
|
428
|
-
**症状**:同一个问题触发多个技能,指导矛盾
|
|
429
|
-
|
|
430
|
-
**解决**:在 SKILL.md 末尾添加"注意"段落说明边界:
|
|
431
|
-
```
|
|
432
|
-
注意:如果是行级数据权限(@DataPermission),请使用 leniu-data-permission。
|
|
433
|
-
```
|
|
475
|
+
| # | 症状 | 原因 | 解决 |
|
|
476
|
+
|---|------|------|------|
|
|
477
|
+
| 4 | 技能频繁误触发 | 触发词太通用(如"开发") | 用具体术语(如"CRUD开发") |
|
|
478
|
+
| 5 | 生成代码引用不存在的类 | 代码示例虚构 | 编写前用 Grep/Glob 确认类和方法存在 |
|
|
479
|
+
| 6 | 多技能触发、指导矛盾 | 技能范围重叠 | SKILL.md 末尾添加"注意"段落说明边界 |
|
|
480
|
+
| 7 | 生成代码编译失败 | 写了 `org.dromara.*` | 统一使用 `net.xnzn.core.*` |
|
|
434
481
|
|
|
435
|
-
|
|
482
|
+
---
|
|
436
483
|
|
|
437
|
-
|
|
484
|
+
## 迭代优化
|
|
438
485
|
|
|
439
|
-
|
|
486
|
+
技能创建后持续改进:使用技能完成真实任务 → 发现不足 → 更新 SKILL.md → 同步三平台 → 重新测试。
|
|
440
487
|
|
|
441
|
-
|
|
488
|
+
> **提示**:不要创建多余的文档文件(README.md 等)。技能只包含 AI 执行任务所需的信息。
|