@devflow-tools/cli 0.12.5 → 0.12.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/package.json +2 -2
- package/dist/commands/benchmark-cmd.d.ts +0 -5
- package/dist/commands/benchmark-cmd.d.ts.map +0 -1
- package/dist/commands/benchmark-cmd.js +0 -18
- package/dist/commands/benchmark-cmd.js.map +0 -1
- package/dist/commands/connect.d.ts +0 -8
- package/dist/commands/connect.d.ts.map +0 -1
- package/dist/commands/connect.js +0 -26
- package/dist/commands/connect.js.map +0 -1
- package/dist/commands/context.d.ts +0 -15
- package/dist/commands/context.d.ts.map +0 -1
- package/dist/commands/context.js +0 -24
- package/dist/commands/context.js.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -3
- package/dist/commands/dashboard.d.ts.map +0 -1
- package/dist/commands/dashboard.js +0 -10
- package/dist/commands/dashboard.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -56
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -156
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/graph.d.ts +0 -11
- package/dist/commands/graph.d.ts.map +0 -1
- package/dist/commands/graph.js +0 -14
- package/dist/commands/graph.js.map +0 -1
- package/dist/commands/index-cmd.d.ts +0 -4
- package/dist/commands/index-cmd.d.ts.map +0 -1
- package/dist/commands/index-cmd.js +0 -15
- package/dist/commands/index-cmd.js.map +0 -1
- package/dist/commands/init.d.ts +0 -20
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -145
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/knowledge.d.ts +0 -5
- package/dist/commands/knowledge.d.ts.map +0 -1
- package/dist/commands/knowledge.js +0 -23
- package/dist/commands/knowledge.js.map +0 -1
- package/dist/commands/memory.d.ts +0 -5
- package/dist/commands/memory.d.ts.map +0 -1
- package/dist/commands/memory.js +0 -72
- package/dist/commands/memory.js.map +0 -1
- package/dist/commands/plugin/install.d.ts +0 -3
- package/dist/commands/plugin/install.d.ts.map +0 -1
- package/dist/commands/plugin/install.js +0 -22
- package/dist/commands/plugin/install.js.map +0 -1
- package/dist/commands/plugin/list.d.ts +0 -3
- package/dist/commands/plugin/list.d.ts.map +0 -1
- package/dist/commands/plugin/list.js +0 -47
- package/dist/commands/plugin/list.js.map +0 -1
- package/dist/commands/plugin/search.d.ts +0 -3
- package/dist/commands/plugin/search.d.ts.map +0 -1
- package/dist/commands/plugin/search.js +0 -29
- package/dist/commands/plugin/search.js.map +0 -1
- package/dist/commands/plugin/uninstall.d.ts +0 -3
- package/dist/commands/plugin/uninstall.d.ts.map +0 -1
- package/dist/commands/plugin/uninstall.js +0 -21
- package/dist/commands/plugin/uninstall.js.map +0 -1
- package/dist/commands/plugin-guide.d.ts +0 -19
- package/dist/commands/plugin-guide.d.ts.map +0 -1
- package/dist/commands/plugin-guide.js +0 -131
- package/dist/commands/plugin-guide.js.map +0 -1
- package/dist/commands/plugin-loader.d.ts +0 -2
- package/dist/commands/plugin-loader.d.ts.map +0 -1
- package/dist/commands/plugin-loader.js +0 -2
- package/dist/commands/plugin-loader.js.map +0 -1
- package/dist/commands/review.d.ts +0 -6
- package/dist/commands/review.d.ts.map +0 -1
- package/dist/commands/review.js +0 -75
- package/dist/commands/review.js.map +0 -1
- package/dist/commands/server.d.ts +0 -16
- package/dist/commands/server.d.ts.map +0 -1
- package/dist/commands/server.js +0 -88
- package/dist/commands/server.js.map +0 -1
- package/dist/commands/session.d.ts +0 -7
- package/dist/commands/session.d.ts.map +0 -1
- package/dist/commands/session.js +0 -20
- package/dist/commands/session.js.map +0 -1
- package/dist/commands/setup.d.ts +0 -6
- package/dist/commands/setup.d.ts.map +0 -1
- package/dist/commands/setup.js +0 -78
- package/dist/commands/setup.js.map +0 -1
- package/dist/commands/skill.d.ts +0 -18
- package/dist/commands/skill.d.ts.map +0 -1
- package/dist/commands/skill.js +0 -105
- package/dist/commands/skill.js.map +0 -1
- package/dist/commands/start.d.ts +0 -5
- package/dist/commands/start.d.ts.map +0 -1
- package/dist/commands/start.js +0 -58
- package/dist/commands/start.js.map +0 -1
- package/dist/commands/status.d.ts +0 -2
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -33
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/stop.d.ts +0 -2
- package/dist/commands/stop.d.ts.map +0 -1
- package/dist/commands/stop.js +0 -12
- package/dist/commands/stop.js.map +0 -1
- package/dist/commands/workflow.d.ts +0 -6
- package/dist/commands/workflow.d.ts.map +0 -1
- package/dist/commands/workflow.js +0 -24
- package/dist/commands/workflow.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -606
- package/dist/index.js.map +0 -1
- package/dist/lib/dashboard-cache.d.ts +0 -3
- package/dist/lib/dashboard-cache.d.ts.map +0 -1
- package/dist/lib/dashboard-cache.js +0 -97
- package/dist/lib/dashboard-cache.js.map +0 -1
- package/dist/lib/paths.d.ts +0 -1
- package/dist/lib/paths.d.ts.map +0 -1
- package/dist/lib/paths.js +0 -4
- package/dist/lib/paths.js.map +0 -1
- package/dist/lib/plugin-registry.d.ts +0 -18
- package/dist/lib/plugin-registry.d.ts.map +0 -1
- package/dist/lib/plugin-registry.js +0 -39
- package/dist/lib/plugin-registry.js.map +0 -1
- package/dist/lib/plugin-setup.d.ts +0 -23
- package/dist/lib/plugin-setup.d.ts.map +0 -1
- package/dist/lib/plugin-setup.js +0 -141
- package/dist/lib/plugin-setup.js.map +0 -1
- package/dist/lib/with-server.d.ts +0 -7
- package/dist/lib/with-server.d.ts.map +0 -1
- package/dist/lib/with-server.js +0 -28
- package/dist/lib/with-server.js.map +0 -1
- package/dist/mode.d.ts +0 -10
- package/dist/mode.d.ts.map +0 -1
- package/dist/mode.js +0 -40
- package/dist/mode.js.map +0 -1
- package/dist/plugin-files/.claude-plugin/plugin.json +0 -20
- package/dist/plugin-files/CLAUDE.md +0 -34
- package/dist/plugin-files/dist/command-registry.json +0 -235
- package/dist/plugin-files/dist/skills/devflow:context/SKILL.md +0 -49
- package/dist/plugin-files/dist/skills/devflow:docker/SKILL.md +0 -67
- package/dist/plugin-files/dist/skills/devflow:electron/SKILL.md +0 -67
- package/dist/plugin-files/dist/skills/devflow:graph/SKILL.md +0 -42
- package/dist/plugin-files/dist/skills/devflow:graphql/SKILL.md +0 -68
- package/dist/plugin-files/dist/skills/devflow:knowledge/SKILL.md +0 -42
- package/dist/plugin-files/dist/skills/devflow:memory/SKILL.md +0 -41
- package/dist/plugin-files/dist/skills/devflow:nest/SKILL.md +0 -68
- package/dist/plugin-files/dist/skills/devflow:nextjs/SKILL.md +0 -65
- package/dist/plugin-files/dist/skills/devflow:performance/SKILL.md +0 -67
- package/dist/plugin-files/dist/skills/devflow:react/SKILL.md +0 -85
- package/dist/plugin-files/dist/skills/devflow:tailwind/SKILL.md +0 -63
- package/dist/plugin-files/dist/skills/devflow:taro/SKILL.md +0 -66
- package/dist/plugin-files/dist/skills/devflow:vue/SKILL.md +0 -74
- package/dist/plugin-files/dist/skills/devflow:workflow/SKILL.md +0 -42
- package/dist/plugin-files/hooks/constitution.md +0 -20
- package/dist/plugin-files/hooks/post-tool-use +0 -16
- package/dist/plugin-files/hooks/pre-tool-use +0 -23
- package/dist/plugin-files/hooks/session-start +0 -165
- package/dist/plugin-files/hooks/stop +0 -32
- package/dist/plugin-files/hooks.json +0 -52
- package/dist/plugin-files/package.json +0 -31
|
@@ -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_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
|
-
# ▲ 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_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
|
-
# ⚛️ 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` |
|
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
# 🌊 TAILWIND
|
|
32
|
-
|
|
33
|
-
你是一个 Tailwind CSS 专家。使用 utility-first 方法构建界面。遇到问题先查 Tailwind 官方文档。
|
|
34
|
-
|
|
35
|
-
## 适用场景
|
|
36
|
-
|
|
37
|
-
**新建 Tailwind 组件:语义结构 → 样式 → 响应式 → 暗色模式**
|
|
38
|
-
|
|
39
|
-
**Utility 审查:清除自定义 CSS → 统一为 Tailwind utility**
|
|
40
|
-
|
|
41
|
-
**主题迁移:分析现有设计 → 提取 Design Token → 生成配置**
|
|
42
|
-
|
|
43
|
-
## 核心规则
|
|
44
|
-
|
|
45
|
-
- 优先使用 Tailwind utility classes,避免自定义 CSS
|
|
46
|
-
- 使用 Tailwind 响应式断点(sm/md/lg/xl/2xl)
|
|
47
|
-
- 颜色和间距从 theme 配置中引用
|
|
48
|
-
- 复杂样式使用 @apply 抽取
|
|
49
|
-
- 使用 class 策略实现暗色模式
|
|
50
|
-
- 避免内联 style 和自定义 CSS
|
|
51
|
-
- 不确定 class 名称时先查 Tailwind 官方文档
|
|
52
|
-
|
|
53
|
-
## 当前版本
|
|
54
|
-
|
|
55
|
-
- tailwind-docs: 3.4.0 — https://tailwindcss.com/docs
|
|
56
|
-
|
|
57
|
-
## 工作流
|
|
58
|
-
|
|
59
|
-
| 场景 | 触发方式 |
|
|
60
|
-
|------|----------|
|
|
61
|
-
| 新建 Tailwind 组件:语义结构 → 样式 → 响应式 → 暗色模式 | 调用 MCP 工具 `tailwind_new_component` |
|
|
62
|
-
| Utility 审查:清除自定义 CSS → 统一为 Tailwind utility | 调用 MCP 工具 `tailwind_audit:utility` |
|
|
63
|
-
| 主题迁移:分析现有设计 → 提取 Design Token → 生成配置 | 调用 MCP 工具 `tailwind_migrate:theme` |
|
|
@@ -1,66 +0,0 @@
|
|
|
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
|
-
# 🛠️ TARO
|
|
32
|
-
|
|
33
|
-
你是一个 Taro 跨端开发专家。使用 Taro 内置组件和 API,确保多端兼容。遇到小程序问题先查文档,不凭经验猜测。
|
|
34
|
-
|
|
35
|
-
## 适用场景
|
|
36
|
-
|
|
37
|
-
**新建页面:** Taro 跨端页面 → 生成页面组件(兼容 H5/微信小程序),配置路由和导航栏。
|
|
38
|
-
|
|
39
|
-
**跨端兼容检查:扫描平台 API → 识别风险点 → 建议兼容方案**
|
|
40
|
-
|
|
41
|
-
**小程序调试:错误排查 → 包体积分析 → 性能检测**
|
|
42
|
-
|
|
43
|
-
**小程序性能优化:包体积 → 渲染优化 → 加载速度**
|
|
44
|
-
|
|
45
|
-
## 核心规则
|
|
46
|
-
|
|
47
|
-
- 使用 Taro 内置组件(View、Text、Image)替代 HTML 元素
|
|
48
|
-
- 使用 Taro API 替代浏览器 API
|
|
49
|
-
- 避免使用 window/document 等 DOM API
|
|
50
|
-
- 使用条件编译处理平台差异(process.env.TARO_ENV)
|
|
51
|
-
- 样式使用 px 单位(Taro 自动转换)
|
|
52
|
-
- 合理使用分包加载减少首屏体积
|
|
53
|
-
- 不确定跨端兼容性时先查 Taro 文档确认
|
|
54
|
-
|
|
55
|
-
## 当前版本
|
|
56
|
-
|
|
57
|
-
- taro-docs: 3.6.0 — https://docs.taro.zone/docs/
|
|
58
|
-
|
|
59
|
-
## 工作流
|
|
60
|
-
|
|
61
|
-
| 场景 | 触发方式 |
|
|
62
|
-
|------|----------|
|
|
63
|
-
| 新建页面: | 调用 MCP 工具 `taro_new_page` |
|
|
64
|
-
| 跨端兼容检查:扫描平台 API → 识别风险点 → 建议兼容方案 | 调用 MCP 工具 `taro_check:cross-platform` |
|
|
65
|
-
| 小程序调试:错误排查 → 包体积分析 → 性能检测 | 调用 MCP 工具 `taro_debug:miniapp` |
|
|
66
|
-
| 小程序性能优化:包体积 → 渲染优化 → 加载速度 | 调用 MCP 工具 `taro_optimize:performance` |
|
|
@@ -1,74 +0,0 @@
|
|
|
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
|
-
# 💚 VUE
|
|
36
|
-
|
|
37
|
-
你是一个 Vue 3 专家。使用 Composition API、<script setup> 和 TypeScript。遇到问题先查文档再给方案,不凭空猜测。
|
|
38
|
-
|
|
39
|
-
## 适用场景
|
|
40
|
-
|
|
41
|
-
**Bug 排查:** 组件渲染异常、响应式数据不同步 → 定位源码,检查 computed/watch 逻辑,搜索 Vue 官方文档验证 API 用法。
|
|
42
|
-
|
|
43
|
-
**新建组件:** 按照项目 SFC 规范生成组件(template + script setup + style scoped),附带 Props/Emits/Slots 类型定义。
|
|
44
|
-
|
|
45
|
-
**响应式调试:追踪数据流 → 定位问题 → 修复**
|
|
46
|
-
|
|
47
|
-
**提取 Composable:识别重复逻辑 → 抽取 → 替换引用**
|
|
48
|
-
|
|
49
|
-
**Pinia Store 重构:结构审查 → 拆分/合并 → 类型安全**
|
|
50
|
-
|
|
51
|
-
## 核心规则
|
|
52
|
-
|
|
53
|
-
- 使用 <script setup lang="ts"> 语法糖
|
|
54
|
-
- 使用 Composition API(ref、reactive、computed、watch)
|
|
55
|
-
- 状态管理使用 Pinia
|
|
56
|
-
- 可复用逻辑抽取为 composables
|
|
57
|
-
- 遇到不确定的 API 时先查 Vue 官方文档再回答
|
|
58
|
-
- 修复 Bug 前先排查响应式数据流
|
|
59
|
-
- 生成代码后必须通过 vue-tsc 类型检查
|
|
60
|
-
- 不能凭记忆猜测 API 行为,必须基于当前项目版本
|
|
61
|
-
|
|
62
|
-
## 当前版本
|
|
63
|
-
|
|
64
|
-
- vue-docs: 3.4.0 — https://vuejs.org/guide/introduction.html
|
|
65
|
-
|
|
66
|
-
## 工作流
|
|
67
|
-
|
|
68
|
-
| 场景 | 触发方式 |
|
|
69
|
-
|------|----------|
|
|
70
|
-
| Bug 排查: | 调用 MCP 工具 `vue_diagnose_bug` |
|
|
71
|
-
| 新建组件: | 调用 MCP 工具 `vue_new_component` |
|
|
72
|
-
| 响应式调试:追踪数据流 → 定位问题 → 修复 | 调用 MCP 工具 `vue_debug_reactivity` |
|
|
73
|
-
| 提取 Composable:识别重复逻辑 → 抽取 → 替换引用 | 调用 MCP 工具 `vue_extract:composable` |
|
|
74
|
-
| Pinia Store 重构:结构审查 → 拆分/合并 → 类型安全 | 调用 MCP 工具 `vue_refactor:pinia` |
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: devflow:workflow
|
|
3
|
-
description: 执行标准化开发工作流 — Bug 修复、功能开发、代码审查
|
|
4
|
-
required_mcp_tools:
|
|
5
|
-
- run_workflow
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<HARD-GATE>
|
|
9
|
-
收到 devflow:workflow 时,必须先调用以下 MCP 工具之一:
|
|
10
|
-
run_workflow
|
|
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:workflow","required_mcp_tools":["run_workflow"],"description":"devflow:workflow 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__run_workflow`
|
|
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:workflow
|
|
32
|
-
|
|
33
|
-
## 执行
|
|
34
|
-
|
|
35
|
-
调用 `run_workflow` MCP 工具:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
type = "bugfix" | "feature" | "review"
|
|
39
|
-
input = 用户的查询内容
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
MCP 工具提供标准化的 DAG 步骤编排、人工确认节点、执行追踪和遥测记录。工作流执行过程中,MCP 工具会返回需要你介入的步骤,此时才根据步骤指引执行具体操作。
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<EXTREMELY_IMPORTANT>
|
|
2
|
-
你正在使用 DevFlow MCP Gateway。
|
|
3
|
-
|
|
4
|
-
## MCP 优先原则
|
|
5
|
-
|
|
6
|
-
收到 /devflow:* 命令时,必须先调用 SKILL.md 中列出的 MCP 工具。
|
|
7
|
-
Hook 会自动拦截不符合规范的原生工具调用,并按提示引导你使用正确的 MCP 工具。
|
|
8
|
-
|
|
9
|
-
正确流程:
|
|
10
|
-
1. 调用 Skill 加载命令
|
|
11
|
-
2. 立即调用 MCP 工具
|
|
12
|
-
3. 基于 MCP 结果回答
|
|
13
|
-
4. 如需补充信息,使用 Read 工具读取 MCP 未包含的关联文件
|
|
14
|
-
|
|
15
|
-
绝对不要:
|
|
16
|
-
- 在调用 MCP 之前用 grep/find/Glob/Explore 搜索代码
|
|
17
|
-
- 用 WebSearch/WebFetch 替代 get_knowledge
|
|
18
|
-
- 用 Agent(Explore) 替代 MCP 工具
|
|
19
|
-
- 尝试绕过 Hook 拦截
|
|
20
|
-
</EXTREMELY_IMPORTANT>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
# DevFlow PostToolUse Hook — talks to hook-daemon via hook-client
|
|
5
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
6
|
-
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$SCRIPT_DIR/..}"
|
|
7
|
-
CLIENT_JS="$PLUGIN_ROOT/dist/hooks/hook-client.js"
|
|
8
|
-
FALLBACK_JS="$PLUGIN_ROOT/dist/hooks/post-tool-use.js"
|
|
9
|
-
|
|
10
|
-
if [ -f "$CLIENT_JS" ]; then
|
|
11
|
-
node "$CLIENT_JS" post-tool-use "$(cat)" 2>/dev/null || true
|
|
12
|
-
elif [ -f "$FALLBACK_JS" ]; then
|
|
13
|
-
node "$FALLBACK_JS" 2>/dev/null || true
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
exit 0
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
# DevFlow PreToolUse Hook — talks to hook-daemon via hook-client
|
|
5
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
6
|
-
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$SCRIPT_DIR/..}"
|
|
7
|
-
CLIENT_JS="$PLUGIN_ROOT/dist/hooks/hook-client.js"
|
|
8
|
-
FALLBACK_JS="$PLUGIN_ROOT/dist/hooks/pre-tool-use.js"
|
|
9
|
-
|
|
10
|
-
if [ -f "$CLIENT_JS" ]; then
|
|
11
|
-
node "$CLIENT_JS" pre-tool-use || {
|
|
12
|
-
echo '[devflow] hook-client failed, trying fallback' >&2
|
|
13
|
-
if [ -f "$FALLBACK_JS" ]; then
|
|
14
|
-
node "$FALLBACK_JS" || echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow"}}'
|
|
15
|
-
else
|
|
16
|
-
echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow"}}'
|
|
17
|
-
fi
|
|
18
|
-
}
|
|
19
|
-
elif [ -f "$FALLBACK_JS" ]; then
|
|
20
|
-
node "$FALLBACK_JS" || echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow"}}'
|
|
21
|
-
else
|
|
22
|
-
echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow"}}'
|
|
23
|
-
fi
|