@devflow-tools/plugin-performance 0.8.9 → 0.8.11

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 (2) hide show
  1. package/README.md +29 -5
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @devflow-tools/plugin-performance
2
2
 
3
- Web performance expert plugin for DevFlow — Core Web Vitals, bundle optimization, loading strategies, and rendering performance.
3
+ Web 性能专家插件 — Core Web Vitals、Bundle 优化、加载策略、渲染性能。
4
4
 
5
5
  ## Installation
6
6
 
@@ -8,11 +8,35 @@ Web performance expert plugin for DevFlow — Core Web Vitals, bundle optimizati
8
8
  npm install @devflow-tools/plugin-performance
9
9
  ```
10
10
 
11
- ## Workflows
11
+ ## MCP Tools
12
12
 
13
- | Workflow | Description |
14
- |----------|-------------|
15
- | `performance:audit-performance` | Performance audit: Lighthouse → Web Vitals → Bundle → optimization plan |
13
+ | Tool | 说明 | 关键参数 |
14
+ |------|------|---------|
15
+ | `performance_audit_performance` | 性能审计:Lighthouse → Web Vitals → Bundle → 优化方案 | `projectRoot` |
16
+
17
+ ## Knowledge Sources
18
+
19
+ | 来源 | URL | SPA |
20
+ |------|-----|-----|
21
+ | web.dev Vitals | https://web.dev/vitals | No |
22
+ | MDN Performance | https://developer.mozilla.org/en-US/docs/Web/Performance | No |
23
+
24
+ ## Memory
25
+
26
+ 插件自动注入以下最佳实践:
27
+ - LCP(Largest Contentful Paint)< 2.5s
28
+ - FID(First Input Delay)< 100ms → INP(Interaction to Next Paint)< 200ms
29
+ - CLS(Cumulative Layout Shift)< 0.1
30
+ - 图片使用 `loading="lazy"` + `srcset` 响应式尺寸
31
+ - JavaScript 使用 `async`/`defer` 非阻塞加载
32
+ - Bundle 分析使用 `webpack-bundle-analyzer` 或 `rollup-plugin-visualizer`
33
+
34
+ ## Usage
35
+
36
+ ```bash
37
+ # 在 Claude Code 中使用
38
+ /devflow:performance 审计首页加载性能
39
+ ```
16
40
 
17
41
  ## License
18
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devflow-tools/plugin-performance",
3
- "version": "0.8.9",
3
+ "version": "0.8.11",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -26,5 +26,5 @@
26
26
  "files": [
27
27
  "dist"
28
28
  ],
29
- "gitHead": "5c9a804d3c2e6e6822b516fde67d5b789dbdb5b3"
29
+ "gitHead": "a0a0b61377aa88ebbd380f50a5d532f63175ef45"
30
30
  }