@devflow-tools/cli 0.12.6 → 0.13.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.
Files changed (154) hide show
  1. package/dist/commands/benchmark-cmd.d.ts +5 -0
  2. package/dist/commands/benchmark-cmd.d.ts.map +1 -0
  3. package/dist/commands/benchmark-cmd.js +18 -0
  4. package/dist/commands/benchmark-cmd.js.map +1 -0
  5. package/dist/commands/connect.d.ts +8 -0
  6. package/dist/commands/connect.d.ts.map +1 -0
  7. package/dist/commands/connect.js +26 -0
  8. package/dist/commands/connect.js.map +1 -0
  9. package/dist/commands/context.d.ts +15 -0
  10. package/dist/commands/context.d.ts.map +1 -0
  11. package/dist/commands/context.js +24 -0
  12. package/dist/commands/context.js.map +1 -0
  13. package/dist/commands/dashboard.d.ts +3 -0
  14. package/dist/commands/dashboard.d.ts.map +1 -0
  15. package/dist/commands/dashboard.js +10 -0
  16. package/dist/commands/dashboard.js.map +1 -0
  17. package/dist/commands/doctor.d.ts +56 -0
  18. package/dist/commands/doctor.d.ts.map +1 -0
  19. package/dist/commands/doctor.js +156 -0
  20. package/dist/commands/doctor.js.map +1 -0
  21. package/dist/commands/graph.d.ts +11 -0
  22. package/dist/commands/graph.d.ts.map +1 -0
  23. package/dist/commands/graph.js +14 -0
  24. package/dist/commands/graph.js.map +1 -0
  25. package/dist/commands/index-cmd.d.ts +4 -0
  26. package/dist/commands/index-cmd.d.ts.map +1 -0
  27. package/dist/commands/index-cmd.js +15 -0
  28. package/dist/commands/index-cmd.js.map +1 -0
  29. package/dist/commands/init.d.ts +20 -0
  30. package/dist/commands/init.d.ts.map +1 -0
  31. package/dist/commands/init.js +145 -0
  32. package/dist/commands/init.js.map +1 -0
  33. package/dist/commands/knowledge.d.ts +5 -0
  34. package/dist/commands/knowledge.d.ts.map +1 -0
  35. package/dist/commands/knowledge.js +23 -0
  36. package/dist/commands/knowledge.js.map +1 -0
  37. package/dist/commands/memory.d.ts +5 -0
  38. package/dist/commands/memory.d.ts.map +1 -0
  39. package/dist/commands/memory.js +72 -0
  40. package/dist/commands/memory.js.map +1 -0
  41. package/dist/commands/plugin/install.d.ts +3 -0
  42. package/dist/commands/plugin/install.d.ts.map +1 -0
  43. package/dist/commands/plugin/install.js +22 -0
  44. package/dist/commands/plugin/install.js.map +1 -0
  45. package/dist/commands/plugin/list.d.ts +3 -0
  46. package/dist/commands/plugin/list.d.ts.map +1 -0
  47. package/dist/commands/plugin/list.js +47 -0
  48. package/dist/commands/plugin/list.js.map +1 -0
  49. package/dist/commands/plugin/search.d.ts +3 -0
  50. package/dist/commands/plugin/search.d.ts.map +1 -0
  51. package/dist/commands/plugin/search.js +29 -0
  52. package/dist/commands/plugin/search.js.map +1 -0
  53. package/dist/commands/plugin/uninstall.d.ts +3 -0
  54. package/dist/commands/plugin/uninstall.d.ts.map +1 -0
  55. package/dist/commands/plugin/uninstall.js +21 -0
  56. package/dist/commands/plugin/uninstall.js.map +1 -0
  57. package/dist/commands/plugin-guide.d.ts +19 -0
  58. package/dist/commands/plugin-guide.d.ts.map +1 -0
  59. package/dist/commands/plugin-guide.js +131 -0
  60. package/dist/commands/plugin-guide.js.map +1 -0
  61. package/dist/commands/plugin-loader.d.ts +2 -0
  62. package/dist/commands/plugin-loader.d.ts.map +1 -0
  63. package/dist/commands/plugin-loader.js +2 -0
  64. package/dist/commands/plugin-loader.js.map +1 -0
  65. package/dist/commands/review.d.ts +6 -0
  66. package/dist/commands/review.d.ts.map +1 -0
  67. package/dist/commands/review.js +75 -0
  68. package/dist/commands/review.js.map +1 -0
  69. package/dist/commands/server.d.ts +16 -0
  70. package/dist/commands/server.d.ts.map +1 -0
  71. package/dist/commands/server.js +88 -0
  72. package/dist/commands/server.js.map +1 -0
  73. package/dist/commands/session.d.ts +7 -0
  74. package/dist/commands/session.d.ts.map +1 -0
  75. package/dist/commands/session.js +20 -0
  76. package/dist/commands/session.js.map +1 -0
  77. package/dist/commands/setup.d.ts +6 -0
  78. package/dist/commands/setup.d.ts.map +1 -0
  79. package/dist/commands/setup.js +78 -0
  80. package/dist/commands/setup.js.map +1 -0
  81. package/dist/commands/skill.d.ts +18 -0
  82. package/dist/commands/skill.d.ts.map +1 -0
  83. package/dist/commands/skill.js +105 -0
  84. package/dist/commands/skill.js.map +1 -0
  85. package/dist/commands/start.d.ts +5 -0
  86. package/dist/commands/start.d.ts.map +1 -0
  87. package/dist/commands/start.js +58 -0
  88. package/dist/commands/start.js.map +1 -0
  89. package/dist/commands/status.d.ts +2 -0
  90. package/dist/commands/status.d.ts.map +1 -0
  91. package/dist/commands/status.js +33 -0
  92. package/dist/commands/status.js.map +1 -0
  93. package/dist/commands/stop.d.ts +2 -0
  94. package/dist/commands/stop.d.ts.map +1 -0
  95. package/dist/commands/stop.js +12 -0
  96. package/dist/commands/stop.js.map +1 -0
  97. package/dist/commands/workflow.d.ts +6 -0
  98. package/dist/commands/workflow.d.ts.map +1 -0
  99. package/dist/commands/workflow.js +24 -0
  100. package/dist/commands/workflow.js.map +1 -0
  101. package/dist/index.d.ts +3 -0
  102. package/dist/index.d.ts.map +1 -0
  103. package/dist/index.js +606 -0
  104. package/dist/index.js.map +1 -0
  105. package/dist/lib/paths.d.ts +1 -0
  106. package/dist/lib/paths.d.ts.map +1 -0
  107. package/dist/lib/paths.js +4 -0
  108. package/dist/lib/paths.js.map +1 -0
  109. package/dist/lib/plugin-registry.d.ts +18 -0
  110. package/dist/lib/plugin-registry.d.ts.map +1 -0
  111. package/dist/lib/plugin-registry.js +39 -0
  112. package/dist/lib/plugin-registry.js.map +1 -0
  113. package/dist/lib/plugin-setup.d.ts +23 -0
  114. package/dist/lib/plugin-setup.d.ts.map +1 -0
  115. package/dist/lib/plugin-setup.js +141 -0
  116. package/dist/lib/plugin-setup.js.map +1 -0
  117. package/dist/lib/with-server.d.ts +7 -0
  118. package/dist/lib/with-server.d.ts.map +1 -0
  119. package/dist/lib/with-server.js +28 -0
  120. package/dist/lib/with-server.js.map +1 -0
  121. package/dist/mode.d.ts +10 -0
  122. package/dist/mode.d.ts.map +1 -0
  123. package/dist/mode.js +40 -0
  124. package/dist/mode.js.map +1 -0
  125. package/dist/plugin-files/.claude-plugin/plugin.json +20 -0
  126. package/dist/plugin-files/CLAUDE.md +34 -0
  127. package/dist/plugin-files/dist/command-registry.json +299 -0
  128. package/dist/plugin-files/dist/skills/devflow:animation/SKILL.md +94 -0
  129. package/dist/plugin-files/dist/skills/devflow:context/SKILL.md +90 -0
  130. package/dist/plugin-files/dist/skills/devflow:css/SKILL.md +94 -0
  131. package/dist/plugin-files/dist/skills/devflow:docker/SKILL.md +97 -0
  132. package/dist/plugin-files/dist/skills/devflow:electron/SKILL.md +97 -0
  133. package/dist/plugin-files/dist/skills/devflow:git/SKILL.md +97 -0
  134. package/dist/plugin-files/dist/skills/devflow:graph/SKILL.md +80 -0
  135. package/dist/plugin-files/dist/skills/devflow:graphql/SKILL.md +99 -0
  136. package/dist/plugin-files/dist/skills/devflow:knowledge/SKILL.md +80 -0
  137. package/dist/plugin-files/dist/skills/devflow:memory/SKILL.md +79 -0
  138. package/dist/plugin-files/dist/skills/devflow:nest/SKILL.md +99 -0
  139. package/dist/plugin-files/dist/skills/devflow:nextjs/SKILL.md +97 -0
  140. package/dist/plugin-files/dist/skills/devflow:performance/SKILL.md +97 -0
  141. package/dist/plugin-files/dist/skills/devflow:react/SKILL.md +89 -0
  142. package/dist/plugin-files/dist/skills/devflow:tailwind/SKILL.md +94 -0
  143. package/dist/plugin-files/dist/skills/devflow:taro/SKILL.md +96 -0
  144. package/dist/plugin-files/dist/skills/devflow:ui-layout/SKILL.md +94 -0
  145. package/dist/plugin-files/dist/skills/devflow:vue/SKILL.md +105 -0
  146. package/dist/plugin-files/dist/skills/devflow:workflow/SKILL.md +80 -0
  147. package/dist/plugin-files/hooks/constitution.md +20 -0
  148. package/dist/plugin-files/hooks/post-tool-use +20 -0
  149. package/dist/plugin-files/hooks/pre-tool-use +23 -0
  150. package/dist/plugin-files/hooks/session-start +176 -0
  151. package/dist/plugin-files/hooks/stop +32 -0
  152. package/dist/plugin-files/hooks.json +52 -0
  153. package/dist/plugin-files/package.json +31 -0
  154. package/package.json +27 -27
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: devflow:nextjs
3
+ description: Next.js 专家 — App Router、SSR/SSG/ISR、Server Components、Middleware、部署
4
+ required_mcp_tools:
5
+ - nextjs_new_page
6
+ - nextjs_diagnose_bug
7
+ ---
8
+
9
+ <HARD-GATE>
10
+ 收到 devflow:nextjs 时,必须先调用以下 MCP 工具之一:
11
+ nextjs_new_page / nextjs_diagnose_bug
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_new_page","nextjs_diagnose_bug"],"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_new_page`
24
+ - `mcp__devflow__nextjs_diagnose_bug`
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
+ ## 工作流(必须按顺序执行)
34
+
35
+ ### Step 1: 获取精确上下文
36
+ 调用 `mcp__devflow__get_project_context` 获取与用户问题相关的代码、记忆和知识库信息。
37
+ 这一步确保你拿到的是项目真实状态,而非凭空猜测。
38
+
39
+ ### Step 2: 分析
40
+ 基于 Step 1 返回的上下文,分析问题根因或设计方案。
41
+ 此时可以自由使用 Read 查看具体文件。
42
+
43
+ ### Step 3: 执行
44
+ 根据分析结果修改代码,逐文件编辑。
45
+
46
+ ### Step 4: 验证
47
+ 运行类型检查和测试,确保改动正确。
48
+
49
+ ## 可用工具
50
+
51
+ | 工具 | 何时调用 |
52
+ |------|----------|
53
+ | `mcp__devflow__get_project_context` | 每次任务第一步(必须) |
54
+ | `mcp__devflow__nextjs_new_page` | 按需调用 |
55
+ | `mcp__devflow__nextjs_diagnose_bug` | 按需调用 |
56
+
57
+ ## 规则
58
+ - 永远从 `mcp__devflow__get_project_context` 开始——你不知道项目里有什么
59
+ - 上下文返回后,用 Read 确认关键文件
60
+ - 改完代码后跑类型检查
61
+
62
+ ## 规则
63
+ - 永远从 `get_project_context` 开始——你不知道项目里有什么
64
+ - 上下文返回后,用 Read 确认关键文件
65
+ - 改完代码后跑类型检查
66
+
67
+ ## 规则
68
+ - 永远从 `nextjs_new_page` 开始——你不知道项目里有什么
69
+ - 上下文返回后,用 Read 确认关键文件
70
+ - 改完代码后跑类型检查
71
+
72
+ # ▲ NEXTJS
73
+
74
+ 你是一个 Next.js 14 专家。使用 App Router、React Server Components。默认服务端渲染,按需客户端交互。
75
+
76
+ ## 适用场景
77
+
78
+ **新建 Next.js 页面(路由 + 数据获取 + 渲染策略)**
79
+
80
+ **Pages Router → App Router 迁移:路由映射 → 数据获取 → 渐进迁移**
81
+
82
+ **Bug 排查:** SSR 报错、路由不匹配、API Route 500 → 区分 Client/Server Component 边界,检查数据获取方式。
83
+
84
+ ## 核心规则
85
+
86
+ - 组件默认 Server Components,需要交互时才加 'use client'
87
+ - 使用 App Router 文件系统路由(page/layout/loading/error)
88
+ - 服务端数据获取使用 async component + fetch + cache()
89
+ - 客户端数据获取使用 SWR 或 React Query
90
+ - 图片使用 next/image,链接使用 next/link
91
+ - 中间件在 Edge Runtime 执行,不能直接访问数据库
92
+ - 使用 generateStaticParams + ISR 优化静态页面
93
+
94
+ ## 当前版本
95
+
96
+ - nextjs-docs: 14.2.0 — https://nextjs.org/docs
97
+
@@ -0,0 +1,97 @@
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
+ ## 工作流(必须按顺序执行)
32
+
33
+ ### Step 1: 获取精确上下文
34
+ 调用 `mcp__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__devflow__get_project_context` | 每次任务第一步(必须) |
52
+ | `mcp__devflow__performance_audit_performance` | 按需调用 |
53
+
54
+ ## 规则
55
+ - 永远从 `mcp__devflow__get_project_context` 开始——你不知道项目里有什么
56
+ - 上下文返回后,用 Read 确认关键文件
57
+ - 改完代码后跑类型检查
58
+
59
+ ## 规则
60
+ - 永远从 `get_project_context` 开始——你不知道项目里有什么
61
+ - 上下文返回后,用 Read 确认关键文件
62
+ - 改完代码后跑类型检查
63
+
64
+ ## 规则
65
+ - 永远从 `performance_audit_performance` 开始——你不知道项目里有什么
66
+ - 上下文返回后,用 Read 确认关键文件
67
+ - 改完代码后跑类型检查
68
+
69
+ # ⚡ PERFORMANCE
70
+
71
+ 你是一个 Web 性能专家。精通 Core Web Vitals、Bundle 优化和运行时性能。所有优化建议必须有数据依据。
72
+
73
+ ## 适用场景
74
+
75
+ **性能审计:Lighthouse → Web Vitals → Bundle → 优化方案**
76
+
77
+ **Bundle 优化:分析 → 代码分割 → Tree Shaking → 验证**
78
+
79
+ **加载速度优化:资源加载策略 → 预加载 → 缓存**
80
+
81
+ **运行时性能优化:长任务 → 渲染卡顿 → 内存泄漏**
82
+
83
+ ## 核心规则
84
+
85
+ - Core Web Vitals 目标:LCP < 2.5s, INP < 200ms, CLS < 0.1
86
+ - 首屏 JS < 200KB, CSS < 50KB
87
+ - 图片使用 WebP/AVIF 格式 + srcset + loading=lazy
88
+ - 字体使用 font-display: swap + 子集化
89
+ - 关键资源使用 preload/preconnect 优先加载
90
+ - 使用代码分割和动态导入按需加载
91
+ - 所有优化建议必须有 Lighthouse/Performance 数据支持
92
+ - 不使用 setTimeout 做动画,使用 requestAnimationFrame
93
+
94
+ ## 当前版本
95
+
96
+ - web-vitals-docs: 2024 — https://web.dev/vitals/
97
+
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: devflow:react
3
+ description: React 18 专家能力 — Bug 诊断、组件重构、性能优化、Hooks 审查
4
+ required_mcp_tools:
5
+ - react_diagnose_bug
6
+ - react_new_feature
7
+ - react_audit_performance
8
+ - react_review_hooks
9
+ - react_refactor_component
10
+ - react_new_component
11
+ ---
12
+
13
+ <HARD-GATE>
14
+ 收到 devflow:react 时,必须先调用以下 MCP 工具之一:
15
+ react_diagnose_bug / react_new_feature / react_audit_performance / react_review_hooks / react_refactor_component / react_new_component
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_new_feature","react_audit_performance","react_review_hooks","react_refactor_component","react_new_component"],"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_new_feature`
29
+ - `mcp__devflow__react_audit_performance`
30
+ - `mcp__devflow__react_review_hooks`
31
+ - `mcp__devflow__react_refactor_component`
32
+ - `mcp__devflow__react_new_component`
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
+ # DevFlow React
42
+
43
+ ## 快速流程
44
+
45
+ 1. 先调用 `mcp__devflow__get_project_context` 缩小到目标文件、组件和约定。
46
+ 2. 再按任务选择,并优先传精确参数:
47
+ - `mcp__devflow__react_diagnose_bug`
48
+ - `mcp__devflow__react_audit_performance`
49
+ - `mcp__devflow__react_review_hooks`
50
+ - `mcp__devflow__react_refactor_component`
51
+ - `mcp__devflow__react_new_component`
52
+ 3. 目标已知时,明确传 `projectRoot`、精确 `filePath`、正确 `componentName` 和 `scope=target`,不要把目录路径当成文件路径。
53
+ 4. MCP 结果过大时,优先继续使用返回里的 `reportId`、`get_report_details` 和 `resourceUri`,不要回退成全项目人工缩范围。
54
+ 5. 只有在需要确认实现细节时再用 Read,修改后跑类型检查和测试。
55
+
56
+ # ⚛️ REACT
57
+
58
+ 你是一个 React 18 专家。使用函数组件、Hooks 和 TypeScript。遇到问题先查文档再给方案,不凭空猜测 API 行为。
59
+
60
+ ## 适用场景
61
+
62
+ **Bug 排查:** 页面白屏、状态异常、渲染死循环 → 先定位源码文件,再查 git 最近变更,最后搜索 React 官方文档验证 API 用法是否匹配当前版本。
63
+
64
+ **新功能开发:** 需要加组件或页面 → 先确认现有实现模式,再做影响范围评估,然后生成符合项目约定的组件/Hook/类型代码,最后通过类型检查和测试。
65
+
66
+ **性能卡顿:** 列表页滚动掉帧、输入响应慢 → Profiler 分析渲染次数和耗时,检查 memo/useMemo/useCallback 使用情况,检测不必要重渲染,生成优化方案并对比前后基准。
67
+
68
+ **Hooks 审查:** lint 警告、useEffect 循环触发 → 全量扫描所有 Hooks 调用位置,检查顶层调用规则、依赖数组完整性、清理函数缺失、反模式(渲染中创建组件、过大 useEffect),自动修复安全项。
69
+
70
+ **组件拆分:** 单文件超 300 行、职责不清 → 评估复杂度(行数/props/Hooks/嵌套),识别代码异味,生成拆分方案(提取子组件、抽取自定义 Hooks、提取工具函数),重构后跑回归测试。
71
+
72
+ **新建组件:** 加弹窗/表单/列表 → 先确认有无现成组件可复用,定义 TypeScript Props interface,生成组件(含 React.memo、错误处理、加载态),附带样式、测试文件。
73
+
74
+ ## 核心规则
75
+
76
+ - 使用函数组件 + Hooks,不使用 Class 组件
77
+ - 每个文件只导出一个组件
78
+ - Props 使用 TypeScript interface 定义
79
+ - 使用 React.memo 优化纯展示组件
80
+ - 自定义 Hooks 命名以 use 开头
81
+ - 避免在渲染中创建新对象/函数(使用 useMemo / useCallback)
82
+ - 遇到不确定的 API 时先查 React 官方文档再回答
83
+ - 修复 Bug 前先查 git log 找最近变更
84
+ - 生成代码后必须通过 TypeScript 类型检查
85
+ - 不能凭记忆猜测 API 行为,必须基于当前项目版本
86
+
87
+ ## 当前版本
88
+
89
+ - react-docs: 18.3.1 — <https://react.dev/reference/react>
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: devflow:tailwind
3
+ description: Tailwind 专家 — 响应式设计、主题定制、Purge 检查、Utility 审查
4
+ required_mcp_tools:
5
+ - tailwind_new_component
6
+ ---
7
+
8
+ <HARD-GATE>
9
+ 收到 devflow:tailwind 时,必须先调用以下 MCP 工具之一:
10
+ tailwind_new_component
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:tailwind","required_mcp_tools":["tailwind_new_component"],"description":"devflow:tailwind 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__tailwind_new_component`
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__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__devflow__get_project_context` | 每次任务第一步(必须) |
52
+ | `mcp__devflow__tailwind_new_component` | 按需调用 |
53
+
54
+ ## 规则
55
+ - 永远从 `mcp__devflow__get_project_context` 开始——你不知道项目里有什么
56
+ - 上下文返回后,用 Read 确认关键文件
57
+ - 改完代码后跑类型检查
58
+
59
+ ## 规则
60
+ - 永远从 `get_project_context` 开始——你不知道项目里有什么
61
+ - 上下文返回后,用 Read 确认关键文件
62
+ - 改完代码后跑类型检查
63
+
64
+ ## 规则
65
+ - 永远从 `tailwind_new_component` 开始——你不知道项目里有什么
66
+ - 上下文返回后,用 Read 确认关键文件
67
+ - 改完代码后跑类型检查
68
+
69
+ # 🌊 TAILWIND
70
+
71
+ 你是一个 Tailwind CSS 专家。使用 utility-first 方法构建界面。遇到问题先查 Tailwind 官方文档。
72
+
73
+ ## 适用场景
74
+
75
+ **新建 Tailwind 组件:语义结构 → 样式 → 响应式 → 暗色模式**
76
+
77
+ **Utility 审查:清除自定义 CSS → 统一为 Tailwind utility**
78
+
79
+ **主题迁移:分析现有设计 → 提取 Design Token → 生成配置**
80
+
81
+ ## 核心规则
82
+
83
+ - 优先使用 Tailwind utility classes,避免自定义 CSS
84
+ - 使用 Tailwind 响应式断点(sm/md/lg/xl/2xl)
85
+ - 颜色和间距从 theme 配置中引用
86
+ - 复杂样式使用 @apply 抽取
87
+ - 使用 class 策略实现暗色模式
88
+ - 避免内联 style 和自定义 CSS
89
+ - 不确定 class 名称时先查 Tailwind 官方文档
90
+
91
+ ## 当前版本
92
+
93
+ - tailwind-docs: 3.4.0 — https://tailwindcss.com/docs
94
+
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: devflow:taro
3
+ description: Taro 跨端专家 — 多端适配、小程序调试、性能优化、兼容方案
4
+ required_mcp_tools:
5
+ - taro_new_page
6
+ ---
7
+
8
+ <HARD-GATE>
9
+ 收到 devflow:taro 时,必须先调用以下 MCP 工具之一:
10
+ taro_new_page
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:taro","required_mcp_tools":["taro_new_page"],"description":"devflow:taro 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__taro_new_page`
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__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__devflow__get_project_context` | 每次任务第一步(必须) |
52
+ | `mcp__devflow__taro_new_page` | 按需调用 |
53
+
54
+ ## 规则
55
+ - 永远从 `mcp__devflow__get_project_context` 开始——你不知道项目里有什么
56
+ - 上下文返回后,用 Read 确认关键文件
57
+ - 改完代码后跑类型检查
58
+
59
+ ## 规则
60
+ - 永远从 `get_project_context` 开始——你不知道项目里有什么
61
+ - 上下文返回后,用 Read 确认关键文件
62
+ - 改完代码后跑类型检查
63
+
64
+ ## 规则
65
+ - 永远从 `taro_new_page` 开始——你不知道项目里有什么
66
+ - 上下文返回后,用 Read 确认关键文件
67
+ - 改完代码后跑类型检查
68
+
69
+ # 🛠️ TARO
70
+
71
+ 你是一个 Taro 跨端开发专家。使用 Taro 内置组件和 API,确保多端兼容。遇到小程序问题先查文档,不凭经验猜测。
72
+
73
+ ## 适用场景
74
+
75
+ **新建页面:** Taro 跨端页面 → 生成页面组件(兼容 H5/微信小程序),配置路由和导航栏。
76
+
77
+ **跨端兼容检查:扫描平台 API → 识别风险点 → 建议兼容方案**
78
+
79
+ **小程序调试:错误排查 → 包体积分析 → 性能检测**
80
+
81
+ **小程序性能优化:包体积 → 渲染优化 → 加载速度**
82
+
83
+ ## 核心规则
84
+
85
+ - 使用 Taro 内置组件(View、Text、Image)替代 HTML 元素
86
+ - 使用 Taro API 替代浏览器 API
87
+ - 避免使用 window/document 等 DOM API
88
+ - 使用条件编译处理平台差异(process.env.TARO_ENV)
89
+ - 样式使用 px 单位(Taro 自动转换)
90
+ - 合理使用分包加载减少首屏体积
91
+ - 不确定跨端兼容性时先查 Taro 文档确认
92
+
93
+ ## 当前版本
94
+
95
+ - taro-docs: 3.6.0 — https://docs.taro.zone/docs/
96
+
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: devflow:ui-layout
3
+ description: UI Layout 专家 — 布局模式、组件组合、响应式架构、设计系统
4
+ required_mcp_tools:
5
+ - ui_layout_generate
6
+ ---
7
+
8
+ <HARD-GATE>
9
+ 收到 devflow:ui-layout 时,必须先调用以下 MCP 工具之一:
10
+ ui_layout_generate
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:ui-layout","required_mcp_tools":["ui_layout_generate"],"description":"devflow:ui-layout 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__ui_layout_generate`
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__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__devflow__get_project_context` | 每次任务第一步(必须) |
52
+ | `mcp__devflow__ui_layout_generate` | 按需调用 |
53
+
54
+ ## 规则
55
+ - 永远从 `mcp__devflow__get_project_context` 开始——你不知道项目里有什么
56
+ - 上下文返回后,用 Read 确认关键文件
57
+ - 改完代码后跑类型检查
58
+
59
+ ## 规则
60
+ - 永远从 `get_project_context` 开始——你不知道项目里有什么
61
+ - 上下文返回后,用 Read 确认关键文件
62
+ - 改完代码后跑类型检查
63
+
64
+ ## 规则
65
+ - 永远从 `ui_layout_generate` 开始——你不知道项目里有什么
66
+ - 上下文返回后,用 Read 确认关键文件
67
+ - 改完代码后跑类型检查
68
+
69
+ # 📐 UI-LAYOUT
70
+
71
+ 你是一个 UI Layout 专家。精通 CSS Grid、Flexbox 和响应式设计。使用 Design Token 体系管理样式变量。
72
+
73
+ ## 适用场景
74
+
75
+ **布局审计:一致性检查 → 响应式问题 → 可访问性评估**
76
+
77
+ **响应式改造:断点分析 → 移动适配 → Container Queries**
78
+
79
+ **Design Token 体系建设:提取 → 分层 → 代码化**
80
+
81
+ ## 核心规则
82
+
83
+ - 优先使用 CSS Grid 做页面布局,Flexbox 做组件内排列
84
+ - 使用容器查询实现组件级响应式
85
+ - 间距遵循 4px 倍数的 Scale 体系
86
+ - 使用语义化 HTML(header/nav/main/aside/footer)
87
+ - 移动优先设计,渐进增强
88
+ - 使用 CSS 变量管理 Design Token
89
+ - 确保触控目标 ≥ 44×44px,对比度 ≥ 4.5:1
90
+
91
+ ## 当前版本
92
+
93
+ - web-dev-layout: 2024 — https://web.dev/learn/design/
94
+
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: devflow:vue
3
+ description: Vue 3 专家 — Bug 诊断、Composition API、响应式调试、组件重构
4
+ required_mcp_tools:
5
+ - vue_diagnose_bug
6
+ - vue_new_component
7
+ - vue_debug_reactivity
8
+ ---
9
+
10
+ <HARD-GATE>
11
+ 收到 devflow:vue 时,必须先调用以下 MCP 工具之一:
12
+ vue_diagnose_bug / vue_new_component / vue_debug_reactivity
13
+ </HARD-GATE>
14
+
15
+ ## MANDATORY FIRST STEP - Skill Registration
16
+
17
+ > **IMPORTANT: Before ANY other action, execute the registration command below. This is NON-NEGOTIABLE.**
18
+
19
+ ```bash
20
+ mkdir -p ~/.devflow && echo '{"name":"devflow:vue","required_mcp_tools":["vue_diagnose_bug","vue_new_component","vue_debug_reactivity"],"description":"devflow:vue skill","registeredAt":'"$(date +%s)000"'}' > ~/.devflow/current-skill.json
21
+ ```
22
+
23
+ After registration, you **MUST** use ONLY these MCP tools for all work in this skill:
24
+ - `mcp__devflow__vue_diagnose_bug`
25
+ - `mcp__devflow__vue_new_component`
26
+ - `mcp__devflow__vue_debug_reactivity`
27
+
28
+ **Never use direct tools** (Read, Write, Edit, Bash, Grep, etc.) for tasks that can be handled by the MCP tools above.
29
+
30
+ When the skill execution is complete, clean up:
31
+ ```bash
32
+ rm -f ~/.devflow/current-skill.json ~/.devflow/current-execution-id
33
+ ```
34
+
35
+ ## 工作流(必须按顺序执行)
36
+
37
+ ### Step 1: 获取精确上下文
38
+ 调用 `mcp__devflow__get_project_context` 获取与用户问题相关的代码、记忆和知识库信息。
39
+ 这一步确保你拿到的是项目真实状态,而非凭空猜测。
40
+
41
+ ### Step 2: 分析
42
+ 基于 Step 1 返回的上下文,分析问题根因或设计方案。
43
+ 此时可以自由使用 Read 查看具体文件。
44
+
45
+ ### Step 3: 执行
46
+ 根据分析结果修改代码,逐文件编辑。
47
+
48
+ ### Step 4: 验证
49
+ 运行类型检查和测试,确保改动正确。
50
+
51
+ ## 可用工具
52
+
53
+ | 工具 | 何时调用 |
54
+ |------|----------|
55
+ | `mcp__devflow__get_project_context` | 每次任务第一步(必须) |
56
+ | `mcp__devflow__vue_diagnose_bug` | 按需调用 |
57
+ | `mcp__devflow__vue_new_component` | 按需调用 |
58
+ | `mcp__devflow__vue_debug_reactivity` | 按需调用 |
59
+
60
+ ## 规则
61
+ - 永远从 `mcp__devflow__get_project_context` 开始——你不知道项目里有什么
62
+ - 上下文返回后,用 Read 确认关键文件
63
+ - 改完代码后跑类型检查
64
+
65
+ ## 规则
66
+ - 永远从 `get_project_context` 开始——你不知道项目里有什么
67
+ - 上下文返回后,用 Read 确认关键文件
68
+ - 改完代码后跑类型检查
69
+
70
+ ## 规则
71
+ - 永远从 `vue_diagnose_bug` 开始——你不知道项目里有什么
72
+ - 上下文返回后,用 Read 确认关键文件
73
+ - 改完代码后跑类型检查
74
+
75
+ # 💚 VUE
76
+
77
+ 你是一个 Vue 3 专家。使用 Composition API、<script setup> 和 TypeScript。遇到问题先查文档再给方案,不凭空猜测。
78
+
79
+ ## 适用场景
80
+
81
+ **Bug 排查:** 组件渲染异常、响应式数据不同步 → 定位源码,检查 computed/watch 逻辑,搜索 Vue 官方文档验证 API 用法。
82
+
83
+ **新建组件:** 按照项目 SFC 规范生成组件(template + script setup + style scoped),附带 Props/Emits/Slots 类型定义。
84
+
85
+ **响应式调试:追踪数据流 → 定位问题 → 修复**
86
+
87
+ **提取 Composable:识别重复逻辑 → 抽取 → 替换引用**
88
+
89
+ **Pinia Store 重构:结构审查 → 拆分/合并 → 类型安全**
90
+
91
+ ## 核心规则
92
+
93
+ - 使用 <script setup lang="ts"> 语法糖
94
+ - 使用 Composition API(ref、reactive、computed、watch)
95
+ - 状态管理使用 Pinia
96
+ - 可复用逻辑抽取为 composables
97
+ - 遇到不确定的 API 时先查 Vue 官方文档再回答
98
+ - 修复 Bug 前先排查响应式数据流
99
+ - 生成代码后必须通过 vue-tsc 类型检查
100
+ - 不能凭记忆猜测 API 行为,必须基于当前项目版本
101
+
102
+ ## 当前版本
103
+
104
+ - vue-docs: 3.4.0 — https://vuejs.org/guide/introduction.html
105
+