scan-debug-skill 1.0.5 → 1.0.6

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/README.md CHANGED
@@ -1,26 +1,64 @@
1
- # scan-debug-skill
2
-
3
- 一套用于代码扫描与调试技能(Scan & Debug Skill)。
4
- 主要应用于sonar和奇安信的常见问题快速修复
5
-
6
- ## 使用方法
7
-
8
- ### 通过 npx 安装
9
-
10
- 在您的项目根目录下运行以下命令:
11
-
12
- ```bash
13
- npx scan-debug-skill
14
- ```
15
-
16
- 运行后,脚本会提示您选择安装目标:
17
-
18
- 1. **Trae**:安装到 `.trae/scan-debug-skill`
19
- 2. **Cursor**:安装到 `.cursor/scan-debug-skill`
20
- 3. **Custom**:安装到指定目录
21
-
22
- ### 包含的内容
23
-
24
- - CSS 最佳实践与规范
25
- - HTML 语义化与安全规范
26
- - JS/TS 编码规范与安全指南
1
+ # scan-debug-skill
2
+
3
+ 一套用于代码扫描与调试技能(Scan & Debug Skill)。
4
+ 主要应用于 SonarQube 和奇安信的常见问题快速修复。
5
+
6
+ A set of code scanning and debugging skills (Scan & Debug Skill).
7
+ Primarily used for quick fixes of common SonarQube and Qianxin issues.
8
+
9
+ ## 使用方法 / Usage
10
+
11
+ ### 通过 npx 安装 / Install via npx
12
+
13
+ 在您的项目根目录下运行以下命令:
14
+ Run the following command in your project root directory:
15
+
16
+ ```bash
17
+ npx scan-debug-skill
18
+ ```
19
+
20
+ 运行后,脚本会提示您选择安装目标:
21
+ After running, the script will prompt you to select an installation target:
22
+
23
+ 1. **Trae**:安装到 `.trae/scan-debug-skill` (Install to `.trae/scan-debug-skill`)
24
+ 2. **Cursor**:安装到 `.cursor/scan-debug-skill` (Install to `.cursor/scan-debug-skill`)
25
+ 3. **Custom**:安装到指定目录 (Install to a specified directory)
26
+
27
+ ### 包含的内容 / Contents
28
+
29
+ - CSS 最佳实践与规范 / CSS Best Practices & Standards
30
+ - HTML 语义化与安全规范 / HTML Semantics & Security Standards
31
+ - JS/TS 编码规范与安全指南 / JS/TS Coding Standards & Security Guidelines
32
+
33
+ ### AI 辅助编码 / AI Assisted Coding
34
+
35
+ 在编辑器中使用 AI 生成或修复代码时,可以通过以下提示词引用此规范:
36
+ When using AI to generate or fix code in the editor, you can reference this standard with the following prompts:
37
+
38
+ - "请根据 `scan-debug-skill` 规范修复当前文件的 Sonar 问题"
39
+ "Please fix Sonar issues in the current file according to `scan-debug-skill` standards"
40
+ - "生成一段 API 请求代码,要求符合 `scan-debug-skill` 中的 JS 安全规范"
41
+ "Generate API request code that complies with the JS security standards in `scan-debug-skill`"
42
+
43
+ ### 项目规则引用 / Project Rules Reference
44
+
45
+ 您可以在 `.cursorrules` 或 `.trae/rules` 文件中添加以下规则,以确保 AI 始终遵循此规范:
46
+ You can add the following rules to your `.cursorrules` or `.trae/rules` file to ensure AI always follows this standard:
47
+ ```
48
+ - When fixing issues, refer to the specific rules in the `scan-debug-skill` documentation.
49
+ ```
50
+
51
+ ## 注意事项 / Notes
52
+
53
+ ⚠️ **资源消耗提醒 (Resource Consumption Warning)**
54
+
55
+ 对整个项目进行全量扫描并自动修复可能会消耗大量的 AI 编码请求次数(Tokens)。
56
+ Scanning and automatically fixing the entire project may consume a large amount of AI coding requests (Tokens).
57
+
58
+ **建议做法 (Recommended Practice)**:
59
+ 1. **按需引用**:在生成新代码时,直接引用本技能规范(如上文 "AI 辅助编码" 所示),从源头保证代码质量。
60
+ 2. **局部修复**:针对单个文件或特定文件夹进行扫描和修复,避免全量操作,以节约资源。
61
+
62
+ **Recommendation**:
63
+ 1. **Reference on Demand**: When generating new code, directly reference this skill standard (as shown in "AI Assisted Coding" above) to ensure code quality from the start.
64
+ 2. **Partial Fix**: Scan and fix specific files or folders instead of the entire project to save resources.
package/SKILL.md CHANGED
@@ -38,6 +38,17 @@ author: [scan-debug-skill](https://github.com/k73333333/ScanDebugSkill)
38
38
 
39
39
  请点击上述链接进入相应的技能目录查看详细指南。
40
40
 
41
+ ### 引用指南
42
+
43
+ 在编辑器中使用 AI 助手生成或修复代码时,可以通过以下方式引用本规范:
44
+
45
+ 1. **代码生成**:在生成代码时,显式要求遵循 `scan-debug-skill` 规范。
46
+ > "生成一段 API 请求代码,请遵循 `scan-debug-skill` 中的 JS 安全规范。"
47
+ 2. **问题修复**:在修复代码问题时,要求 AI 参考本技能集。
48
+ > "请按照 `scan-debug-skill` 修复当前代码的 Sonar 问题。"
49
+ 3. **项目规则配置**:在项目的 `.cursorrules` 或 `.trae/rules` 文件中配置全局引用,使 AI 默认遵循此规范。
50
+ > "Follow the `scan-debug-skill` standards for all code generation and fixes."
51
+
41
52
  ## 扫描结果概览输出规则
42
53
 
43
54
  当用户提供扫描报告或提及多个代码问题时,应首先以表格形式输出扫描结果概览,遵循以下规范:
package/bin/install.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /*
4
- * @Author: fukaidong fukaidong@aspirecn.com
4
+ * @Author: fukaidong
5
5
  * @Date: 2026-02-25 15:50:10
6
- * @LastEditors: fukaidong fukaidong@aspirecn.com
7
- * @LastEditTime: 2026-02-25 16:15:00
6
+ * @LastEditors: fukaidong qiji777@yeah.net
7
+ * @LastEditTime: 2026-02-26 18:33:02
8
8
  * @Description: scan-debug-skill 安装脚本 (ScanDebugSkill Install Script)
9
9
  * 包含更新处理逻辑:安装前清理旧版本核心目录,确保无残留文件。
10
10
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "scan-debug-skill",
3
- "version": "1.0.5",
4
- "description": "一套用代码扫描与调试技能(Scan & Debug Skill)。主要应用于sonar和奇安信的常见问题快速修复",
3
+ "version": "1.0.6",
4
+ "description": "A set of code scanning and debugging skills, primarily for quick fixes of common SonarQube and Qianxin issues. | 一套代码扫描与调试技能,主要应用于 SonarQube 和奇安信常见问题的快速修复。",
5
5
  "bin": {
6
6
  "scan-debug-skill": "./bin/install.js"
7
7
  },
@@ -12,7 +12,10 @@
12
12
  "trae",
13
13
  "skill",
14
14
  "debug",
15
- "scan"
15
+ "scan",
16
+ "sonar 扫描和问题修复",
17
+ "奇安信 扫描和问题修复",
18
+ "代码扫描修复skill"
16
19
  ],
17
20
  "author": "",
18
21
  "license": "MIT",