mcp-probe-kit 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.
- package/README.md +66 -5
- package/build/index.js +137 -79
- package/build/tools/code_review.js +33 -0
- package/build/tools/convert.js +9 -0
- package/build/tools/debug.js +41 -0
- package/build/tools/design2code.d.ts +29 -0
- package/build/tools/design2code.js +409 -0
- package/build/tools/estimate.js +41 -9
- package/build/tools/explain.js +8 -0
- package/build/tools/fix_bug.js +44 -0
- package/build/tools/gen_skill.d.ts +16 -0
- package/build/tools/gen_skill.js +543 -0
- package/build/tools/genapi.js +10 -1
- package/build/tools/genchangelog.js +9 -1
- package/build/tools/gendoc.js +9 -0
- package/build/tools/genpr.js +8 -0
- package/build/tools/gentest.js +9 -0
- package/build/tools/genui.js +9 -0
- package/build/tools/index.d.ts +2 -0
- package/build/tools/index.js +2 -0
- package/build/tools/perf.js +37 -0
- package/build/tools/refactor.js +9 -0
- package/build/tools/security_scan.js +35 -9
- package/build/tools/split.js +9 -0
- package/docs/BEST_PRACTICES.md +4 -0
- package/docs/HOW_TO_TRIGGER.html +4 -2
- package/docs/HOW_TO_TRIGGER.md +31 -1
- package/docs/specs/design2code/README.md +0 -0
- package/docs/specs/design2code/requirements.md +0 -0
- package/package.json +2 -2
package/build/tools/perf.js
CHANGED
|
@@ -334,6 +334,43 @@ console.log(\`耗时: \${end - start}ms\`);
|
|
|
334
334
|
|
|
335
335
|
---
|
|
336
336
|
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## 📤 输出格式要求
|
|
340
|
+
|
|
341
|
+
请严格按以下 JSON 格式输出分析结果:
|
|
342
|
+
|
|
343
|
+
\`\`\`json
|
|
344
|
+
{
|
|
345
|
+
"summary": "性能评估总结(一句话)",
|
|
346
|
+
"overall_score": 70,
|
|
347
|
+
"bottlenecks": [
|
|
348
|
+
{
|
|
349
|
+
"type": "algorithm|memory|io|render|database",
|
|
350
|
+
"severity": "critical|high|medium|low",
|
|
351
|
+
"location": { "file": "文件路径", "line": 25 },
|
|
352
|
+
"current_complexity": "O(n²)",
|
|
353
|
+
"evidence": "问题证据描述",
|
|
354
|
+
"fix": "优化建议",
|
|
355
|
+
"expected_improvement": "70%",
|
|
356
|
+
"fix_example": "优化后代码示例"
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"metrics": {
|
|
360
|
+
"time_complexity": "O(n²)",
|
|
361
|
+
"space_complexity": "O(n)",
|
|
362
|
+
"potential_improvement": "60-80%"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
\`\`\`
|
|
366
|
+
|
|
367
|
+
## ⚠️ 边界约束
|
|
368
|
+
|
|
369
|
+
- ❌ 仅分析,不自动修改代码
|
|
370
|
+
- ❌ 不执行性能测试(仅静态分析)
|
|
371
|
+
- ❌ 不做精确的性能数值预测
|
|
372
|
+
- ✅ 输出结构化瓶颈清单和优化建议
|
|
373
|
+
|
|
337
374
|
现在请分析代码,提供详细的性能优化建议。`;
|
|
338
375
|
return {
|
|
339
376
|
content: [
|
package/build/tools/refactor.js
CHANGED
|
@@ -231,15 +231,41 @@ logger.info("API call with token:", maskToken(apiToken))
|
|
|
231
231
|
|
|
232
232
|
---
|
|
233
233
|
|
|
234
|
-
##
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
234
|
+
## 📤 输出格式要求
|
|
235
|
+
|
|
236
|
+
请严格按以下 JSON 格式输出扫描结果:
|
|
237
|
+
|
|
238
|
+
\`\`\`json
|
|
239
|
+
{
|
|
240
|
+
"scan_summary": {
|
|
241
|
+
"total_issues": 5,
|
|
242
|
+
"critical": 1,
|
|
243
|
+
"high": 2,
|
|
244
|
+
"medium": 1,
|
|
245
|
+
"low": 1
|
|
246
|
+
},
|
|
247
|
+
"findings": [
|
|
248
|
+
{
|
|
249
|
+
"severity": "critical|high|medium|low|info",
|
|
250
|
+
"type": "漏洞类型(如 SQL Injection)",
|
|
251
|
+
"cwe": "CWE-89",
|
|
252
|
+
"location": { "file": "文件路径", "line": 42 },
|
|
253
|
+
"vulnerable_code": "问题代码片段",
|
|
254
|
+
"exploit_scenario": "攻击场景描述",
|
|
255
|
+
"fix": "修复建议",
|
|
256
|
+
"fix_example": "修复代码示例"
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
"recommendations": ["安全最佳实践建议1", "建议2"]
|
|
260
|
+
}
|
|
261
|
+
\`\`\`
|
|
262
|
+
|
|
263
|
+
## ⚠️ 边界约束
|
|
264
|
+
|
|
265
|
+
- ❌ 仅分析代码,不执行任何操作
|
|
266
|
+
- ❌ 不做法律/归因结论
|
|
267
|
+
- ❌ 不保证发现所有漏洞(静态分析有局限性)
|
|
268
|
+
- ✅ 输出结构化风险清单和修复建议
|
|
243
269
|
|
|
244
270
|
---
|
|
245
271
|
|
package/build/tools/split.js
CHANGED
package/docs/BEST_PRACTICES.md
CHANGED
package/docs/HOW_TO_TRIGGER.html
CHANGED
|
@@ -30,7 +30,7 @@ table tr:nth-child(even) { background-color: #f9f9f9; }
|
|
|
30
30
|
<body>
|
|
31
31
|
<h1>MCP 工具触发快速手册</h1>
|
|
32
32
|
|
|
33
|
-
<h2>🔑 基础工具(
|
|
33
|
+
<h2>🔑 基础工具(31个)</h2>
|
|
34
34
|
|
|
35
35
|
<h3>代码质量(8个)</h3>
|
|
36
36
|
<p><strong>detect_shell</strong> <span class="keyword">套壳</span><span class="keyword">检测</span> | "detect_shell"</p>
|
|
@@ -42,7 +42,7 @@ table tr:nth-child(even) { background-color: #f9f9f9; }
|
|
|
42
42
|
<p><strong>perf</strong> <span class="keyword">性能</span><span class="keyword">优化</span><span class="keyword">慢</span><span class="keyword">瓶颈</span> | "分析性能" "有没有性能瓶颈"</p>
|
|
43
43
|
<p><strong>fix</strong> <span class="keyword">修复</span><span class="keyword">fix</span><span class="keyword">lint错误</span> | "修复lint错误" "自动修复格式"</p>
|
|
44
44
|
|
|
45
|
-
<h3>开发效率(
|
|
45
|
+
<h3>开发效率(15个)</h3>
|
|
46
46
|
<p><strong>gencommit</strong> <span class="keyword">commit</span><span class="keyword">提交</span> | "生成commit信息" "帮我写提交信息"</p>
|
|
47
47
|
<p><strong>genapi</strong> <span class="keyword">API文档</span><span class="keyword">文档</span> | "生成API文档" "为这个方法添加文档"</p>
|
|
48
48
|
<p><strong>gendoc</strong> <span class="keyword">注释</span><span class="keyword">JSDoc</span> | "添加注释" "生成JSDoc"</p>
|
|
@@ -51,6 +51,7 @@ table tr:nth-child(even) { background-color: #f9f9f9; }
|
|
|
51
51
|
<p><strong>gensql</strong> <span class="keyword">SQL</span><span class="keyword">查询</span><span class="keyword">数据库</span> | "生成SQL查询" "写个查询语句"</p>
|
|
52
52
|
<p><strong>genui</strong> <span class="keyword">组件</span><span class="keyword">UI</span><span class="keyword">界面</span> | "生成Button组件" "创建登录表单"</p>
|
|
53
53
|
<p><strong>gen_mock</strong> <span class="keyword">Mock</span><span class="keyword">模拟数据</span> | "生成Mock数据" "创建测试数据"</p>
|
|
54
|
+
<p><strong>design2code</strong> <span class="keyword">设计稿</span><span class="keyword">图片转代码</span><span class="keyword">HTML转Vue</span> | "把设计稿转成Vue" "图片转代码"</p>
|
|
54
55
|
<p><strong>explain</strong> <span class="keyword">解释</span><span class="keyword">说明</span><span class="keyword">理解</span> | "解释这段代码" "这个方法是干什么的"</p>
|
|
55
56
|
<p><strong>convert</strong> <span class="keyword">转换</span><span class="keyword">改成</span><span class="keyword">迁移</span> | "转成TypeScript" "Class改Hooks"</p>
|
|
56
57
|
<p><strong>css_order</strong> <span class="keyword">CSS顺序</span><span class="keyword">CSS规范</span> | "css_order"</p>
|
|
@@ -122,6 +123,7 @@ table tr:nth-child(even) { background-color: #f9f9f9; }
|
|
|
122
123
|
<tr><td>SQL生成</td><td>SQL、查询、数据库</td><td><code>gensql</code></td></tr>
|
|
123
124
|
<tr><td>UI组件</td><td>组件、UI、界面</td><td><code>genui</code></td></tr>
|
|
124
125
|
<tr><td>Mock数据</td><td>Mock、模拟数据</td><td><code>gen_mock</code></td></tr>
|
|
126
|
+
<tr><td>设计稿转代码</td><td>设计稿、图片转代码、HTML转Vue</td><td><code>design2code</code></td></tr>
|
|
125
127
|
<tr><td>代码转换</td><td>转换、改成、迁移</td><td><code>convert</code></td></tr>
|
|
126
128
|
<tr><td>CSS规范</td><td>CSS顺序</td><td><code>css_order</code></td></tr>
|
|
127
129
|
<tr><td>README</td><td>README、项目文档</td><td><code>genreadme</code></td></tr>
|
package/docs/HOW_TO_TRIGGER.md
CHANGED
|
@@ -346,6 +346,27 @@ AI 需要理解你的意图才能调用正确的工具。使用明确的关键
|
|
|
346
346
|
|
|
347
347
|
---
|
|
348
348
|
|
|
349
|
+
### 1️⃣7️⃣ 设计稿转代码 → `design2code`
|
|
350
|
+
|
|
351
|
+
**触发关键词**:设计稿、图片转代码、HTML转Vue、HTML转React、还原设计
|
|
352
|
+
|
|
353
|
+
**✅ 推荐说法**
|
|
354
|
+
```
|
|
355
|
+
"把这个设计稿转成 Vue 代码"
|
|
356
|
+
"design2code https://example.com/design.png"
|
|
357
|
+
"将这个 HTML 转换为 React 组件"
|
|
358
|
+
"还原这个设计稿"
|
|
359
|
+
"图片转代码"
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
**❌ 不推荐说法**
|
|
363
|
+
```
|
|
364
|
+
"做个页面"(没说基于什么)
|
|
365
|
+
"转一下"(没说转什么)
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
349
370
|
---
|
|
350
371
|
|
|
351
372
|
## 🚀 智能编排工具触发
|
|
@@ -356,7 +377,7 @@ AI 需要理解你的意图才能调用正确的工具。使用明确的关键
|
|
|
356
377
|
|
|
357
378
|
#### 🎯 开发流程类
|
|
358
379
|
|
|
359
|
-
|
|
380
|
+
####### 1️⃣7️⃣ 新功能开发 → `start_feature`
|
|
360
381
|
|
|
361
382
|
**触发关键词**:新功能、开发功能、添加功能、实现功能、feature
|
|
362
383
|
|
|
@@ -822,6 +843,7 @@ AI: [自动调用 start_review 编排]
|
|
|
822
843
|
| 提交代码 | commit、提交信息 | `gencommit` |
|
|
823
844
|
| 代码转换 | 转换、改成、迁移 | `convert` |
|
|
824
845
|
| Mock数据 | Mock、模拟数据 | `gen_mock` |
|
|
846
|
+
| 设计稿转代码 | 设计稿、图片转代码、HTML转Vue | `design2code` |
|
|
825
847
|
| Bug修复流程 | 修复Bug、完整修复 | `fix_bug` |
|
|
826
848
|
| 工作量估算 | 估算、工作量、需要多久 | `estimate` |
|
|
827
849
|
|
|
@@ -908,6 +930,14 @@ AI: [自动调用 start_review 编排]
|
|
|
908
930
|
"重构这个方法,提高可读性"
|
|
909
931
|
```
|
|
910
932
|
|
|
933
|
+
### 设计稿转代码
|
|
934
|
+
```
|
|
935
|
+
"design2code https://example.com/design.png"
|
|
936
|
+
"把这个设计稿转成 Vue 代码"
|
|
937
|
+
"将这个 HTML 转换为 React 组件"
|
|
938
|
+
"design2code" 然后提供设计稿描述
|
|
939
|
+
```
|
|
940
|
+
|
|
911
941
|
### 开发新功能
|
|
912
942
|
```
|
|
913
943
|
"start_feature user-profile '用户个人资料管理'"
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-probe-kit",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "AI Development Enhancement Toolkit - MCP Server with
|
|
3
|
+
"version": "1.8.0",
|
|
4
|
+
"description": "AI Development Enhancement Toolkit - MCP Server with 40 practical tools (32 basic + 8 orchestration) for code quality, development efficiency, and project management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"bin": {
|