@devflow-tools/cli 0.18.28 → 0.18.30

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.
Files changed (31) hide show
  1. package/dist/lib/plugin-setup.d.ts.map +1 -1
  2. package/dist/lib/plugin-setup.js +5 -2
  3. package/dist/lib/plugin-setup.js.map +1 -1
  4. package/dist/plugin-files/.claude-plugin/plugin.json +1 -1
  5. package/dist/plugin-files/dist/command-registry.json +7 -7
  6. package/dist/plugin-files/dist/hooks/hook-daemon.js +25 -25
  7. package/dist/plugin-files/package.json +13 -14
  8. package/dist/plugin-files/skills/delivery/SKILL.md +3 -0
  9. package/package.json +28 -28
  10. package/dist/plugin-files/CLAUDE.md +0 -34
  11. package/dist/plugin-files/dist/skills/devflow:animation/SKILL.md +0 -65
  12. package/dist/plugin-files/dist/skills/devflow:context/SKILL.md +0 -90
  13. package/dist/plugin-files/dist/skills/devflow:css/SKILL.md +0 -65
  14. package/dist/plugin-files/dist/skills/devflow:delivery/SKILL.md +0 -126
  15. package/dist/plugin-files/dist/skills/devflow:docker/SKILL.md +0 -69
  16. package/dist/plugin-files/dist/skills/devflow:doctor/SKILL.md +0 -43
  17. package/dist/plugin-files/dist/skills/devflow:electron/SKILL.md +0 -69
  18. package/dist/plugin-files/dist/skills/devflow:git/SKILL.md +0 -69
  19. package/dist/plugin-files/dist/skills/devflow:graph/SKILL.md +0 -80
  20. package/dist/plugin-files/dist/skills/devflow:graphql/SKILL.md +0 -68
  21. package/dist/plugin-files/dist/skills/devflow:knowledge/SKILL.md +0 -80
  22. package/dist/plugin-files/dist/skills/devflow:memory/SKILL.md +0 -79
  23. package/dist/plugin-files/dist/skills/devflow:nest/SKILL.md +0 -70
  24. package/dist/plugin-files/dist/skills/devflow:nextjs/SKILL.md +0 -67
  25. package/dist/plugin-files/dist/skills/devflow:performance/SKILL.md +0 -69
  26. package/dist/plugin-files/dist/skills/devflow:react/SKILL.md +0 -96
  27. package/dist/plugin-files/dist/skills/devflow:tailwind/SKILL.md +0 -67
  28. package/dist/plugin-files/dist/skills/devflow:taro/SKILL.md +0 -68
  29. package/dist/plugin-files/dist/skills/devflow:ui-layout/SKILL.md +0 -65
  30. package/dist/plugin-files/dist/skills/devflow:vue/SKILL.md +0 -74
  31. package/dist/plugin-files/dist/skills/devflow:workflow/SKILL.md +0 -80
@@ -1,69 +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__plugin_devflow_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
- 以下版本描述知识源,不代表目标项目版本;目标项目的 package.json 与 lockfile 证据始终优先。
59
-
60
- - electron-docs: 30.0.0 — https://www.electronjs.org/docs/latest/
61
-
62
- ## 工作流
63
-
64
- | 场景 | 触发方式 |
65
- |------|----------|
66
- | 新建 IPC 通道:定义 API → Preload 暴露 → 主进程处理 | 调用 MCP 工具 `electron_new:ipc` |
67
- | 安全审计:配置检查 → IPC 暴露面 → CSP → 第三方依赖 | 调用 MCP 工具 `electron_audit:security` |
68
- | 自动更新配置:electron-updater → 发布渠道 → 更新 UI | 调用 MCP 工具 `electron_setup:auto-update` |
69
- | Electron Bug 诊断:进程分类 → IPC 追踪 → 原生调试 | 调用 MCP 工具 `electron_diagnose_bug` |
@@ -1,69 +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__plugin_devflow_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
- 以下版本描述知识源,不代表目标项目版本;目标项目的 package.json 与 lockfile 证据始终优先。
58
-
59
- - conventional-commits: 1.0.0 — https://www.conventionalcommits.org/en/v1.0.0/
60
- - git-scm-docs: 2.45.0 — https://git-scm.com/docs
61
-
62
- ## 工作流
63
-
64
- | 场景 | 触发方式 |
65
- |------|----------|
66
- | 规范化提交: | 调用 MCP 工具 `git_commit` |
67
- | 发布流程: | 调用 MCP 工具 `git_release` |
68
- | 分支清理: | 调用 MCP 工具 `git_audit:branches` |
69
- | 冲突解决: | 调用 MCP 工具 `git_resolve:conflicts` |
@@ -1,80 +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__plugin_devflow_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
- ## 工作流(必须按顺序执行)
32
-
33
- ### Step 1: 获取精确上下文
34
- 调用 `mcp__plugin_devflow_devflow__get_project_context` 获取与用户问题相关的代码、记忆和知识库信息。
35
- 这一步确保你拿到的是项目真实状态,而非凭空猜测。
36
-
37
- ### Step 2: 分析
38
- 基于 Step 1 返回的上下文,分析问题根因或设计方案。
39
- 此时可以自由使用 Read 查看具体文件。
40
-
41
- ### Step 3: 执行
42
- 根据分析结果修改代码,逐文件编辑。
43
-
44
- ### Step 4: 验证
45
- 运行类型检查和测试,确保改动正确。
46
-
47
- ## 可用工具
48
-
49
- | 工具 | 何时调用 |
50
- |------|----------|
51
- | `mcp__plugin_devflow_devflow__get_project_context` | 每次任务第一步(必须) |
52
- | `mcp__plugin_devflow_devflow__get_dependency_graph` | 按需调用 |
53
-
54
- ## 规则
55
- - 永远从 `mcp__plugin_devflow_devflow__get_project_context` 开始——你不知道项目里有什么
56
- - 上下文返回后,用 Read 确认关键文件
57
- - 改完代码后跑类型检查
58
-
59
- ## 规则
60
- - 永远从 `get_project_context` 开始——你不知道项目里有什么
61
- - 上下文返回后,用 Read 确认关键文件
62
- - 改完代码后跑类型检查
63
-
64
- ## 规则
65
- - 永远从 `get_dependency_graph` 开始——你不知道项目里有什么
66
- - 上下文返回后,用 Read 确认关键文件
67
- - 改完代码后跑类型检查
68
-
69
- # /devflow:graph
70
-
71
- ## 执行
72
-
73
- 调用 `mcp__plugin_devflow_devflow__get_dependency_graph` MCP 工具:
74
-
75
- ```
76
- target = "all" (默认,拉取完整图谱)
77
- depth = 2 (默认,可调整 1-5)
78
- ```
79
-
80
- 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
- ---
7
-
8
- <HARD-GATE>
9
- 收到 devflow:graphql 时,必须先调用以下 MCP 工具之一:
10
- graphql_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:graphql","required_mcp_tools":["graphql_diagnose_bug"],"description":"devflow:graphql 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__plugin_devflow_devflow__graphql_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
- # ◈ GRAPHQL
32
-
33
- 你是一个 GraphQL 专家。使用 Schema-First 设计,Apollo Server 实现。遇到问题先查文档,不凭空猜测。
34
-
35
- ## 适用场景
36
-
37
- **新建 GraphQL Type + Resolver + DataLoader**
38
-
39
- **N+1 检测与修复:扫描 Resolver → 识别批量模式 → 加 DataLoader**
40
-
41
- **Schema 设计审查:类型设计 → 分页模式 → 安全风险评估**
42
-
43
- **GraphQL Bug 诊断:查询分析 → Resolver 链追踪 → 修复**
44
-
45
- ## 核心规则
46
-
47
- - 使用 Schema-First 设计(SDL)定义类型和操作
48
- - Resolver 保持简洁,业务逻辑在 Service 层
49
- - 使用 DataLoader 解决 N+1 查询问题
50
- - Mutation 命名使用动词(create/update/delete)
51
- - 使用 Connection 模式实现分页
52
- - 限制查询深度和复杂度防止滥用
53
- - 遇到不确定的 Schema 设计时先查 GraphQL 官方规范
54
-
55
- ## 知识来源
56
-
57
- 以下版本描述知识源,不代表目标项目版本;目标项目的 package.json 与 lockfile 证据始终优先。
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,80 +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__plugin_devflow_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
- ## 工作流(必须按顺序执行)
32
-
33
- ### Step 1: 获取精确上下文
34
- 调用 `mcp__plugin_devflow_devflow__get_project_context` 获取与用户问题相关的代码、记忆和知识库信息。
35
- 这一步确保你拿到的是项目真实状态,而非凭空猜测。
36
-
37
- ### Step 2: 分析
38
- 基于 Step 1 返回的上下文,分析问题根因或设计方案。
39
- 此时可以自由使用 Read 查看具体文件。
40
-
41
- ### Step 3: 执行
42
- 根据分析结果修改代码,逐文件编辑。
43
-
44
- ### Step 4: 验证
45
- 运行类型检查和测试,确保改动正确。
46
-
47
- ## 可用工具
48
-
49
- | 工具 | 何时调用 |
50
- |------|----------|
51
- | `mcp__plugin_devflow_devflow__get_project_context` | 每次任务第一步(必须) |
52
- | `mcp__plugin_devflow_devflow__get_knowledge` | 按需调用 |
53
-
54
- ## 规则
55
- - 永远从 `mcp__plugin_devflow_devflow__get_project_context` 开始——你不知道项目里有什么
56
- - 上下文返回后,用 Read 确认关键文件
57
- - 改完代码后跑类型检查
58
-
59
- ## 规则
60
- - 永远从 `get_project_context` 开始——你不知道项目里有什么
61
- - 上下文返回后,用 Read 确认关键文件
62
- - 改完代码后跑类型检查
63
-
64
- ## 规则
65
- - 永远从 `get_knowledge` 开始——你不知道项目里有什么
66
- - 上下文返回后,用 Read 确认关键文件
67
- - 改完代码后跑类型检查
68
-
69
- # /devflow:knowledge
70
-
71
- ## 执行
72
-
73
- 调用 `mcp__plugin_devflow_devflow__get_knowledge` MCP 工具:
74
-
75
- ```
76
- query = 用户的查询内容
77
- scope = "all" (默认;可选 react/vue/nest)
78
- ```
79
-
80
- DevFlow 知识库预索引了 React、Vue、NestJS、TypeScript 官方文档(带版本标签和代码示例),比 WebSearch/WebFetch 更快更准。
@@ -1,79 +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__plugin_devflow_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
- ## 工作流(必须按顺序执行)
32
-
33
- ### Step 1: 获取精确上下文
34
- 调用 `mcp__plugin_devflow_devflow__get_project_context` 获取与用户问题相关的代码、记忆和知识库信息。
35
- 这一步确保你拿到的是项目真实状态,而非凭空猜测。
36
-
37
- ### Step 2: 分析
38
- 基于 Step 1 返回的上下文,分析问题根因或设计方案。
39
- 此时可以自由使用 Read 查看具体文件。
40
-
41
- ### Step 3: 执行
42
- 根据分析结果修改代码,逐文件编辑。
43
-
44
- ### Step 4: 验证
45
- 运行类型检查和测试,确保改动正确。
46
-
47
- ## 可用工具
48
-
49
- | 工具 | 何时调用 |
50
- |------|----------|
51
- | `mcp__plugin_devflow_devflow__get_project_context` | 每次任务第一步(必须) |
52
- | `mcp__plugin_devflow_devflow__get_memory` | 按需调用 |
53
-
54
- ## 规则
55
- - 永远从 `mcp__plugin_devflow_devflow__get_project_context` 开始——你不知道项目里有什么
56
- - 上下文返回后,用 Read 确认关键文件
57
- - 改完代码后跑类型检查
58
-
59
- ## 规则
60
- - 永远从 `get_project_context` 开始——你不知道项目里有什么
61
- - 上下文返回后,用 Read 确认关键文件
62
- - 改完代码后跑类型检查
63
-
64
- ## 规则
65
- - 永远从 `get_memory` 开始——你不知道项目里有什么
66
- - 上下文返回后,用 Read 确认关键文件
67
- - 改完代码后跑类型检查
68
-
69
- # /devflow:memory
70
-
71
- ## 执行
72
-
73
- 调用 `mcp__plugin_devflow_devflow__get_memory` MCP 工具(无需参数):
74
-
75
- ```
76
- (无参数 — 返回技术栈、约定、偏好、历史决策)
77
- ```
78
-
79
- 项目记忆存储在 DevFlow 结构化数据库中,只有通过 MCP 工具才能获取完整数据。
@@ -1,70 +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__plugin_devflow_devflow__nest_diagnose_bug`
24
- - `mcp__plugin_devflow_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
- 以下版本描述知识源,不代表目标项目版本;目标项目的 package.json 与 lockfile 证据始终优先。
60
-
61
- - nestjs-docs: 10.3.0 — https://docs.nestjs.com/
62
-
63
- ## 工作流
64
-
65
- | 场景 | 触发方式 |
66
- |------|----------|
67
- | 新建 NestJS 模块(Controller + Service + Module + DTO + 测试) | 调用 MCP 工具 `nest_new_module` |
68
- | Bug 排查: | 调用 MCP 工具 `nest_diagnose_bug` |
69
- | Swagger 文档生成:扫描 API → 补充装饰器 → 验证 | 调用 MCP 工具 `nest_generate:swagger` |
70
- | 微服务端点配置:消息模式 → 传输层 → 客户端代理 | 调用 MCP 工具 `nest_setup:microservice` |
@@ -1,67 +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__plugin_devflow_devflow__nextjs_diagnose_bug`
24
- - `mcp__plugin_devflow_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
- 以下版本描述知识源,不代表目标项目版本;目标项目的 package.json 与 lockfile 证据始终优先。
58
-
59
- - nextjs-docs: 14.2.0 — https://nextjs.org/docs
60
-
61
- ## 工作流
62
-
63
- | 场景 | 触发方式 |
64
- |------|----------|
65
- | 新建 Next.js 页面(路由 + 数据获取 + 渲染策略) | 调用 MCP 工具 `nextjs_new_page` |
66
- | Pages Router → App Router 迁移:路由映射 → 数据获取 → 渐进迁移 | 调用 MCP 工具 `nextjs_migrate:app-router` |
67
- | Bug 排查: | 调用 MCP 工具 `nextjs_diagnose_bug` |
@@ -1,69 +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__plugin_devflow_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
- 以下版本描述知识源,不代表目标项目版本;目标项目的 package.json 与 lockfile 证据始终优先。
59
-
60
- - web-vitals-docs: 2024 — https://web.dev/vitals/
61
-
62
- ## 工作流
63
-
64
- | 场景 | 触发方式 |
65
- |------|----------|
66
- | 性能审计:Lighthouse → Web Vitals → Bundle → 优化方案 | 调用 MCP 工具 `performance_audit_performance` |
67
- | Bundle 优化:分析 → 代码分割 → Tree Shaking → 验证 | 调用 MCP 工具 `performance_optimize:bundle` |
68
- | 加载速度优化:资源加载策略 → 预加载 → 缓存 | 调用 MCP 工具 `performance_optimize:load-speed` |
69
- | 运行时性能优化:长任务 → 渲染卡顿 → 内存泄漏 | 调用 MCP 工具 `performance_optimize:runtime` |