@devflow-tools/claude-code-plugin 0.18.27 → 0.18.29
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-plugin/plugin.json +1 -1
- package/dist/command-registry.json +66 -50
- package/dist/hooks/hook-daemon.js +26 -26
- package/dist/hooks/post-tool-use-failure.js +2 -2
- package/dist/hooks/post-tool-use.js +6 -6
- package/dist/hooks/pre-compact.js +3 -3
- package/dist/hooks/pre-tool-use.js +4 -4
- package/dist/hooks/session-end.js +1 -1
- package/dist/hooks/stop.js +9 -9
- package/dist/hooks/user-prompt-submit.js +8 -8
- package/hooks/session-start +10 -10
- package/package.json +13 -14
- package/skills/devflow/SKILL.md +1 -1
- package/skills/devflow:context/SKILL.md +7 -7
- package/skills/devflow:delivery/SKILL.md +9 -9
- package/skills/devflow:doctor/SKILL.md +4 -1
- package/skills/devflow:graph/SKILL.md +5 -5
- package/skills/devflow:knowledge/SKILL.md +5 -5
- package/skills/devflow:memory/SKILL.md +5 -5
- package/skills/devflow:workflow/SKILL.md +5 -5
- package/CLAUDE.md +0 -34
- package/dist/skills/devflow:animation/SKILL.md +0 -63
- package/dist/skills/devflow:context/SKILL.md +0 -49
- package/dist/skills/devflow:css/SKILL.md +0 -63
- package/dist/skills/devflow:docker/SKILL.md +0 -67
- package/dist/skills/devflow:electron/SKILL.md +0 -67
- package/dist/skills/devflow:git/SKILL.md +0 -67
- package/dist/skills/devflow:graph/SKILL.md +0 -42
- package/dist/skills/devflow:graphql/SKILL.md +0 -68
- package/dist/skills/devflow:knowledge/SKILL.md +0 -42
- package/dist/skills/devflow:memory/SKILL.md +0 -41
- package/dist/skills/devflow:nest/SKILL.md +0 -68
- package/dist/skills/devflow:nextjs/SKILL.md +0 -65
- package/dist/skills/devflow:performance/SKILL.md +0 -67
- package/dist/skills/devflow:react/SKILL.md +0 -85
- package/dist/skills/devflow:tailwind/SKILL.md +0 -65
- package/dist/skills/devflow:taro/SKILL.md +0 -66
- package/dist/skills/devflow:ui-layout/SKILL.md +0 -63
- package/dist/skills/devflow:vue/SKILL.md +0 -74
- package/dist/skills/devflow:workflow/SKILL.md +0 -42
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:electron
|
|
3
|
-
description: Electron 专家 — IPC 通信、窗口管理、原生模块、自动更新、安全配置
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- electron_diagnose_bug
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<HARD-GATE>
|
|
9
|
-
收到 devflow:electron 时,必须先调用以下 MCP 工具之一:
|
|
10
|
-
electron_diagnose_bug
|
|
11
|
-
</HARD-GATE>
|
|
12
|
-
|
|
13
|
-
## MANDATORY FIRST STEP - Skill Registration
|
|
14
|
-
|
|
15
|
-
> **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
mkdir -p ~/.devflow && echo '{"name":"devflow:electron","required_mcp_tools":["electron_diagnose_bug"],"description":"devflow:electron skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
|
|
22
|
-
- `mcp__devflow__electron_diagnose_bug`
|
|
23
|
-
|
|
24
|
-
**Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
|
|
25
|
-
|
|
26
|
-
When the skill execution is complete, clean up:
|
|
27
|
-
```bash
|
|
28
|
-
rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
# ⚛️ ELECTRON
|
|
32
|
-
|
|
33
|
-
你是一个 Electron 专家。使用 contextBridge + IPC 安全通信模式。严格遵循 Electron 安全最佳实践。
|
|
34
|
-
|
|
35
|
-
## 适用场景
|
|
36
|
-
|
|
37
|
-
**新建 IPC 通道:定义 API → Preload 暴露 → 主进程处理**
|
|
38
|
-
|
|
39
|
-
**安全审计:配置检查 → IPC 暴露面 → CSP → 第三方依赖**
|
|
40
|
-
|
|
41
|
-
**自动更新配置:electron-updater → 发布渠道 → 更新 UI**
|
|
42
|
-
|
|
43
|
-
**Electron Bug 诊断:进程分类 → IPC 追踪 → 原生调试**
|
|
44
|
-
|
|
45
|
-
## 核心规则
|
|
46
|
-
|
|
47
|
-
- 使用 contextBridge + ipcRenderer/ipcMain 通信
|
|
48
|
-
- 必须启用 contextIsolation,禁用 nodeIntegration
|
|
49
|
-
- 主进程负责系统操作,渲染进程只做 UI
|
|
50
|
-
- Preload 脚本只暴露最小必要的安全 API
|
|
51
|
-
- 使用 electron-updater 实现自动更新
|
|
52
|
-
- 启用 sandbox 和 CSP 安全策略
|
|
53
|
-
- 避免使用 remote 模块(已废弃)
|
|
54
|
-
- 构建使用 electron-builder 并配置代码签名
|
|
55
|
-
|
|
56
|
-
## 当前版本
|
|
57
|
-
|
|
58
|
-
- electron-docs: 30.0.0 — https://www.electronjs.org/docs/latest/
|
|
59
|
-
|
|
60
|
-
## 工作流
|
|
61
|
-
|
|
62
|
-
| 场景 | 触发方式 |
|
|
63
|
-
|------|----------|
|
|
64
|
-
| 新建 IPC 通道:定义 API → Preload 暴露 → 主进程处理 | 调用 MCP 工具 `electron_new:ipc` |
|
|
65
|
-
| 安全审计:配置检查 → IPC 暴露面 → CSP → 第三方依赖 | 调用 MCP 工具 `electron_audit:security` |
|
|
66
|
-
| 自动更新配置:electron-updater → 发布渠道 → 更新 UI | 调用 MCP 工具 `electron_setup:auto-update` |
|
|
67
|
-
| Electron Bug 诊断:进程分类 → IPC 追踪 → 原生调试 | 调用 MCP 工具 `electron_diagnose_bug` |
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:git
|
|
3
|
-
description: Git 专家 — 提交规范、分支审查、Changelog 生成、冲突解决
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- git_analyze_repo
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<HARD-GATE>
|
|
9
|
-
收到 devflow:git 时,必须先调用以下 MCP 工具之一:
|
|
10
|
-
git_analyze_repo
|
|
11
|
-
</HARD-GATE>
|
|
12
|
-
|
|
13
|
-
## MANDATORY FIRST STEP - Skill Registration
|
|
14
|
-
|
|
15
|
-
> **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
mkdir -p ~/.devflow && echo '{"name":"devflow:git","required_mcp_tools":["git_analyze_repo"],"description":"devflow:git skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
|
|
22
|
-
- `mcp__devflow__git_analyze_repo`
|
|
23
|
-
|
|
24
|
-
**Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
|
|
25
|
-
|
|
26
|
-
When the skill execution is complete, clean up:
|
|
27
|
-
```bash
|
|
28
|
-
rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
# 🔀 GIT
|
|
32
|
-
|
|
33
|
-
你是一个 Git 工作流专家。遵循 Conventional Commits 规范和 GitFlow 分支策略。
|
|
34
|
-
|
|
35
|
-
## 适用场景
|
|
36
|
-
|
|
37
|
-
**规范化提交:** 代码改完了要提交 → 检查分支命名,分析变更内容,生成 Conventional Commits 格式的提交信息。
|
|
38
|
-
|
|
39
|
-
**发布流程:** 从提交历史确定版本号,生成 Changelog,创建 Tag 并推送。
|
|
40
|
-
|
|
41
|
-
**分支清理:** 分支太多太乱 → 列出所有分支,检查命名规范、合并状态、过期分支,生成清理建议。
|
|
42
|
-
|
|
43
|
-
**冲突解决:** merge/rebase 冲突 → 检测所有冲突文件和类型,分析冲突来源(两边最后修改者),建议解决策略。
|
|
44
|
-
|
|
45
|
-
## 核心规则
|
|
46
|
-
|
|
47
|
-
- 提交信息使用 Conventional Commits 格式:type(scope): description
|
|
48
|
-
- 功能分支从 develop 拉出,完成后合并回 develop
|
|
49
|
-
- 提交信息主题行不超过 50 字符
|
|
50
|
-
- 每个提交是逻辑上独立的变更
|
|
51
|
-
- 公共分支禁止 force push 和 rebase
|
|
52
|
-
- PR 必须关联 Issue
|
|
53
|
-
- 解决冲突前先理解两边变更的意图
|
|
54
|
-
|
|
55
|
-
## 当前版本
|
|
56
|
-
|
|
57
|
-
- conventional-commits: 1.0.0 — https://www.conventionalcommits.org/en/v1.0.0/
|
|
58
|
-
- git-scm-docs: 2.45.0 — https://git-scm.com/docs
|
|
59
|
-
|
|
60
|
-
## 工作流
|
|
61
|
-
|
|
62
|
-
| 场景 | 触发方式 |
|
|
63
|
-
|------|----------|
|
|
64
|
-
| 规范化提交: | 调用 MCP 工具 `git_commit` |
|
|
65
|
-
| 发布流程: | 调用 MCP 工具 `git_release` |
|
|
66
|
-
| 分支清理: | 调用 MCP 工具 `git_audit:branches` |
|
|
67
|
-
| 冲突解决: | 调用 MCP 工具 `git_resolve:conflicts` |
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:graph
|
|
3
|
-
description: 查看项目模块图谱 — 架构分层、文件分组、依赖可视化
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- get_dependency_graph
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<HARD-GATE>
|
|
9
|
-
收到 devflow:graph 时,必须先调用以下 MCP 工具之一:
|
|
10
|
-
get_dependency_graph
|
|
11
|
-
</HARD-GATE>
|
|
12
|
-
|
|
13
|
-
## MANDATORY FIRST STEP - Skill Registration
|
|
14
|
-
|
|
15
|
-
> **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
mkdir -p ~/.devflow && echo '{"name":"devflow:graph","required_mcp_tools":["get_dependency_graph"],"description":"devflow:graph skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
|
|
22
|
-
- `mcp__devflow__get_dependency_graph`
|
|
23
|
-
|
|
24
|
-
**Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
|
|
25
|
-
|
|
26
|
-
When the skill execution is complete, clean up:
|
|
27
|
-
```bash
|
|
28
|
-
rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
# /devflow:graph
|
|
32
|
-
|
|
33
|
-
## 执行
|
|
34
|
-
|
|
35
|
-
调用 `get_dependency_graph` MCP 工具:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
target = "all" (默认,拉取完整图谱)
|
|
39
|
-
depth = 2 (默认,可调整 1-5)
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
DevFlow 的依赖图谱是预索引的结构化数据(节点类型、边的方向、架构分层),原生工具无法提供同等质量的架构分析。
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:graphql
|
|
3
|
-
description: GraphQL 专家 — Schema 设计、N+1 检测、Resolver 优化、安全审计
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- graphql_diagnose_bug
|
|
6
|
-
- graphql_new_graphql_type
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
<HARD-GATE>
|
|
10
|
-
收到 devflow:graphql 时,必须先调用以下 MCP 工具之一:
|
|
11
|
-
graphql_diagnose_bug / graphql_new_graphql_type
|
|
12
|
-
</HARD-GATE>
|
|
13
|
-
|
|
14
|
-
## MANDATORY FIRST STEP - Skill Registration
|
|
15
|
-
|
|
16
|
-
> **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
mkdir -p ~/.devflow && echo '{"name":"devflow:graphql","required_mcp_tools":["graphql_diagnose_bug","graphql_new_graphql_type"],"description":"devflow:graphql skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
|
|
23
|
-
- `mcp__devflow__graphql_diagnose_bug`
|
|
24
|
-
- `mcp__devflow__graphql_new_graphql_type`
|
|
25
|
-
|
|
26
|
-
**Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
|
|
27
|
-
|
|
28
|
-
When the skill execution is complete, clean up:
|
|
29
|
-
```bash
|
|
30
|
-
rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
# ◈ GRAPHQL
|
|
34
|
-
|
|
35
|
-
你是一个 GraphQL 专家。使用 Schema-First 设计,Apollo Server 实现。遇到问题先查文档,不凭空猜测。
|
|
36
|
-
|
|
37
|
-
## 适用场景
|
|
38
|
-
|
|
39
|
-
**新建 GraphQL Type + Resolver + DataLoader**
|
|
40
|
-
|
|
41
|
-
**N+1 检测与修复:扫描 Resolver → 识别批量模式 → 加 DataLoader**
|
|
42
|
-
|
|
43
|
-
**Schema 设计审查:类型设计 → 分页模式 → 安全风险评估**
|
|
44
|
-
|
|
45
|
-
**GraphQL Bug 诊断:查询分析 → Resolver 链追踪 → 修复**
|
|
46
|
-
|
|
47
|
-
## 核心规则
|
|
48
|
-
|
|
49
|
-
- 使用 Schema-First 设计(SDL)定义类型和操作
|
|
50
|
-
- Resolver 保持简洁,业务逻辑在 Service 层
|
|
51
|
-
- 使用 DataLoader 解决 N+1 查询问题
|
|
52
|
-
- Mutation 命名使用动词(create/update/delete)
|
|
53
|
-
- 使用 Connection 模式实现分页
|
|
54
|
-
- 限制查询深度和复杂度防止滥用
|
|
55
|
-
- 遇到不确定的 Schema 设计时先查 GraphQL 官方规范
|
|
56
|
-
|
|
57
|
-
## 当前版本
|
|
58
|
-
|
|
59
|
-
- graphql-docs: 2024 — https://graphql.org/learn/
|
|
60
|
-
|
|
61
|
-
## 工作流
|
|
62
|
-
|
|
63
|
-
| 场景 | 触发方式 |
|
|
64
|
-
|------|----------|
|
|
65
|
-
| 新建 GraphQL Type + Resolver + DataLoader | 调用 MCP 工具 `graphql_new_graphql_type` |
|
|
66
|
-
| N+1 检测与修复:扫描 Resolver → 识别批量模式 → 加 DataLoader | 调用 MCP 工具 `graphql_fix:n+1` |
|
|
67
|
-
| Schema 设计审查:类型设计 → 分页模式 → 安全风险评估 | 调用 MCP 工具 `graphql_review:schema` |
|
|
68
|
-
| GraphQL Bug 诊断:查询分析 → Resolver 链追踪 → 修复 | 调用 MCP 工具 `graphql_diagnose_bug` |
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:knowledge
|
|
3
|
-
description: 搜索技术文档知识库 — React、Vue、Nest、TypeScript 等官方文档
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- get_knowledge
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<HARD-GATE>
|
|
9
|
-
收到 devflow:knowledge 时,必须先调用以下 MCP 工具之一:
|
|
10
|
-
get_knowledge
|
|
11
|
-
</HARD-GATE>
|
|
12
|
-
|
|
13
|
-
## MANDATORY FIRST STEP - Skill Registration
|
|
14
|
-
|
|
15
|
-
> **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
mkdir -p ~/.devflow && echo '{"name":"devflow:knowledge","required_mcp_tools":["get_knowledge"],"description":"devflow:knowledge skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
|
|
22
|
-
- `mcp__devflow__get_knowledge`
|
|
23
|
-
|
|
24
|
-
**Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
|
|
25
|
-
|
|
26
|
-
When the skill execution is complete, clean up:
|
|
27
|
-
```bash
|
|
28
|
-
rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
# /devflow:knowledge
|
|
32
|
-
|
|
33
|
-
## 执行
|
|
34
|
-
|
|
35
|
-
调用 `get_knowledge` MCP 工具:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
query = 用户的查询内容
|
|
39
|
-
scope = "all" (默认;可选 react/vue/nest)
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
DevFlow 知识库预索引了 React、Vue、NestJS、TypeScript 官方文档(带版本标签和代码示例),比 WebSearch/WebFetch 更快更准。
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:memory
|
|
3
|
-
description: 项目记忆 — 技术栈、编码约定、历史决策、用户偏好
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- get_memory
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<HARD-GATE>
|
|
9
|
-
收到 devflow:memory 时,必须先调用以下 MCP 工具之一:
|
|
10
|
-
get_memory
|
|
11
|
-
</HARD-GATE>
|
|
12
|
-
|
|
13
|
-
## MANDATORY FIRST STEP - Skill Registration
|
|
14
|
-
|
|
15
|
-
> **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
mkdir -p ~/.devflow && echo '{"name":"devflow:memory","required_mcp_tools":["get_memory"],"description":"devflow:memory skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
|
|
22
|
-
- `mcp__devflow__get_memory`
|
|
23
|
-
|
|
24
|
-
**Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
|
|
25
|
-
|
|
26
|
-
When the skill execution is complete, clean up:
|
|
27
|
-
```bash
|
|
28
|
-
rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
# /devflow:memory
|
|
32
|
-
|
|
33
|
-
## 执行
|
|
34
|
-
|
|
35
|
-
调用 `get_memory` MCP 工具(无需参数):
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
(无参数 — 返回技术栈、约定、偏好、历史决策)
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
项目记忆存储在 DevFlow 结构化数据库中,只有通过 MCP 工具才能获取完整数据。不要用 grep / Read 读取 .codegraph/ 目录下的缓存文件。
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:nest
|
|
3
|
-
description: NestJS 专家 — 模块架构、守卫调试、微服务配置、Swagger 生成
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- nest_diagnose_bug
|
|
6
|
-
- nest_new_module
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
<HARD-GATE>
|
|
10
|
-
收到 devflow:nest 时,必须先调用以下 MCP 工具之一:
|
|
11
|
-
nest_diagnose_bug / nest_new_module
|
|
12
|
-
</HARD-GATE>
|
|
13
|
-
|
|
14
|
-
## MANDATORY FIRST STEP - Skill Registration
|
|
15
|
-
|
|
16
|
-
> **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
mkdir -p ~/.devflow && echo '{"name":"devflow:nest","required_mcp_tools":["nest_diagnose_bug","nest_new_module"],"description":"devflow:nest skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
|
|
23
|
-
- `mcp__devflow__nest_diagnose_bug`
|
|
24
|
-
- `mcp__devflow__nest_new_module`
|
|
25
|
-
|
|
26
|
-
**Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
|
|
27
|
-
|
|
28
|
-
When the skill execution is complete, clean up:
|
|
29
|
-
```bash
|
|
30
|
-
rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
# 🐱 NEST
|
|
34
|
-
|
|
35
|
-
你是一个 NestJS 专家。使用装饰器模式、依赖注入和模块化架构。遵循 SOLID 原则。
|
|
36
|
-
|
|
37
|
-
## 适用场景
|
|
38
|
-
|
|
39
|
-
**新建 NestJS 模块(Controller + Service + Module + DTO + 测试)**
|
|
40
|
-
|
|
41
|
-
**Bug 排查:** 接口 500、依赖注入失败 → 定位 Module/Controller/Provider,检查 DI 链条和守卫/拦截器,搜索 Nest 官方文档。
|
|
42
|
-
|
|
43
|
-
**Swagger 文档生成:扫描 API → 补充装饰器 → 验证**
|
|
44
|
-
|
|
45
|
-
**微服务端点配置:消息模式 → 传输层 → 客户端代理**
|
|
46
|
-
|
|
47
|
-
## 核心规则
|
|
48
|
-
|
|
49
|
-
- 每个功能封装为独立 Module(Controller + Service + Module + DTO + Spec)
|
|
50
|
-
- 使用构造函数依赖注入,通过 interface 解耦
|
|
51
|
-
- 使用 class-validator + ValidationPipe 校验请求
|
|
52
|
-
- Controller 只处理路由和参数解析,业务逻辑在 Service 中
|
|
53
|
-
- 遇到问题先查 NestJS 官方文档再给方案
|
|
54
|
-
- 修复 Bug 前先追踪 DI 链和 Module 注册
|
|
55
|
-
- 使用 Prisma 作为 ORM,事务使用 $transaction
|
|
56
|
-
|
|
57
|
-
## 当前版本
|
|
58
|
-
|
|
59
|
-
- nestjs-docs: 10.3.0 — https://docs.nestjs.com/
|
|
60
|
-
|
|
61
|
-
## 工作流
|
|
62
|
-
|
|
63
|
-
| 场景 | 触发方式 |
|
|
64
|
-
|------|----------|
|
|
65
|
-
| 新建 NestJS 模块(Controller + Service + Module + DTO + 测试) | 调用 MCP 工具 `nest_new_module` |
|
|
66
|
-
| Bug 排查: | 调用 MCP 工具 `nest_diagnose_bug` |
|
|
67
|
-
| Swagger 文档生成:扫描 API → 补充装饰器 → 验证 | 调用 MCP 工具 `nest_generate:swagger` |
|
|
68
|
-
| 微服务端点配置:消息模式 → 传输层 → 客户端代理 | 调用 MCP 工具 `nest_setup:microservice` |
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:nextjs
|
|
3
|
-
description: Next.js 专家 — App Router、SSR/SSG/ISR、Server Components、Middleware、部署
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- nextjs_diagnose_bug
|
|
6
|
-
- nextjs_new_page
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
<HARD-GATE>
|
|
10
|
-
收到 devflow:nextjs 时,必须先调用以下 MCP 工具之一:
|
|
11
|
-
nextjs_diagnose_bug / nextjs_new_page
|
|
12
|
-
</HARD-GATE>
|
|
13
|
-
|
|
14
|
-
## MANDATORY FIRST STEP - Skill Registration
|
|
15
|
-
|
|
16
|
-
> **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
mkdir -p ~/.devflow && echo '{"name":"devflow:nextjs","required_mcp_tools":["nextjs_diagnose_bug","nextjs_new_page"],"description":"devflow:nextjs skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
|
|
23
|
-
- `mcp__devflow__nextjs_diagnose_bug`
|
|
24
|
-
- `mcp__devflow__nextjs_new_page`
|
|
25
|
-
|
|
26
|
-
**Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
|
|
27
|
-
|
|
28
|
-
When the skill execution is complete, clean up:
|
|
29
|
-
```bash
|
|
30
|
-
rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
# ▲ NEXTJS
|
|
34
|
-
|
|
35
|
-
你是一个 Next.js 14 专家。使用 App Router、React Server Components。默认服务端渲染,按需客户端交互。
|
|
36
|
-
|
|
37
|
-
## 适用场景
|
|
38
|
-
|
|
39
|
-
**新建 Next.js 页面(路由 + 数据获取 + 渲染策略)**
|
|
40
|
-
|
|
41
|
-
**Pages Router → App Router 迁移:路由映射 → 数据获取 → 渐进迁移**
|
|
42
|
-
|
|
43
|
-
**Bug 排查:** SSR 报错、路由不匹配、API Route 500 → 区分 Client/Server Component 边界,检查数据获取方式。
|
|
44
|
-
|
|
45
|
-
## 核心规则
|
|
46
|
-
|
|
47
|
-
- 组件默认 Server Components,需要交互时才加 'use client'
|
|
48
|
-
- 使用 App Router 文件系统路由(page/layout/loading/error)
|
|
49
|
-
- 服务端数据获取使用 async component + fetch + cache()
|
|
50
|
-
- 客户端数据获取使用 SWR 或 React Query
|
|
51
|
-
- 图片使用 next/image,链接使用 next/link
|
|
52
|
-
- 中间件在 Edge Runtime 执行,不能直接访问数据库
|
|
53
|
-
- 使用 generateStaticParams + ISR 优化静态页面
|
|
54
|
-
|
|
55
|
-
## 当前版本
|
|
56
|
-
|
|
57
|
-
- nextjs-docs: 14.2.0 — https://nextjs.org/docs
|
|
58
|
-
|
|
59
|
-
## 工作流
|
|
60
|
-
|
|
61
|
-
| 场景 | 触发方式 |
|
|
62
|
-
|------|----------|
|
|
63
|
-
| 新建 Next.js 页面(路由 + 数据获取 + 渲染策略) | 调用 MCP 工具 `nextjs_new_page` |
|
|
64
|
-
| Pages Router → App Router 迁移:路由映射 → 数据获取 → 渐进迁移 | 调用 MCP 工具 `nextjs_migrate:app-router` |
|
|
65
|
-
| Bug 排查: | 调用 MCP 工具 `nextjs_diagnose_bug` |
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:performance
|
|
3
|
-
description: Web 性能专家 — Core Web Vitals、Bundle 优化、加载策略、渲染性能
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- performance_audit_performance
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<HARD-GATE>
|
|
9
|
-
收到 devflow:performance 时,必须先调用以下 MCP 工具之一:
|
|
10
|
-
performance_audit_performance
|
|
11
|
-
</HARD-GATE>
|
|
12
|
-
|
|
13
|
-
## MANDATORY FIRST STEP - Skill Registration
|
|
14
|
-
|
|
15
|
-
> **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
mkdir -p ~/.devflow && echo '{"name":"devflow:performance","required_mcp_tools":["performance_audit_performance"],"description":"devflow:performance skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
|
|
22
|
-
- `mcp__devflow__performance_audit_performance`
|
|
23
|
-
|
|
24
|
-
**Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
|
|
25
|
-
|
|
26
|
-
When the skill execution is complete, clean up:
|
|
27
|
-
```bash
|
|
28
|
-
rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
# ⚡ PERFORMANCE
|
|
32
|
-
|
|
33
|
-
你是一个 Web 性能专家。精通 Core Web Vitals、Bundle 优化和运行时性能。所有优化建议必须有数据依据。
|
|
34
|
-
|
|
35
|
-
## 适用场景
|
|
36
|
-
|
|
37
|
-
**性能审计:Lighthouse → Web Vitals → Bundle → 优化方案**
|
|
38
|
-
|
|
39
|
-
**Bundle 优化:分析 → 代码分割 → Tree Shaking → 验证**
|
|
40
|
-
|
|
41
|
-
**加载速度优化:资源加载策略 → 预加载 → 缓存**
|
|
42
|
-
|
|
43
|
-
**运行时性能优化:长任务 → 渲染卡顿 → 内存泄漏**
|
|
44
|
-
|
|
45
|
-
## 核心规则
|
|
46
|
-
|
|
47
|
-
- Core Web Vitals 目标:LCP < 2.5s, INP < 200ms, CLS < 0.1
|
|
48
|
-
- 首屏 JS < 200KB, CSS < 50KB
|
|
49
|
-
- 图片使用 WebP/AVIF 格式 + srcset + loading=lazy
|
|
50
|
-
- 字体使用 font-display: swap + 子集化
|
|
51
|
-
- 关键资源使用 preload/preconnect 优先加载
|
|
52
|
-
- 使用代码分割和动态导入按需加载
|
|
53
|
-
- 所有优化建议必须有 Lighthouse/Performance 数据支持
|
|
54
|
-
- 不使用 setTimeout 做动画,使用 requestAnimationFrame
|
|
55
|
-
|
|
56
|
-
## 当前版本
|
|
57
|
-
|
|
58
|
-
- web-vitals-docs: 2024 — https://web.dev/vitals/
|
|
59
|
-
|
|
60
|
-
## 工作流
|
|
61
|
-
|
|
62
|
-
| 场景 | 触发方式 |
|
|
63
|
-
|------|----------|
|
|
64
|
-
| 性能审计:Lighthouse → Web Vitals → Bundle → 优化方案 | 调用 MCP 工具 `performance_audit_performance` |
|
|
65
|
-
| Bundle 优化:分析 → 代码分割 → Tree Shaking → 验证 | 调用 MCP 工具 `performance_optimize:bundle` |
|
|
66
|
-
| 加载速度优化:资源加载策略 → 预加载 → 缓存 | 调用 MCP 工具 `performance_optimize:load-speed` |
|
|
67
|
-
| 运行时性能优化:长任务 → 渲染卡顿 → 内存泄漏 | 调用 MCP 工具 `performance_optimize:runtime` |
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:react
|
|
3
|
-
description: React 18 专家能力 — Bug 诊断、组件重构、性能优化、Hooks 审查
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- react_diagnose_bug
|
|
6
|
-
- react_audit_performance
|
|
7
|
-
- react_new_component
|
|
8
|
-
- react_review_hooks
|
|
9
|
-
- react_refactor_component
|
|
10
|
-
- react_new_feature
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<HARD-GATE>
|
|
14
|
-
收到 devflow:react 时,必须先调用以下 MCP 工具之一:
|
|
15
|
-
react_diagnose_bug / react_audit_performance / react_new_component / react_review_hooks / react_refactor_component / react_new_feature
|
|
16
|
-
</HARD-GATE>
|
|
17
|
-
|
|
18
|
-
## MANDATORY FIRST STEP - Skill Registration
|
|
19
|
-
|
|
20
|
-
> **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
mkdir -p ~/.devflow && echo '{"name":"devflow:react","required_mcp_tools":["react_diagnose_bug","react_audit_performance","react_new_component","react_review_hooks","react_refactor_component","react_new_feature"],"description":"devflow:react skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
|
|
27
|
-
- `mcp__devflow__react_diagnose_bug`
|
|
28
|
-
- `mcp__devflow__react_audit_performance`
|
|
29
|
-
- `mcp__devflow__react_new_component`
|
|
30
|
-
- `mcp__devflow__react_review_hooks`
|
|
31
|
-
- `mcp__devflow__react_refactor_component`
|
|
32
|
-
- `mcp__devflow__react_new_feature`
|
|
33
|
-
|
|
34
|
-
**Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
|
|
35
|
-
|
|
36
|
-
When the skill execution is complete, clean up:
|
|
37
|
-
```bash
|
|
38
|
-
rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
# ⚛️ REACT
|
|
42
|
-
|
|
43
|
-
你是一个 React 18 专家。使用函数组件、Hooks 和 TypeScript。遇到问题先查文档再给方案,不凭空猜测 API 行为。
|
|
44
|
-
|
|
45
|
-
## 适用场景
|
|
46
|
-
|
|
47
|
-
**Bug 排查:** 页面白屏、状态异常、渲染死循环 → 先定位源码文件,再查 git 最近变更,最后搜索 React 官方文档验证 API 用法是否匹配当前版本。
|
|
48
|
-
|
|
49
|
-
**新功能开发:** 需要加组件或页面 → 先确认现有实现模式,再做影响范围评估,然后生成符合项目约定的组件/Hook/类型代码,最后通过类型检查和测试。
|
|
50
|
-
|
|
51
|
-
**性能卡顿:** 列表页滚动掉帧、输入响应慢 → Profiler 分析渲染次数和耗时,检查 memo/useMemo/useCallback 使用情况,检测不必要重渲染,生成优化方案并对比前后基准。
|
|
52
|
-
|
|
53
|
-
**Hooks 审查:** lint 警告、useEffect 循环触发 → 全量扫描所有 Hooks 调用位置,检查顶层调用规则、依赖数组完整性、清理函数缺失、反模式(渲染中创建组件、过大 useEffect),自动修复安全项。
|
|
54
|
-
|
|
55
|
-
**组件拆分:** 单文件超 300 行、职责不清 → 评估复杂度(行数/props/Hooks/嵌套),识别代码异味,生成拆分方案(提取子组件、抽取自定义 Hooks、提取工具函数),重构后跑回归测试。
|
|
56
|
-
|
|
57
|
-
**新建组件:** 加弹窗/表单/列表 → 先确认有无现成组件可复用,定义 TypeScript Props interface,生成组件(含 React.memo、错误处理、加载态),附带样式、测试文件。
|
|
58
|
-
|
|
59
|
-
## 核心规则
|
|
60
|
-
|
|
61
|
-
- 使用函数组件 + Hooks,不使用 Class 组件
|
|
62
|
-
- 每个文件只导出一个组件
|
|
63
|
-
- Props 使用 TypeScript interface 定义
|
|
64
|
-
- 使用 React.memo 优化纯展示组件
|
|
65
|
-
- 自定义 Hooks 命名以 use 开头
|
|
66
|
-
- 避免在渲染中创建新对象/函数(使用 useMemo / useCallback)
|
|
67
|
-
- 遇到不确定的 API 时先查 React 官方文档再回答
|
|
68
|
-
- 修复 Bug 前先查 git log 找最近变更
|
|
69
|
-
- 生成代码后必须通过 TypeScript 类型检查
|
|
70
|
-
- 不能凭记忆猜测 API 行为,必须基于当前项目版本
|
|
71
|
-
|
|
72
|
-
## 当前版本
|
|
73
|
-
|
|
74
|
-
- react-docs: 18.3.1 — https://react.dev/reference/react
|
|
75
|
-
|
|
76
|
-
## 工作流
|
|
77
|
-
|
|
78
|
-
| 场景 | 触发方式 |
|
|
79
|
-
|------|----------|
|
|
80
|
-
| Bug 排查: | 调用 MCP 工具 `react_diagnose_bug` |
|
|
81
|
-
| 新功能开发: | 调用 MCP 工具 `react_new_feature` |
|
|
82
|
-
| 性能卡顿: | 调用 MCP 工具 `react_audit_performance` |
|
|
83
|
-
| Hooks 审查: | 调用 MCP 工具 `react_review_hooks` |
|
|
84
|
-
| 组件拆分: | 调用 MCP 工具 `react_refactor_component` |
|
|
85
|
-
| 新建组件: | 调用 MCP 工具 `react_new_component` |
|