@bovinphang/frontend-craft 2.6.0 → 2.8.0

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 (414) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +72 -1
  4. package/CHANGELOG.zh-CN.md +71 -1
  5. package/README.md +10 -6
  6. package/README.openclaw.md +100 -42
  7. package/README.openclaw.zh-CN.md +100 -42
  8. package/README.zh-CN.md +10 -6
  9. package/agents/fec-architect.md +70 -70
  10. package/agents/fec-code-reviewer.md +82 -82
  11. package/agents/fec-debugger.md +20 -20
  12. package/agents/fec-design-token-mapper.md +36 -36
  13. package/agents/fec-doc-updater.md +13 -13
  14. package/agents/fec-e2e-runner.md +45 -45
  15. package/agents/fec-figma-implementer.md +59 -59
  16. package/agents/fec-performance-optimizer.md +128 -128
  17. package/agents/fec-refactor-cleaner.md +14 -14
  18. package/agents/fec-security-reviewer.md +66 -67
  19. package/agents/fec-test-planner.md +27 -27
  20. package/agents/fec-typescript-reviewer.md +88 -88
  21. package/agents/fec-ui-checker.md +74 -74
  22. package/commands/fec-debug.md +19 -19
  23. package/commands/fec-doc-sync.md +11 -11
  24. package/commands/fec-init.md +37 -38
  25. package/commands/fec-plan.md +58 -58
  26. package/commands/fec-refactor-clean.md +11 -11
  27. package/commands/fec-review.md +41 -41
  28. package/commands/fec-scaffold.md +41 -41
  29. package/commands/fec-tdd.md +13 -13
  30. package/dist/bin/frontend-craft.js +29 -27
  31. package/docs/example-prompts.md +84 -69
  32. package/docs/ja-JP/README.md +56 -52
  33. package/docs/ko-KR/README.md +45 -41
  34. package/docs/project-structure.md +19 -7
  35. package/docs/superpowers/plans/2026-05-29-fec-debug.md +491 -0
  36. package/docs/superpowers/specs/2026-05-29-fec-debug-design.md +340 -0
  37. package/docs/zh-CN/example-prompts.md +84 -69
  38. package/docs/zh-CN/project-structure.md +14 -5
  39. package/docs/zh-TW/README.md +33 -29
  40. package/localized/zh-CN/agents/fec-architect.md +125 -0
  41. package/localized/zh-CN/agents/fec-code-reviewer.md +152 -0
  42. package/localized/zh-CN/agents/fec-debugger.md +44 -0
  43. package/localized/zh-CN/agents/fec-design-token-mapper.md +75 -0
  44. package/localized/zh-CN/agents/fec-doc-updater.md +30 -0
  45. package/localized/zh-CN/agents/fec-e2e-runner.md +107 -0
  46. package/localized/zh-CN/agents/fec-figma-implementer.md +104 -0
  47. package/localized/zh-CN/agents/fec-performance-optimizer.md +293 -0
  48. package/localized/zh-CN/agents/fec-refactor-cleaner.md +32 -0
  49. package/localized/zh-CN/agents/fec-security-reviewer.md +116 -0
  50. package/localized/zh-CN/agents/fec-test-planner.md +50 -0
  51. package/localized/zh-CN/agents/fec-typescript-reviewer.md +142 -0
  52. package/localized/zh-CN/agents/fec-ui-checker.md +120 -0
  53. package/localized/zh-CN/commands/fec-debug.md +30 -0
  54. package/localized/zh-CN/commands/fec-doc-sync.md +19 -0
  55. package/localized/zh-CN/commands/fec-init.md +70 -0
  56. package/localized/zh-CN/commands/fec-plan.md +94 -0
  57. package/localized/zh-CN/commands/fec-refactor-clean.md +19 -0
  58. package/localized/zh-CN/commands/fec-review.md +66 -0
  59. package/localized/zh-CN/commands/fec-scaffold.md +205 -0
  60. package/localized/zh-CN/commands/fec-tdd.md +21 -0
  61. package/localized/zh-CN/skills/TEMPLATE.md +155 -0
  62. package/localized/zh-CN/skills/eval_queries.json +1013 -0
  63. package/localized/zh-CN/skills/fec-accessibility-check/SKILL.md +39 -0
  64. package/localized/zh-CN/skills/fec-accessibility-check/references/report-template.md +23 -0
  65. package/localized/zh-CN/skills/fec-accessibility-check/references/screen-reader-testing.md +33 -0
  66. package/localized/zh-CN/skills/fec-alchemy/SKILL.md +74 -0
  67. package/localized/zh-CN/skills/fec-alchemy/assets/absorption-plan-template.md +47 -0
  68. package/localized/zh-CN/skills/fec-alchemy/assets/intake-template.md +55 -0
  69. package/localized/zh-CN/skills/fec-alchemy/assets/review-checklist.md +31 -0
  70. package/localized/zh-CN/skills/fec-alchemy/references/methodology.md +94 -0
  71. package/localized/zh-CN/skills/fec-alchemy/references/originality-and-licensing.md +57 -0
  72. package/localized/zh-CN/skills/fec-api-integration/SKILL.md +78 -0
  73. package/localized/zh-CN/skills/fec-api-integration/references/integration-patterns.md +80 -0
  74. package/localized/zh-CN/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
  75. package/localized/zh-CN/skills/fec-browser-storage/SKILL.md +34 -0
  76. package/localized/zh-CN/skills/fec-browser-storage/references/storage-patterns.md +65 -0
  77. package/localized/zh-CN/skills/fec-canvas-threejs/SKILL.md +66 -0
  78. package/localized/zh-CN/skills/fec-canvas-threejs/references/rendering-patterns.md +67 -0
  79. package/localized/zh-CN/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +67 -0
  80. package/localized/zh-CN/skills/fec-code-review/SKILL.md +143 -0
  81. package/localized/zh-CN/skills/fec-code-review/references/report-template.md +29 -0
  82. package/localized/zh-CN/skills/fec-component-testing/SKILL.md +119 -0
  83. package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +62 -0
  84. package/localized/zh-CN/skills/fec-data-fetching/references/query-patterns.md +103 -0
  85. package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +157 -0
  86. package/localized/zh-CN/skills/fec-debug-framework/references/report-template.md +58 -0
  87. package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +34 -0
  88. package/localized/zh-CN/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +56 -0
  89. package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +39 -0
  90. package/localized/zh-CN/skills/fec-drawio-studio/SKILL.md +73 -0
  91. package/localized/zh-CN/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
  92. package/localized/zh-CN/skills/fec-drawio-studio/data/brand-icons.json +878 -0
  93. package/localized/zh-CN/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  94. package/localized/zh-CN/skills/fec-drawio-studio/references/data-residency.md +27 -0
  95. package/localized/zh-CN/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
  96. package/localized/zh-CN/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  97. package/localized/zh-CN/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
  98. package/localized/zh-CN/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
  99. package/localized/zh-CN/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
  100. package/localized/zh-CN/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
  101. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
  102. package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
  103. package/localized/zh-CN/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  104. package/localized/zh-CN/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
  105. package/localized/zh-CN/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
  106. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
  107. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
  108. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
  109. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
  110. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
  111. package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
  112. package/localized/zh-CN/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
  113. package/localized/zh-CN/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
  114. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
  115. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
  116. package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
  117. package/localized/zh-CN/skills/fec-drawio-studio/styles/schema.json +112 -0
  118. package/localized/zh-CN/skills/fec-e2e-testing/SKILL.md +42 -0
  119. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
  120. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
  121. package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
  122. package/localized/zh-CN/skills/fec-e2e-testing/references/playwright-patterns.md +95 -0
  123. package/localized/zh-CN/skills/fec-form-handling/SKILL.md +76 -0
  124. package/localized/zh-CN/skills/fec-form-handling/references/advanced-form-patterns.md +101 -0
  125. package/localized/zh-CN/skills/fec-image-generation/SKILL.md +80 -0
  126. package/localized/zh-CN/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  127. package/localized/zh-CN/skills/fec-image-generation/references/artifact-routing.md +80 -0
  128. package/localized/zh-CN/skills/fec-image-generation/references/diagram-workflows.md +74 -0
  129. package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
  130. package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
  131. package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
  132. package/localized/zh-CN/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  133. package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
  134. package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
  135. package/localized/zh-CN/skills/fec-implement-from-design/SKILL.md +129 -0
  136. package/localized/zh-CN/skills/fec-implement-from-design/references/design-plan-template.md +36 -0
  137. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/SKILL.md +46 -0
  138. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
  139. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +41 -0
  140. package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
  141. package/localized/zh-CN/skills/fec-legacy-web-standard/SKILL.md +35 -0
  142. package/localized/zh-CN/skills/fec-legacy-web-standard/references/legacy-patterns.md +85 -0
  143. package/localized/zh-CN/skills/fec-list-virtualization/SKILL.md +34 -0
  144. package/localized/zh-CN/skills/fec-list-virtualization/references/virtualization-patterns.md +80 -0
  145. package/localized/zh-CN/skills/fec-monorepo-project-standard/SKILL.md +142 -0
  146. package/localized/zh-CN/skills/fec-motion-interaction/SKILL.md +73 -0
  147. package/localized/zh-CN/skills/fec-motion-interaction/references/motion-patterns.md +112 -0
  148. package/localized/zh-CN/skills/fec-nextjs-project-standard/SKILL.md +123 -0
  149. package/localized/zh-CN/skills/fec-nuxt-project-standard/SKILL.md +122 -0
  150. package/localized/zh-CN/skills/fec-performance-optimization/SKILL.md +80 -0
  151. package/localized/zh-CN/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
  152. package/localized/zh-CN/skills/fec-performance-optimization/references/report-template.md +59 -0
  153. package/localized/zh-CN/skills/fec-pwa-implementation/SKILL.md +35 -0
  154. package/localized/zh-CN/skills/fec-pwa-implementation/references/manifest-and-icons.md +53 -0
  155. package/localized/zh-CN/skills/fec-pwa-implementation/references/service-worker-workbox.md +68 -0
  156. package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +91 -0
  157. package/localized/zh-CN/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
  158. package/localized/zh-CN/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
  159. package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
  160. package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
  161. package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +51 -0
  162. package/localized/zh-CN/skills/fec-refactor-clean/references/report-template.md +42 -0
  163. package/localized/zh-CN/skills/fec-responsive-layout/SKILL.md +34 -0
  164. package/localized/zh-CN/skills/fec-responsive-layout/references/responsive-layout-patterns.md +70 -0
  165. package/localized/zh-CN/skills/fec-route-protection/SKILL.md +135 -0
  166. package/localized/zh-CN/skills/fec-security-review/SKILL.md +38 -0
  167. package/localized/zh-CN/skills/fec-security-review/references/report-template.md +27 -0
  168. package/localized/zh-CN/skills/fec-security-review/references/security-checklist.md +64 -0
  169. package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +87 -0
  170. package/localized/zh-CN/skills/fec-state-management/SKILL.md +140 -0
  171. package/localized/zh-CN/skills/fec-state-management/references/state-patterns.md +109 -0
  172. package/localized/zh-CN/skills/fec-storybook-component-doc/SKILL.md +37 -0
  173. package/localized/zh-CN/skills/fec-storybook-component-doc/references/story-patterns.md +118 -0
  174. package/localized/zh-CN/skills/fec-svg-animation/SKILL.md +148 -0
  175. package/localized/zh-CN/skills/fec-tailwind-design-system/SKILL.md +34 -0
  176. package/localized/zh-CN/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +59 -0
  177. package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +52 -0
  178. package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +45 -0
  179. package/localized/zh-CN/skills/fec-typescript-project-standard/SKILL.md +54 -0
  180. package/{skills/fec-typescript-type-safety → localized/zh-CN/skills/fec-typescript-project-standard}/references/type-safety-patterns.md +1 -1
  181. package/{skills/fec-typescript-type-safety/SKILL.md → localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md} +5 -14
  182. package/localized/zh-CN/skills/fec-ui-design/SKILL.md +108 -0
  183. package/localized/zh-CN/skills/fec-ui-design/data/product-rules.json +231 -0
  184. package/localized/zh-CN/skills/fec-ui-design/data/stack-ui-rules.json +146 -0
  185. package/localized/zh-CN/skills/fec-ui-design/data/style-archetypes.json +373 -0
  186. package/localized/zh-CN/skills/fec-ui-design/data/ux-quality-rules.json +203 -0
  187. package/localized/zh-CN/skills/fec-ui-design/references/design-intelligence.md +97 -0
  188. package/localized/zh-CN/skills/fec-ui-design/references/master-page-overrides.md +30 -0
  189. package/localized/zh-CN/skills/fec-ui-design/references/pre-delivery-checklist.md +39 -0
  190. package/localized/zh-CN/skills/fec-ui-design/scripts/design-system.mjs +648 -0
  191. package/localized/zh-CN/skills/fec-validation-fix/SKILL.md +51 -0
  192. package/localized/zh-CN/skills/fec-validation-fix/references/report-template.md +43 -0
  193. package/localized/zh-CN/skills/fec-vite-project-standard/SKILL.md +83 -0
  194. package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +58 -0
  195. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +162 -0
  196. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
  197. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +176 -0
  198. package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
  199. package/localized/zh-CN/skills/fec-web-video-presentation/SKILL.md +61 -0
  200. package/localized/zh-CN/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
  201. package/localized/zh-CN/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
  202. package/localized/zh-CN/skills/fec-web-video-presentation/references/content-plan.md +38 -0
  203. package/localized/zh-CN/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
  204. package/localized/zh-CN/skills/fec-web-video-presentation/references/theme-system.md +36 -0
  205. package/localized/zh-CN/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
  206. package/localized/zh-CN/skills/fec-web-workers/SKILL.md +35 -0
  207. package/localized/zh-CN/skills/fec-web-workers/references/advanced-workers.md +54 -0
  208. package/localized/zh-CN/skills/fec-web-workers/references/basic-worker.md +67 -0
  209. package/localized/zh-CN/skills/metadata.json +1646 -0
  210. package/localized/zh-CN/skills/relations.json +755 -0
  211. package/localized/zh-CN/templates/claude/CLAUDE.md +106 -0
  212. package/localized/zh-CN/templates/claude/settings.json +62 -0
  213. package/localized/zh-CN/templates/codex/AGENTS.md +105 -0
  214. package/localized/zh-CN/templates/codex/config.toml +32 -0
  215. package/localized/zh-CN/templates/openclaw/AGENTS.md +101 -0
  216. package/localized/zh-CN/templates/openclaw/OPENCLAW-CONFIG.md +12 -0
  217. package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +54 -0
  218. package/localized/zh-CN/templates/shared/rules/fec-api-layer.md +99 -0
  219. package/localized/zh-CN/templates/shared/rules/fec-ci-cd.md +40 -0
  220. package/localized/zh-CN/templates/shared/rules/fec-code-comments.md +33 -0
  221. package/localized/zh-CN/templates/shared/rules/fec-design-system.md +72 -0
  222. package/localized/zh-CN/templates/shared/rules/fec-error-handling.md +56 -0
  223. package/localized/zh-CN/templates/shared/rules/fec-git-conventions.md +73 -0
  224. package/localized/zh-CN/templates/shared/rules/fec-i18n.md +64 -0
  225. package/localized/zh-CN/templates/shared/rules/fec-naming-conventions.md +120 -0
  226. package/localized/zh-CN/templates/shared/rules/fec-performance.md +101 -0
  227. package/localized/zh-CN/templates/shared/rules/fec-react.md +82 -0
  228. package/localized/zh-CN/templates/shared/rules/fec-refactoring.md +47 -0
  229. package/localized/zh-CN/templates/shared/rules/fec-rendering-patterns.md +40 -0
  230. package/localized/zh-CN/templates/shared/rules/fec-responsive-design.md +50 -0
  231. package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +31 -0
  232. package/localized/zh-CN/templates/shared/rules/fec-state-management.md +60 -0
  233. package/localized/zh-CN/templates/shared/rules/fec-testing.md +98 -0
  234. package/localized/zh-CN/templates/shared/rules/fec-typescript.md +112 -0
  235. package/localized/zh-CN/templates/shared/rules/fec-vue.md +64 -0
  236. package/localized/zh-CN/templates/shared/rules/fec-working-modes.md +50 -0
  237. package/openclaw.plugin.json +1 -1
  238. package/package.json +4 -3
  239. package/skills/TEMPLATE.md +74 -74
  240. package/skills/eval_queries.json +717 -619
  241. package/skills/fec-accessibility-check/SKILL.md +21 -21
  242. package/skills/fec-accessibility-check/references/report-template.md +12 -12
  243. package/skills/fec-accessibility-check/references/screen-reader-testing.md +24 -24
  244. package/skills/fec-alchemy/SKILL.md +50 -50
  245. package/skills/fec-alchemy/assets/absorption-plan-template.md +32 -32
  246. package/skills/fec-alchemy/assets/intake-template.md +55 -55
  247. package/skills/fec-alchemy/assets/review-checklist.md +23 -23
  248. package/skills/fec-alchemy/references/methodology.md +66 -66
  249. package/skills/fec-alchemy/references/originality-and-licensing.md +42 -42
  250. package/skills/fec-api-integration/SKILL.md +61 -61
  251. package/skills/fec-api-integration/references/integration-patterns.md +30 -30
  252. package/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
  253. package/skills/fec-browser-storage/SKILL.md +16 -16
  254. package/skills/fec-browser-storage/references/storage-patterns.md +16 -16
  255. package/skills/fec-canvas-threejs/SKILL.md +21 -21
  256. package/skills/fec-canvas-threejs/references/rendering-patterns.md +10 -10
  257. package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +37 -37
  258. package/skills/fec-code-review/SKILL.md +94 -94
  259. package/skills/fec-code-review/references/report-template.md +13 -13
  260. package/skills/fec-component-testing/SKILL.md +39 -39
  261. package/skills/fec-data-fetching/SKILL.md +16 -16
  262. package/skills/fec-data-fetching/references/query-patterns.md +27 -27
  263. package/skills/fec-debug-framework/SKILL.md +95 -95
  264. package/skills/fec-debug-framework/references/report-template.md +34 -34
  265. package/skills/fec-dependency-upgrade/SKILL.md +17 -17
  266. package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +31 -31
  267. package/skills/fec-doc-sync/SKILL.md +23 -23
  268. package/skills/fec-drawio-studio/SKILL.md +73 -0
  269. package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
  270. package/skills/fec-drawio-studio/data/brand-icons.json +878 -0
  271. package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
  272. package/skills/fec-drawio-studio/references/data-residency.md +27 -0
  273. package/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
  274. package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
  275. package/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
  276. package/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
  277. package/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
  278. package/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
  279. package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
  280. package/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
  281. package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
  282. package/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
  283. package/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
  284. package/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
  285. package/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
  286. package/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
  287. package/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
  288. package/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
  289. package/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
  290. package/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
  291. package/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
  292. package/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
  293. package/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
  294. package/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
  295. package/skills/fec-drawio-studio/styles/schema.json +112 -0
  296. package/skills/fec-e2e-testing/SKILL.md +24 -22
  297. package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
  298. package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
  299. package/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
  300. package/skills/fec-e2e-testing/references/playwright-patterns.md +6 -6
  301. package/skills/fec-form-handling/SKILL.md +21 -21
  302. package/skills/fec-form-handling/references/advanced-form-patterns.md +41 -41
  303. package/skills/fec-image-generation/SKILL.md +81 -0
  304. package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
  305. package/skills/fec-image-generation/references/artifact-routing.md +80 -0
  306. package/skills/fec-image-generation/references/diagram-workflows.md +74 -0
  307. package/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
  308. package/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
  309. package/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
  310. package/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
  311. package/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
  312. package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
  313. package/skills/fec-implement-from-design/SKILL.md +81 -74
  314. package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
  315. package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -173
  316. package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
  317. package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +37 -37
  318. package/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
  319. package/skills/fec-legacy-web-standard/SKILL.md +17 -17
  320. package/skills/fec-legacy-web-standard/references/legacy-patterns.md +16 -16
  321. package/skills/fec-list-virtualization/SKILL.md +16 -16
  322. package/skills/fec-list-virtualization/references/virtualization-patterns.md +31 -31
  323. package/skills/fec-monorepo-project-standard/SKILL.md +52 -52
  324. package/skills/fec-motion-interaction/SKILL.md +51 -44
  325. package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
  326. package/skills/fec-nextjs-project-standard/SKILL.md +64 -58
  327. package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
  328. package/skills/fec-performance-optimization/SKILL.md +54 -50
  329. package/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
  330. package/skills/fec-performance-optimization/references/report-template.md +34 -28
  331. package/skills/fec-pwa-implementation/SKILL.md +17 -17
  332. package/skills/fec-pwa-implementation/references/manifest-and-icons.md +12 -12
  333. package/skills/fec-pwa-implementation/references/service-worker-workbox.md +13 -13
  334. package/skills/fec-react-project-standard/SKILL.md +72 -64
  335. package/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
  336. package/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
  337. package/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
  338. package/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
  339. package/skills/fec-refactor-clean/SKILL.md +30 -30
  340. package/skills/fec-refactor-clean/references/report-template.md +23 -23
  341. package/skills/fec-responsive-layout/SKILL.md +17 -17
  342. package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +39 -28
  343. package/skills/fec-route-protection/SKILL.md +26 -26
  344. package/skills/fec-security-review/SKILL.md +20 -20
  345. package/skills/fec-security-review/references/report-template.md +12 -12
  346. package/skills/fec-security-review/references/security-checklist.md +27 -27
  347. package/skills/fec-source-driven-development/SKILL.md +66 -40
  348. package/skills/fec-state-management/SKILL.md +34 -34
  349. package/skills/fec-state-management/references/state-patterns.md +19 -19
  350. package/skills/fec-storybook-component-doc/SKILL.md +19 -19
  351. package/skills/fec-storybook-component-doc/references/story-patterns.md +12 -12
  352. package/skills/fec-svg-animation/SKILL.md +32 -32
  353. package/skills/fec-tailwind-design-system/SKILL.md +17 -17
  354. package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +36 -32
  355. package/skills/fec-tdd-workflow/SKILL.md +28 -28
  356. package/skills/fec-testing-strategy/SKILL.md +29 -29
  357. package/skills/fec-typescript-project-standard/SKILL.md +54 -0
  358. package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
  359. package/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
  360. package/skills/fec-ui-design/SKILL.md +90 -72
  361. package/skills/fec-ui-design/data/style-archetypes.json +40 -0
  362. package/skills/fec-ui-design/data/ux-quality-rules.json +35 -0
  363. package/skills/fec-ui-design/references/design-intelligence.md +81 -21
  364. package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
  365. package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -32
  366. package/skills/fec-ui-design/scripts/design-system.mjs +119 -1
  367. package/skills/fec-validation-fix/SKILL.md +26 -26
  368. package/skills/fec-validation-fix/references/report-template.md +25 -25
  369. package/skills/fec-vite-project-standard/SKILL.md +39 -39
  370. package/skills/fec-vue3-project-standard/SKILL.md +39 -30
  371. package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +163 -0
  372. package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
  373. package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +177 -0
  374. package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
  375. package/skills/fec-web-video-presentation/SKILL.md +61 -0
  376. package/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
  377. package/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
  378. package/skills/fec-web-video-presentation/references/content-plan.md +38 -0
  379. package/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
  380. package/skills/fec-web-video-presentation/references/theme-system.md +36 -0
  381. package/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
  382. package/skills/fec-web-workers/SKILL.md +16 -16
  383. package/skills/fec-web-workers/references/advanced-workers.md +13 -13
  384. package/skills/fec-web-workers/references/basic-worker.md +8 -8
  385. package/skills/metadata.json +402 -220
  386. package/skills/relations.json +120 -25
  387. package/templates/claude/CLAUDE.md +60 -60
  388. package/templates/codex/AGENTS.md +76 -76
  389. package/templates/codex/config.toml +4 -4
  390. package/templates/openclaw/AGENTS.md +68 -68
  391. package/templates/openclaw/OPENCLAW-CONFIG.md +8 -8
  392. package/templates/shared/rules/fec-agent-workflow.md +40 -40
  393. package/templates/shared/rules/fec-api-layer.md +52 -52
  394. package/templates/shared/rules/fec-ci-cd.md +29 -117
  395. package/templates/shared/rules/fec-code-comments.md +22 -22
  396. package/templates/shared/rules/fec-design-system.md +65 -241
  397. package/templates/shared/rules/fec-error-handling.md +41 -185
  398. package/templates/shared/rules/fec-git-conventions.md +42 -42
  399. package/templates/shared/rules/fec-i18n.md +48 -96
  400. package/templates/shared/rules/fec-naming-conventions.md +91 -91
  401. package/templates/shared/rules/fec-performance.md +78 -78
  402. package/templates/shared/rules/fec-react.md +58 -58
  403. package/templates/shared/rules/fec-refactoring.md +34 -30
  404. package/templates/shared/rules/fec-rendering-patterns.md +40 -183
  405. package/templates/shared/rules/fec-responsive-design.md +37 -214
  406. package/templates/shared/rules/fec-source-driven-development.md +22 -22
  407. package/templates/shared/rules/fec-state-management.md +45 -148
  408. package/templates/shared/rules/fec-testing.md +64 -64
  409. package/templates/shared/rules/fec-typescript.md +98 -341
  410. package/templates/shared/rules/fec-vue.md +42 -42
  411. package/templates/shared/rules/fec-working-modes.md +34 -34
  412. package/skills/fec-e2e-testing/references/e2e-advanced.md +0 -176
  413. package/skills/fec-react-project-standard/references/react-project-details.md +0 -642
  414. package/skills/fec-vue3-project-standard/references/vue3-project-details.md +0 -547
@@ -1,76 +1,80 @@
1
1
  ---
2
2
  name: fec-performance-optimization
3
- description: Use when diagnosing or improving frontend performance, Core Web Vitals, bundle size, runtime rendering cost, network waterfalls, memory leaks, long tasks, Lighthouse findings, or performance budgets; Chinese triggers include 性能优化, 页面卡顿, 首屏慢, 包体积, Web Vitals.
3
+ description: Use when diagnosing or improving frontend performance, Core Web Vitals, bundle size, runtime rendering cost, network waterfalls, memory leaks, long tasks, Lighthouse findings, or performance budgets; Chinese triggers include performance optimization, page freeze, slow first screen, bundle volume, Web Vitals.
4
4
  ---
5
5
 
6
- # 前端性能优化
6
+ # Front-end performance optimization
7
7
 
8
8
  ## Purpose
9
9
 
10
- 用可度量的方式定位前端性能瓶颈,并把优化建议收敛到用户主路径、构建产物和运行时证据。
10
+ Use measurable methods to locate front-end performance bottlenecks, and converge optimization suggestions to the user's main path, build products, and runtime evidence.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 锁定体验目标
15
- - 明确问题属于首屏加载、交互延迟、滚动卡顿、内存上涨、网络瀑布、包体积,还是视觉稳定性。
16
- - 记录路由、设备、网络条件、浏览器、复现步骤和当前可用指标。
17
- - 没有指标时先建立基线,不直接给出“优化一切”的泛化建议。
18
-
19
- 2. 建立度量基线
20
- - 读取项目脚本、构建配置、依赖和已有性能报告。
21
- - 对页面体验优先使用 Lighthouse、Performance trace、React Profiler、Vue Devtools、Memory snapshot 或 RUM 数据。
22
- - 对包体优先看构建产物、source map、依赖重复、首屏 chunk 和动态 import 边界。
23
- - 对运行时卡顿优先看长任务、重复渲染、昂贵计算、同步循环、布局抖动和大列表。
24
-
25
- 3. 分层定位
26
- - 加载层:关键 CSS、字体、图片、脚本阻塞、预加载和缓存。
27
- - 渲染层:不稳定 key、过宽 Context、无意义 effect、重复计算、组件树过大。
28
- - 数据层:串行请求、重复请求、过大 payload、缺少分页或缓存策略。
29
- - 主线程:JSON/CSV 解析、图片处理、复杂排序过滤、同步压缩和大对象深拷贝。
30
- - 资源层:事件监听、定时器、订阅、WebGL/Canvas 资源和对象 URL 未释放。
31
-
32
- 4. 形成优化方案
33
- - 每个建议必须绑定位置、影响、改法和验证方式。
34
- - 优先处理高频主路径和 P95 体验;低频后台任务不抢占首屏预算。
35
- - 先做低风险高收益改动,如懒加载、去重、缓存、尺寸预留、虚拟列表、稳定引用和释放资源。
36
- - 对会牺牲可维护性的技巧,必须说明收益证据和替代方案。
37
-
38
- 5. 验证回归
39
- - 重新运行受影响构建、测试和性能采集命令。
40
- - 对比优化前后指标或产物体积。
41
- - 确认 loading、empty、error、offline、reduced-motion 和移动端状态未被优化破坏。
14
+ 1. Lock in experience goals
15
+ - Clarify whether the problem is first screen loading, interaction delay, scrolling lag, memory increase, network waterfall, packet size, or visual stability.
16
+ - Document routes, devices, network conditions, browsers, replication steps, and currently available metrics.
17
+ - When there are no indicators, establish a baseline first and do not directly give generalized suggestions of "optimizing everything".
18
+
19
+ 2. Establish a measurement baseline
20
+ - Read project scripts, build configurations, dependencies and existing performance reports.
21
+ - Prioritize the use of Lighthouse, Performance trace, React Profiler, Vue Devtools, Memory snapshot or RUM data for page experience.
22
+ - Prioritize build products, source maps, dependency duplication, first-screen chunks and dynamic import boundaries for package bodies.
23
+ - Prioritize long tasks, repeated renderings, expensive calculations, synchronized loops, layout jitters and large lists for runtime lags.
24
+ - If there are online monitoring, platform indicators or CI products, first use them to confirm the affected routes, devices, time windows and user main paths, and then decide which source code to read.
25
+
26
+ 3. Hierarchical positioning
27
+ - Loading layers: critical CSS, fonts, images, script blocking, preloading and caching.
28
+ - Rendering layer: unstable keys, too wide Context, meaningless effects, repeated calculations, and component trees that are too large.
29
+ - Data layer: serial requests, repeated requests, too large payload, lack of paging or caching strategy.
30
+ - Main thread: JSON/CSV parsing, image processing, complex sorting and filtering, synchronous compression and large object deep copy.
31
+ - Resource layer: event listeners, timers, subscriptions, WebGL/Canvas resources and object URLs are not released.
32
+
33
+ 4. Form an optimization plan
34
+ - Each suggestion must be bound to location, impact, modification and verification method.
35
+ - Prioritize the high-frequency main path and P95 experience; low-frequency background tasks do not occupy the first screen budget.
36
+ - Make low-risk, high-yield changes first, such as lazy loading, deduplication, caching, size reservation, virtual lists, stable references and releasing resources.
37
+ - For techniques that sacrifice maintainability, evidence of benefits and alternatives must be stated.
38
+ - It is recommended to go through the candidate access control before entering the implementation: whether there is indicator support, whether the route/component/chunk/request can be located, whether it can be verified by the front end, and whether there are smaller changes.
39
+
40
+ 5. Verify regression
41
+ - Rerun affected build, test, and performance collection commands.
42
+ - Compare indicators or product volumes before and after optimization.
43
+ - Confirm that loading, empty, error, offline, reduced-motion and mobile state are not destroyed by optimization.
42
44
 
43
45
  ## Budgets
44
46
 
45
47
  | Area | Default Target | Notes |
46
48
  | ---- | -------------- | ----- |
47
- | LCP | 约 2.5s 内 | 以核心页面、目标地区网络和真实设备为准 |
48
- | CLS | 低于 0.1 | 媒体、广告、异步内容需要预留空间 |
49
- | INP | 约 200ms 内 | 优先拆分长任务和降低交互路径重渲染 |
50
- | Initial JS | 遵循项目预算 | 没有预算时先报告当前 gzip / brotli 体积 |
51
- | Main thread | 避免连续长任务 | 大计算考虑分片、缓存或 Worker |
49
+ | LCP | Within about 2.5s | Subject to core page, target area network and real device |
50
+ | CLS | Less than 0.1 | Media, advertising, and asynchronous content require reserved space |
51
+ | INP | Within about 200ms | Prioritize splitting long tasks and reduce interaction path re-rendering |
52
+ | Initial JS | Follow project budget | Report current gzip / brotli size first if there is no budget |
53
+ | Main thread | Avoid continuous long tasks | Consider sharding, caching or Worker for large calculations |
52
54
 
53
55
  ## Checks
54
56
 
55
- - 首屏资源是否包含非首屏组件、图表、编辑器、地图或全量图标库。
56
- - 图片是否有明确尺寸、合适格式、懒加载和首屏优先级。
57
- - 列表、表格、时间线是否需要虚拟化或分页。
58
- - 搜索、筛选、排序是否在热路径重复 O(n*m) 扫描。
59
- - 请求是否可并行、可缓存、可取消、可复用。
60
- - 监听、订阅、定时器、AbortController、Object URL、Canvas/WebGL 资源是否对称清理。
57
+ - Whether the above-the-fold resources include non-above-the-fold components, charts, editors, maps, or full icon libraries.
58
+ - Whether the image has clear size, appropriate format, lazy loading and first screen priority.
59
+ - Whether lists, tables, and timelines require virtualization or paging.
60
+ - Whether searching, filtering, and sorting repeat O(n*m) scans on the hot path.
61
+ - Whether the request can be parallelized, cached, cancelled, and reusable.
62
+ - Whether listening, subscription, timer, AbortController, Object URL, Canvas/WebGL resources are cleaned symmetrically.
61
63
 
62
64
  ## Constraints
63
65
 
64
- - 不做没有目标和证据的过早优化。
65
- - 不靠关闭功能、删除状态反馈或降低可访问性来换性能分数。
66
- - 不为一次 Lighthouse 分数牺牲真实用户主路径。
67
- - 不引入大型新依赖解决小问题;先利用项目已有工具和浏览器能力。
68
- - 不把后端、网络和浏览器侧问题混为一谈;前端能验证的部分要单独列证据。
66
+ - Don’t do premature optimization without goals and evidence.
67
+ - Don’t trade off features, remove status feedback, or reduce accessibility in exchange for performance points.
68
+ - Do not sacrifice real user home paths for a single Lighthouse score.
69
+ - Solve small problems without introducing large new dependencies; first use the existing tools and browser capabilities of the project.
70
+ - Do not confuse back-end, network and browser-side issues; the parts that can be verified on the front-end should be separately documented.
71
+ - Do not jump directly from repo-wide grep to the optimization conclusion; first use indicators or recurrence paths to narrow down candidates, and then read the relevant source code.
69
72
 
70
- ## 详细参考
73
+ ## Detailed reference
71
74
 
72
- 撰写性能分析报告时,加载 [references/report-template.md](references/report-template.md)。
75
+ When writing a performance analysis report, load [references/report-template.md](references/report-template.md).
76
+ When you need to locate framework-specific performance risks classified by React, Vue, Next.js or Nuxt, load [references/framework-performance-patterns.md](references/framework-performance-patterns.md).
73
77
 
74
78
  ## Expected Output
75
79
 
76
- 输出有证据链的性能分析报告,说明基线、瓶颈、优化建议、验证方式和剩余风险。报告保存为 `reports/performance-review-YYYY-MM-DD-HHmmss.md`。
80
+ Output a performance analysis report with an evidence chain, describing the baseline, candidate access control, bottlenecks, optimization suggestions, verification methods and remaining risks. The report is saved as `reports/performance-review-YYYY-MM-DD-HHmmss.md`.
@@ -0,0 +1,38 @@
1
+ #Framework-specific performance diagnostic mode
2
+
3
+ This reference is used for special positioning after entering the performance optimization process. Establish goals, baselines, and candidate gates first, then read corresponding categories by framework; don't jump directly from these lists to conclusions.
4
+
5
+ ## React / Client React
6
+
7
+ - **Waterfall**: Whether independent requests, permission checks, feature flags, or subcomponent data are waited for serially. Confirm dependencies using Network waterfall, React Profiler, or user path logs.
8
+ - **Bundle**: Whether to simultaneously introduce charts, editors, maps, 3D, full icons, heavy date libraries or barrel exports on the first screen. Locate chunks using build products, source maps, or bundle analyzers.
9
+ - **Rerender**: Whether the Context is too wide, whether the selector is too thick, whether the default object/array props are created every time, and whether expensive derivation is executed repeatedly in the hot path. Use React Profiler or reproducible interactive proofs.
10
+ - **Effect**: Whether to use effect to save data that can be directly deduced, whether to put interaction logic into effect, whether to lack cancellation, cleanup or stable dependencies. Confirm with render count, request count, or memory/subscription evidence.
11
+ - **Lazy boundary**: Whether Suspense, dynamic import, error fallback, loading/empty/error status appear in pairs, whether lazy loading destroys focus or first screen layout stability.
12
+
13
+ ## Vue 3 / Nuxt Client
14
+
15
+ - **Reactive payload size**: Whether large objects, tabular data, or third-party instances are deeply reactively proxied. Use component updates, memory snapshots, or evidence of long tasks to determine whether shallow reactive or immutable boundaries are needed.
16
+ - **Computed/watch**: Whether the computed derived value is manually synchronized with a wide range watcher, whether the watch monitors wide objects, and whether the asynchronous watch lacks cancellation and race handling.
17
+ - **Template hot path**: Mixed `v-if` in `v-for`, inline recalculation, missing stable `:key`, or rendering non-viewport nodes in a large list.
18
+ - **Async component boundary**: Whether heavy-duty components use asynchronous components or route-level dynamic import, whether the loading state is stable, and whether the error state is recoverable.
19
+ - **Store fan-out**: Whether the Pinia store spreads high-frequency UI temporary state to a wide range of subscribers, or copies the server cache to the global store.
20
+
21
+ ## Next.js
22
+
23
+ - **Dynamic route drift**: Whether cookies, headers, searchParams or uncached fetch make static routes dynamic. Confirm with build output, response headers, or route behavior.
24
+ - **RSC serialization**: Whether the Server Component passes too large props, duplicate data or unserializable structures to the Client Component.
25
+ - **Fetch/cache policy**: Whether `force-cache`, `no-store`, `revalidate`, tag/path revalidation match the data privacy and update frequency.
26
+ - **Client boundary leakage**: Whether the root layout or high-level client boundary is synchronized with heavy browser libraries, providers or unnecessary state.
27
+ - **Middleware cost**: Whether the middleware carries heavy queries, log batch processing, or business logic that can be placed in the route handler.
28
+
29
+ ## Nuxt 3
30
+
31
+ - **Rendering mode mismatch**: Whether the page should be SSR, SSG, ISR/route rules or SPA, and whether the actual behavior is consistent with the deployment target.
32
+ - **Data duplication**: `useFetch` / `useAsyncData` Whether the request is repeated, whether the key is stable, whether the client hydration repeatedly pulls the same data.
33
+ - **Route middleware cost**: Whether the routing middleware does heavy asynchronous work, repeated authentication requests or non-cacheable global blocking logic.
34
+ - **Client-only islands**: Whether charts, editors, maps or WebGL that run only in the browser are isolated to client-only or async boundaries.
35
+
36
+ ## Output requirements
37
+
38
+ Each framework-specific proposal must be written clearly: source of evidence, affected routes/components/chunks/requests, recommended changes, verification commands and possible impact on loading, error, empty, offline, reduced-motion or mobile status.
@@ -1,53 +1,59 @@
1
- # 性能分析报告模板
1
+ #Performance analysis report template
2
2
 
3
3
  ```markdown
4
- # 前端性能分析报告
4
+ # Front-end performance analysis report
5
5
 
6
- > 生成时间: YYYY-MM-DD HH:mm
7
- > 目标页面/流程: ...
8
- > 环境: 设备、浏览器、网络、分支或版本
6
+ > Generation time: YYYY-MM-DD HH:mm
7
+ > Target page/process: ...
8
+ > Environment: Device, Browser, Network, Branch or Version
9
9
 
10
- ## 性能目标
10
+ ## Performance target
11
11
 
12
- - 关注指标: LCP / CLS / INP / TBT / bundle size / memory / FPS
13
- - 项目预算或目标阈值
14
- - 用户主路径和 P95 场景
12
+ - Focus on metrics: LCP / CLS / INP / TBT / bundle size / memory / FPS
13
+ - Project budget or target threshold
14
+ - User home path and P95 scene
15
15
 
16
- ## 基线数据
16
+ ## Baseline data
17
17
 
18
- | 指标 | 当前值 | 采集方式 | 备注 |
18
+ | Indicator | Current value | Collection method | Remarks |
19
19
  | --- | --- | --- | --- |
20
20
  | LCP | ... | Lighthouse / RUM / trace | ... |
21
21
 
22
- ## 瓶颈定位
22
+ ## Bottleneck location
23
23
 
24
- - 加载层、渲染层、数据层、主线程或资源层问题
25
- - 关联文件、路由、chunk、组件或请求
26
- - 支持该判断的 trace、bundle、日志或截图证据
24
+ - Problems with loading layer, rendering layer, data layer, main thread or resource layer
25
+ - Associated files, routes, chunks, components or requests
26
+ - Trace, bundle, log or screenshot evidence to support this judgment
27
27
 
28
- ## 优先级
28
+ ## Candidate access control
29
29
 
30
- | 优先级 | 问题 | 用户影响 | 风险 |
30
+ | Candidate questions | Indicator support | Positioning scope | Front-end verifiability | Conclusion |
31
+ | --- | --- | --- | --- | --- |
32
+ | ... | RUM / trace / bundle / network | route / component / chunk / request | Yes / No / Collaboration required | investigate / defer / reject |
33
+
34
+ ## Priority
35
+
36
+ | Priority | Issues | User Impact | Risks |
31
37
  | --- | --- | --- | --- |
32
38
  | P0 / P1 / P2 | ... | ... | ... |
33
39
 
34
- ## 优化方案
40
+ ## Optimization plan
35
41
 
36
- - 具体改法
37
- - 替代方案
38
- - 可维护性、可访问性和产品行为影响
42
+ - Specific changes to the law
43
+ - Alternatives
44
+ - Maintainability, accessibility and product behavior impacts
39
45
 
40
- ## 验证对比
46
+ ## Verification comparison
41
47
 
42
- | 指标 | 优化前 | 优化后 | 采集方式 |
48
+ | Indicators | Before optimization | After optimization | Collection method |
43
49
  | --- | --- | --- | --- |
44
50
  | ... | ... | ... | ... |
45
51
 
46
- ## 剩余风险
52
+ ## Residual risk
47
53
 
48
- - 未覆盖设备、网络或浏览器
49
- - 需要后端、设计、产品或基础设施协作的部分
50
- - 建议监控或后续任务
54
+ - No device, network or browser coverage
55
+ - Parts that require backend, design, product or infrastructure collaboration
56
+ - Suggest monitoring or follow-up tasks
51
57
  ```
52
58
 
53
- 分析完成后,将报告保存到 `reports/performance-review-YYYY-MM-DD-HHmmss.md`,并告知用户报告路径。
59
+ After the analysis is completed, save the report to `reports/performance-review-YYYY-MM-DD-HHmmss.md` and inform the user of the report path.
@@ -1,35 +1,35 @@
1
1
  ---
2
2
  name: fec-pwa-implementation
3
- description: Use when adding or reviewing Progressive Web App capabilities such as installability, manifest metadata, Service Worker registration, Workbox caching, offline fallback, app update prompts, maskable icons, or iOS PWA compatibility. Do not use for general API caching or non-installable performance tuning; Chinese triggers include PWA, 离线, Service Worker.
3
+ description: Use when adding or reviewing Progressive Web App capabilities such as installability, manifest metadata, Service Worker registration, Workbox caching, offline fallback, app update prompts, maskable icons, or iOS PWA compatibility. Do not use for general API caching or non-installable performance tuning; Chinese triggers include PWA, offline, Service Worker.
4
4
  ---
5
5
 
6
- # PWA 实现
6
+ # PWA implementation
7
7
 
8
8
  ## Purpose
9
9
 
10
- 让 Web 应用具备可安装、离线兜底和可控更新能力。
10
+ Make web applications installable, offline and controllable to update.
11
11
 
12
12
  ## Procedure
13
13
 
14
- 1. 确认 PWA 是否值得做:面向移动端/桌面安装、弱网离线、重复访问场景时优先;纯内部后台、强实时流媒体或只需要普通缓存时不要强行 PWA。
15
- 2. 先补齐 manifest、图标、主题色和 HTML 引用;图标至少覆盖 192/512,Android 需 maskable,iOS 需 apple touch icon。
16
- 3. 注册 Service Worker,并设计更新提示;不要静默 `skipWaiting()` 后强刷用户页面。
17
- 4. 用 Workbox 或框架插件管理 precache/runtime cache;登录、支付、权限变更等敏感请求必须走网络。
18
- 5. 提供 offline fallback 页面和安装提示 UI,并验证首次加载、离线访问、更新激活、卸载重装。
14
+ 1. Confirm whether PWA is worth doing: priority is given to mobile/desktop installations, weak network offline, and repeated access scenarios; do not force PWA when it is purely internal backend, has strong real-time streaming media, or only requires ordinary caching.
15
+ 2. First complete the manifest, icon, theme color and HTML reference; the icon covers at least 192/512, Android needs to be maskable, and iOS needs apple touch icon.
16
+ 3. Register the Service Worker and design an update prompt; do not forcefully refresh the user page after silently `skipWaiting()`.
17
+ 4. Use Workbox or framework plug-in to manage precache/runtime cache; sensitive requests such as login, payment, and permission changes must go through the network.
18
+ 5. Provide offline fallback page and installation prompt UI, and verify initial loading, offline access, update activation, uninstallation and reinstallation.
19
19
 
20
- ## 详细参考
20
+ ## Detailed reference
21
21
 
22
- - 需要 manifest 字段、HTML 引用、图标要求、截图和 iOS 注意事项时,加载 [references/manifest-and-icons.md](references/manifest-and-icons.md)。
23
- - 需要 Service Worker 注册、Workbox 策略、Vite 集成、离线兜底和更新流程时,加载 [references/service-worker-workbox.md](references/service-worker-workbox.md)。
22
+ - Load [references/manifest-and-icons.md](references/manifest-and-icons.md) when manifest fields, HTML references, icon requirements, screenshots, and iOS notes are required.
23
+ - Load [references/service-worker-workbox.md](references/service-worker-workbox.md) when Service Worker registration, Workbox policy, Vite integration, offline backup and update process are required.
24
24
 
25
25
  ## Constraints
26
26
 
27
- - Service Worker 仅在 HTTPS 下工作(localhost 除外)。
28
- - 缓存策略必须区分页面、静态资源、API 与敏感操作;不要把登录、支付、权限接口缓存起来。
29
- - Service Worker 更新有生命周期延迟;用户可见刷新提示优先于强制刷新。
30
- - iOS PWA 能力弱于 Android,安装、推送和生命周期都要单独验证。
31
- - 缓存有配额和逐出机制,必须设置 max entries / max age。
27
+ - Service Worker only works under HTTPS (except localhost).
28
+ - The caching strategy must distinguish between pages, static resources, APIs and sensitive operations; do not cache login, payment, and permission interfaces.
29
+ - Service Worker updates have a lifecycle delay; user-visible refresh prompts take precedence over forced refreshes.
30
+ - iOS PWA capabilities are weaker than Android, and installation, push and life cycle must be verified separately.
31
+ - The cache has quotas and eviction mechanisms, and max entries / max age must be set.
32
32
 
33
33
  ## Expected Output
34
34
 
35
- 产出可安装的 Web 应用、离线 fallback、可见更新提示和明确缓存策略。验证 Lighthouse PWA、DevTools Application 面板、离线模式、更新发布和移动端安装流程。
35
+ Produce installable web apps, offline fallbacks, visible update prompts, and explicit caching policies. Validate Lighthouse PWA, DevTools Application panel, offline mode, update release and mobile installation process.
@@ -1,16 +1,16 @@
1
- # Manifest、图标与安装入口
1
+ # Manifest, icon and installation entrance
2
2
 
3
- ## Manifest 示例
3
+ ## Manifest Example
4
4
 
5
5
  ```json
6
6
  {
7
- "name": "我的应用",
8
- "short_name": "应用",
7
+ "name": "My App",
8
+ "short_name": "Application",
9
9
  "start_url": "/",
10
10
  "display": "standalone",
11
11
  "background_color": "#ffffff",
12
12
  "theme_color": "#0052cc",
13
- "description": "应用描述",
13
+ "description": "Application description",
14
14
  "icons": [
15
15
  {
16
16
  "src": "/icon-192.png",
@@ -36,7 +36,7 @@
36
36
  }
37
37
  ```
38
38
 
39
- ## HTML 引用
39
+ ## HTML Quote
40
40
 
41
41
  ```html
42
42
  <link rel="manifest" href="/manifest.json" />
@@ -44,10 +44,10 @@
44
44
  <link rel="apple-touch-icon" href="/icon-192.png" />
45
45
  ```
46
46
 
47
- ## 检查要点
47
+ ## Check Points
48
48
 
49
- - `display: "standalone"` 才有接近原生应用的启动体验。
50
- - `purpose: "any maskable"` 避免 Android 自适应图标被裁剪。
51
- - `start_url` 应指向登录后或游客可安全进入的入口。
52
- - `screenshots` 会影响安装对话框质量。
53
- - iOS 仍依赖 `apple-touch-icon`,安装提示也通常需要用户手动完成。
49
+ - `display: "standalone"` will have a startup experience close to native applications.
50
+ - `purpose: "any maskable"` prevents Android adaptive icons from being cropped.
51
+ - `start_url` should point to a login or entry point that is safe for visitors.
52
+ - `screenshots` can affect the quality of the installation dialog.
53
+ - iOS still relies on `apple-touch-icon`, and installation prompts usually require users to complete it manually.
@@ -1,6 +1,6 @@
1
- # Service Worker、Workbox 与更新流
1
+ # Service Worker, Workbox and update flow
2
2
 
3
- ## 注册 Service Worker
3
+ ## Register Service Worker
4
4
 
5
5
  ```ts
6
6
  export function registerServiceWorker() {
@@ -23,16 +23,16 @@ export function registerServiceWorker() {
23
23
  }
24
24
  ```
25
25
 
26
- ## 缓存策略
26
+ ## Caching strategy
27
27
 
28
- | 策略 | 适用 | 注意 |
28
+ | Policy | Applicable | Note |
29
29
  | --- | --- | --- |
30
- | `CacheFirst` | 带 hash 的图片、字体、CSS/JS | 必须设置过期策略 |
31
- | `NetworkFirst` | 页面导航、低风险 GET API | 网络失败才降级缓存 |
32
- | `StaleWhileRevalidate` | 字体、头像、低风险静态数据 | 用户会先看到旧数据 |
33
- | `NetworkOnly` | 登录、支付、权限、写操作 | 不进入 SW 缓存 |
30
+ | `CacheFirst` | Images, fonts, CSS/JS with hash | Expiration policy must be set |
31
+ | `NetworkFirst` | Page navigation, low-risk GET API | Downgrade cache only when network fails |
32
+ | `StaleWhileRevalidate` | Fonts, avatars, low-risk static data | Users will see old data first |
33
+ | `NetworkOnly` | Login, payment, permissions, write operations | Do not enter SW cache |
34
34
 
35
- ## Vite 集成
35
+ ## Vite integration
36
36
 
37
37
  ```ts
38
38
  import { VitePWA } from "vite-plugin-pwa";
@@ -61,8 +61,8 @@ export default defineConfig({
61
61
  });
62
62
  ```
63
63
 
64
- ## 离线与更新
64
+ ## Offline and Updates
65
65
 
66
- - 为未缓存页面准备 `/offline.html`,不要让用户只看到浏览器错误页。
67
- - 更新提示应说明“新版本已可用”,由用户确认刷新。
68
- - 调试时使用 DevTools Application 面板,必要时清理旧 Service Worker 和 Cache Storage。
66
+ - Prepare `/offline.html` for uncached pages, don't let users only see browser error pages.
67
+ - The update prompt should state "New version is available" and it is up to the user to confirm the refresh.
68
+ - Use the DevTools Application panel when debugging and clean up old Service Workers and Cache Storage if necessary.
@@ -1,83 +1,91 @@
1
1
  ---
2
2
  name: fec-react-project-standard
3
- description: Use when designing or reviewing React + TypeScript project structure, feature/module boundaries, component architecture, hooks organization, routing composition, state/API/error/styling defaults, or repository-wide React conventions. Prefer narrower skills for forms, data fetching, tests, accessibility, virtualization, animation, or security deep dives; Chinese triggers include React 项目规范, React 组件架构.
3
+ description: Use when designing or reviewing React + TypeScript project structure, feature/module boundaries, component architecture, hooks organization, routing composition, state/API/error/styling defaults, or repository-wide React conventions. Prefer narrower skills for forms, data fetching, tests, accessibility, virtualization, animation, or security deep dives; Chinese triggers include React project specification, React component architecture.
4
4
  ---
5
5
 
6
- # React 项目规范
6
+ # React project specifications
7
7
 
8
- 适用于 React + TypeScript 仓库中的中大型模块建设、页面重构和工程结构设计。
8
+ Suitable for medium and large module construction, page reconstruction and engineering structure design in React + TypeScript warehouse.
9
9
 
10
10
  ## Purpose
11
11
 
12
- 为 React + TypeScript 项目提供工程结构、模块边界和默认实现约定,确保架构清晰、代码可维护。
12
+ Provide engineering structure, module boundaries and default implementation conventions for React + TypeScript projects to ensure clear architecture and maintainable code.
13
13
 
14
14
  ## Procedure
15
15
 
16
- 本 skill 主要解决 React 工程任务“如何设计和落地”的问题,不重复声明基础编码底线。处理 React 工程化任务时,按以下顺序执行:
17
-
18
- 1. 识别仓库已有约定
19
- - 目录组织方式
20
- - 样式体系
21
- - 状态管理方案
22
- - 请求封装方式
23
- - 测试框架
24
- - UI 组件库 / 设计系统
25
-
26
- 2. 判断目标属于哪一层
27
- - 路由页面
28
- - 页面私有组件
29
- - feature 业务模块
30
- - 全局通用组件
16
+ This skill mainly solves the problem of "how to design and implement" React engineering tasks, without repeating the basic coding bottom line. When handling React engineering tasks, perform them in the following order:
17
+
18
+ 1. Identify the warehouse and have an agreement
19
+ - Directory organization
20
+ - Style system
21
+ - Status management solution
22
+ - Request packaging method
23
+ - Testing framework
24
+ - UI component library/design system
25
+
26
+ 2. Determine which layer the target belongs to
27
+ - Routing page
28
+ -Page private components
29
+ - feature business module
30
+ - Global common components
31
31
  - hooks / services / stores / utils
32
32
 
33
- 3. 设计边界后再落代码
34
- - 哪些逻辑属于页面编排
35
- - 哪些逻辑属于 feature
36
- - 哪些逻辑应下沉为通用能力
37
- - 哪些状态应本地管理,哪些应交给 store / query / URL
38
- - 状态归属复杂时使用状态管理流程先做状态清单
39
- - DTO、公共 props 或泛型组件复杂时使用 TypeScript 类型安全流程先收敛类型契约
40
-
41
- 4. 输出时补齐关键质量项
42
- - loading / error / empty / data 状态
43
- - 错误处理与重试
44
- - 类型约束
45
- - 关键测试入口
46
- - 必要的专项 skill 分流
47
- - 依赖是否已存在于 `package.json`,缺失时先给安装命令再使用
48
- - 重型 UI 能力(动效、图表、3D、编辑器、地图)是否隔离为 leaf component 并按需加载
49
- - 图片、视频、字体等资源是否本地化、可缓存,并避免占位 URL 进入交付
50
- - 页面级 Error Boundary、模块级 fallback、API 错误映射和用户可恢复动作是否一致
51
- - Tailwind token/variant 或响应式布局需求是否应分流到对应专项 skill
52
-
53
- ## 详细参考
54
-
55
- 需要具体 React 项目结构、组件模式、Hooks、路由、状态归属、API 层形状、错误处理、样式默认值、TypeScript 约定或审查清单时,加载 [references/react-project-details.md](references/react-project-details.md)。
33
+ 3. Design the boundaries before writing the code
34
+ - What logic belongs to page layout
35
+ - Which logic belongs to feature
36
+ - Which logic should be transferred to general capabilities?
37
+ - Which state should be managed locally and which should be handed over to store/query/URL
38
+ - When the status ownership is complex, use the status management process to make a status list first
39
+ - When the boundaries of DTO, public props, generic components or `tsconfig` are complex, first use the TypeScript project specification process to converge cross-framework type contracts
40
+
41
+ 4. Complete key quality items when outputting
42
+ - loading / error / empty / data status
43
+ - Error handling and retrying
44
+ - Type constraints
45
+ - Key test entrance
46
+ - Diversion of necessary special skills
47
+ - Check whether the dependency already exists in `package.json`. If it is missing, give the installation command first and then use it.
48
+ - Whether heavy UI capabilities (animation, charts, 3D, editors, maps) are isolated as leaf components and loaded on demand
49
+ - Whether images, videos, fonts and other resources are localized and cacheable, and avoid placeholder URLs from entering delivery
50
+ - Whether page-level Error Boundary, module-level fallback, API error mapping and user-recoverable actions are consistent
51
+ - Whether Tailwind token/variant or responsive layout requirements should be diverted to the corresponding special skill
52
+ - Perform lightweight screening for obvious architectural performance risks, such as heavy dependency boundaries, too wide Context, high-frequency derived values and lazy loading fallback; enter the performance optimization workflow when indicator evidence is needed
53
+
54
+ ## Detailed reference
55
+
56
+ Load more detailed reference files as needed:
57
+
58
+ - Project Directory, Component Hierarchy, Component Boundary and Component Directory Recommendations: Load [references/react-project-structure.md](references/react-project-structure.md).
59
+ - Component pattern, Hooks, routing, state ownership, API layer, error handling and Suspense/lazy loading: Load [references/react-runtime-patterns.md](references/react-runtime-patterns.md).
60
+ - Style, annotations, TypeScript, tests, anti-patterns and output checklist: Loading [references/react-quality-patterns.md](references/react-quality-patterns.md).
61
+ - Lightweight performance conventions at the React project specification level: Load [references/react-performance-patterns.md](references/react-performance-patterns.md).
56
62
 
57
63
  ## Constraints
58
64
 
59
- - 默认遵守仓库现有全局规则和 React rule
60
- - 若仓库已有明确目录结构、样式体系、状态管理或请求封装,优先沿用仓库约定
61
- - 组件文件规模宜约 **300 行**内;逾 **500 行**或复杂度过高须拆分子组件、Hooks、utils、类型
62
- - 禁止新增类组件(Error Boundary 用 `react-error-boundary` 等库)
63
- - 禁止绕过模块出口,从 feature 深层路径导入
64
- - 不要用 `useEffect + setState` 模拟本可直接计算的派生值
65
- - 避免 prop drilling 过深却不考虑组合或局部封装
66
- - 不在通用页面组件里同步引入 GSAP、Three.js、Lottie、富文本编辑器或地图 SDK;需要时用动态导入、路由级分包或叶子组件隔离。
67
- - 不在 React 组件中散落裸 `fetch`、API URL、token refresh 或上传流程;跨边界请求应收敛到 API 集成层。
68
- - 不用 Error Boundary 处理普通 API 失败;请求错误应优先落到 loading/error/empty/data 状态和可恢复操作。
65
+ - Comply with the existing global rules and React rules of the warehouse by default
66
+ - If the warehouse already has a clear directory structure, style system, status management or request encapsulation, the warehouse convention will be used first.
67
+ - The size of the component file should be approximately **300 lines**; if it exceeds **500 lines** or is too complex, it must be split into sub-components, Hooks, utils, and types.
68
+ - It is forbidden to add new class components (Error Boundary uses libraries such as `react-error-boundary`)
69
+ - Disable bypassing module exports and importing from feature deep paths
70
+ - Do not use `useEffect + setState` to simulate derived values that can be calculated directly
71
+ - Avoid prop drilling too deep without considering composition or partial encapsulation
72
+ - Do not synchronously introduce GSAP, Three.js, Lottie, rich text editor or map SDK into common page components; use dynamic import, route-level subcontracting or leaf component isolation when necessary.
73
+ - No bare `fetch`, API URL, token refresh or upload processes scattered around React components; cross-border requests should be converged to the API integration layer.
74
+ - Do not use Error Boundary to handle normal API failures; request errors should first fall into the loading/error/empty/data state and recoverable operations.
75
+ - Do not write React performance recommendations as global memo without evidence; first locate request waterfall, bundle boundaries, repeated rendering or effect misuse.
69
76
 
70
77
  ## Expected Output
71
78
 
72
- - 组件边界清晰,pages/features/components 分层明确
73
- - Props 类型完整且明确,无 `any` 滥用
74
- - 可复用逻辑已提取为 hooks,loading/error/empty/data 状态齐全
75
- - API 层具备类型约束和统一错误处理,状态管理符合就近原则
76
- - URL 状态、服务端状态、表单状态和全局客户端状态边界明确
77
- - 关键行为有测试覆盖,关键模块已用 `react-error-boundary` 包裹
78
- - 超长列表已评估虚拟化,弹窗/复合组件具备键盘与焦点支持
79
- - 先尊重仓库现状,再给推荐结构
80
- - 给出必要的文件划分建议
81
- - 必要时说明为什么这样分层
82
- - 对新增模块,优先输出最小可落地结构,而不是一次性过度设计
83
- - 对重构任务,优先保证可迁移性和风险可控
79
+ - Component boundaries are clear, pages/features/components are clearly layered
80
+ - The Props type is complete and clear; the narrowing of complex public types or external data has been diverted to the TypeScript project specification process
81
+ - Reusable logic has been extracted into hooks, and the loading/error/empty/data status is complete
82
+ - The API layer has type constraints and unified error handling, and status management conforms to the proximity principle
83
+ - URL status, server status, form status and global client status have clear boundaries
84
+ - Key behaviors are covered by tests, and key modules have been wrapped with `react-error-boundary`
85
+ - The long list has been evaluated for virtualization, and pop-up/composite components have keyboard and focus support
86
+ - Respect the current situation of the warehouse first, and then recommend the structure
87
+ - Give necessary suggestions for file division
88
+ - Explain why this is layered if necessary
89
+ - For new modules, give priority to outputting the smallest floor-mountable structure rather than over-designing it all at once
90
+ - For reconstruction tasks, give priority to ensuring portability and risk controllability
91
+ - For performance-related React changes, describe the triggered risk categories, evidence sources, and verification commands
@@ -0,0 +1,35 @@
1
+ # React performance patterns
2
+
3
+ This file keeps lightweight React project-standard performance guidance. Use the frontend performance workflow when the task needs metrics, traces, profiles, bundle analysis, network evidence, or a formal performance report.
4
+
5
+ ### Performance (in conjunction with the "Performance Optimization" section)
6
+
7
+ - **useMemo**: Expensive derivation, large list sorting/filtering; pay attention to immutable data, such as `useMemo(() => [...list].sort(...), [list])`, and avoid directly `sort` the mutable original array.
8
+ - **useCallback**: passed to **`React.memo`** sub-component or used as a callback for other Hook dependencies, used when there is a stable reference requirement.
9
+ - **React.memo**: An acceptable component with pure display and shallow props; do not apply memo globally.
10
+ - **Virtual List**: For very long lists, use **TanStack Virtual**, **react-window**, etc., and only render nodes in the viewport (see "Suspense and Lazy Loading" for routing-level and component-level lazy loading).
11
+
12
+ ## Performance optimization
13
+
14
+ Consider performance optimization in the following scenarios:
15
+
16
+ - Large list/large table
17
+ - High frequency re-rendering components
18
+ - Complex trees passed with a large number of props
19
+ - Heavy-duty third-party components
20
+ - High frequency changing context
21
+
22
+ ### Recommended means
23
+
24
+ - Use `React.memo` appropriately
25
+ - Use `useMemo` / `useCallback` only when necessary
26
+ - List uses stable `key`
27
+ - Use virtual scrolling for large lists
28
+ - Code splitting at routing level
29
+ - Avoid putting high-frequency changing values into the top-level context
30
+ - Avoid meaninglessly creating a large number of new objects/new functions/new arrays in render
31
+ - Heavy charting, editor, map, 3D and media processing capabilities into leaf components or route-level lazy loading boundaries
32
+ - Lazy loading components must be equipped with loading, error, empty or downgraded UI to avoid only optimizing the package body but destroying the user state
33
+
34
+ ---
35
+