@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,66 +1,73 @@
1
1
  ---
2
2
  name: fec-motion-interaction
3
- description: Use when designing, implementing, or reviewing frontend interaction motion, page transitions, scroll animation, Framer Motion, GSAP, Lottie, CSS animation, motion intensity, animation performance, reduced-motion behavior, or cinematic but accessible UI motion. Do not use for SVG-only path drawing, Canvas/WebGL rendering, or ordinary hover states; Chinese triggers include 动效设计, 交互动效, 页面转场, 滚动动画, Framer Motion, GSAP.
3
+ description: Use when designing, implementing, or reviewing frontend interaction motion, page transitions, scroll animation, Framer Motion, GSAP, Lottie, CSS animation, motion intensity, animation performance, reduced-motion behavior, or cinematic but accessible UI motion. Do not use for SVG-only path drawing, Canvas/WebGL rendering, or ordinary hover states; Chinese triggers include motion design, interactive effects, page transitions, scroll animation, Framer Motion, GSAP.
4
4
  ---
5
5
 
6
- # 交互动效
6
+ # Interactive effects
7
7
 
8
- 适用于需要把页面转场、滚动叙事、组件入场、微交互和反馈节奏设计成可维护、可降级、可验证的前端动效任务。需要具体实现模式时加载 [motion-patterns.md](references/motion-patterns.md)。
8
+ It is suitable for front-end animation tasks that need to design page transitions, scrolling narratives, component introductions, micro-interactions and feedback rhythms into maintainable, degradable and verifiable forms. Load [motion-patterns.md](references/motion-patterns.md) when a specific implementation pattern is required.
9
9
 
10
10
  ## Purpose
11
11
 
12
- 为前端界面选择合适动效工具、强度和质量门禁。
12
+ Choose the right animation tools, intensity, and quality gates for your front-end interface.
13
13
 
14
14
  ## Procedure
15
15
 
16
- 1. 判断动效职责
17
- - 先写清动效服务的用户意图:定位、反馈、层级变化、状态确认、叙事引导或品牌记忆。
18
- - 工具型界面默认克制,优先保障扫描效率;营销页和作品页可增加节奏,但不能遮挡主要信息。
19
- - 若动效只装饰而不改善理解、反馈或品牌识别,应删掉或改成静态视觉处理。
20
- - loading、skeleton、toast、错误提示和成功反馈属于状态沟通;动效只能增强反馈节奏,不能替代文本、语义或可见状态。
16
+ 1. Determine animation responsibilities
17
+ - First write down the user intention of the dynamic effect service: positioning, feedback, level changes, status confirmation, narrative guidance or brand memory.
18
+ - The tool-based interface is restrained by default, and priority is given to ensuring scanning efficiency; the marketing page and work page can increase the rhythm, but cannot block the main information.
19
+ - If animation is merely decorative and does not improve understanding, feedback or brand recognition, it should be deleted or replaced with a static visual treatment.
20
+ - Loading, skeleton, toast, error prompts and success feedback belong to status communication; animations can only enhance the feedback rhythm and cannot replace text, semantics or visible status.
21
21
 
22
- 2. 选择技术路线
23
- - CSS transition/keyframes:hover、focus、toast、简单入场和小型状态反馈。
24
- - Framer Motion:React 状态驱动、布局过渡、列表编排和可中断的组件级动画。
25
- - GSAP:时间轴、滚动触发、复杂序列和跨元素精确编排。
26
- - Lottie:设计工具输出的图标或空状态动画,按需懒加载。
27
- - CSS scroll-driven animation:可接受渐进增强且无需旧浏览器一致性时使用。
22
+ 2. Choose a technical route
23
+ - CSS transitions/keyframes: hover, focus, toast, simple entry and small status feedback.
24
+ - Framer Motion: React state-driven, layout transitions, list orchestration, and interruptible component-level animations.
25
+ - GSAP: timelines, scroll triggers, complex sequences and precise orchestration across elements.
26
+ - Lottie: The icon or empty state animation output by the design tool is lazy loaded on demand.
27
+ - CSS scroll-driven animation: Use when progressive enhancement is acceptable and legacy browser consistency is not required.
28
28
 
29
- 3. 定义强度等级
30
- - Level 1-2:只用 150-250ms opacity/transform,适合后台、表单和高频工具。
31
- - Level 3-4:加入短 stagger、局部 spring 和轻量 reveal,适合仪表盘、设置页和管理台。
32
- - Level 5-6:加入视差、布局 morph、指针响应,适合产品展示和交互式首页。
33
- - Level 7+:使用滚动叙事、固定段落或 3D/WebGL 配合,必须单独做移动端和 reduced-motion 降级。
29
+ 3. Define intensity levels
30
+ - Level 1-2: Only uses 150-250ms opacity/transform, suitable for background, forms and high-frequency tools.
31
+ - Level 3-4: Add short stagger, partial spring and lightweight reveal, suitable for dashboards, settings pages and management consoles.
32
+ - Level 5-6: Add parallax, layout morph, and pointer response, suitable for product display and interactive homepage.
33
+ - Level 7+: To use scrolling narrative, fixed paragraphs or 3D/WebGL cooperation, the mobile version and reduced-motion downgrade must be done separately.
34
+ - Scenario default values: public services, medical, financial and highly accessible products start from Level 1-2; SaaS tools and data backends start from Level 2-3; marketing pages, brand pages and portfolios can start from Level 4-6; only experimental activity pages or immersive narratives can consider Level 7+.
35
+ - If the UI design process already has a motion intensity dial set up, use that dial; don’t automatically increase the intensity just because a certain motion library is introduced.
34
36
 
35
- 4. 建立性能边界
36
- - 只高频动画 `transform`、`opacity`,谨慎使用 `filter` 和 `clip-path`。
37
- - GSAP、Lottie、Three.js、重型动画组件必须动态导入或隔离在叶子组件。
38
- - 持续动画需要暂停条件:不可见、标签页隐藏、用户关闭、低电量或 reduced motion。
39
- - 不在滚动事件中同步读写布局;使用 IntersectionObserver、ScrollTimeline 或节流后的 rAF。
37
+ 4. Establish performance boundaries
38
+ - Only high-frequency animations `transform`, `opacity`, use `filter` and `clip-path` with caution.
39
+ - GSAP, Lottie, Three.js, heavy animation components must be dynamically imported or isolated in leaf components.
40
+ - Sustained animations require pause conditions: invisible, tab hidden, user closed, low battery, or reduced motion.
41
+ - Do not read and write layout synchronously on scroll events; use IntersectionObserver, ScrollTimeline, or throttled rAF.
42
+ - Scroll narrative, stagger, spring, magnetic pointer and parallax effects must have clear responsibilities respectively; do not stack multiple high-intensity motion languages on the same screen at the same time.
43
+ - The rhythm of repeated reveal animations on long pages must be controlled to avoid each block entering with the same delay, direction, and easing, causing a template feel and scrolling fatigue.
40
44
 
41
- 5. 设计可访问降级
42
- - 所有非必要动效读取 `prefers-reduced-motion`,降级为静态、淡入或即时状态。
43
- - 自动播放或循环动效若超过 5 秒,应提供暂停方式或只在局部非关键区域运行。
44
- - 不闪烁超过每秒 3 次;不要用动效作为唯一状态提示。
45
- - focus ring、错误提示、成功反馈必须在无动效时同样清楚。
46
- - 手势动画必须有点击、键盘或明确控件替代;拖拽、滑动和长按不能成为唯一操作路径。
45
+ 5. Design for accessible degradation
46
+ - All non-essential motion effects read `prefers-reduced-motion` and downgrade to static, fade-in or instant state.
47
+ - If the automatic playback or looping animation exceeds 5 seconds, a pause method should be provided or it should only run in local non-critical areas.
48
+ - Do not flash more than 3 times per second; do not use animation as the only status reminder.
49
+ - The focus ring, error prompt, and success feedback must be equally clear when there is no animation.
50
+ - Gesture animations must be replaced by clicks, keyboards, or explicit controls; dragging, sliding, and long-pressing cannot be the only operation paths.
47
51
 
48
- 6. 验证交付
49
- - 在 375px、768px、1440px 检查动效是否遮挡文案、按钮或表格内容。
50
- - 检查首次加载 bundle 是否因动效库显著膨胀。
51
- - 手动开启 reduced motion,确认动画被禁用或弱化。
52
- - 用性能面板或实际设备确认滚动和关键交互没有明显掉帧。
52
+ 6. Verify delivery
53
+ - Check whether the animation blocks the copy, button or table content at 375px, 768px, and 1440px.
54
+ - Check whether the first loaded bundle is significantly bloated by the animation library.
55
+ - Turn on reduced motion manually and confirm that the animation is disabled or weakened.
56
+ - Confirm scrolling and key interactions without noticeable frame drops using the performance panel or actual device.
57
+ - Check that the animation intensity matches the page type: the workbench should not have a marketing-style scrolling theater, and the portfolio should not only have a default hover fade-in.
58
+ - Verify that scroll trigger sequences allow users to reach content quickly without losing context due to pinned blocks, long timelines, or uninterruptible transitions.
53
59
 
54
60
  ## Constraints
55
61
 
56
- - 不在同一个组件内混用 Framer Motion 和 GSAP 控制同一元素。
57
- - 不用动效掩盖 loading、empty、error、disabled 等状态缺失。
58
- - 不为普通后台表格、配置页和高频工作台默认加入大幅视差或滚动劫持。
59
- - 不动画 `width`、`height`、`top`、`left`、`margin`、`padding` 等会频繁触发布局的属性。
60
- - 不把大型 Lottie JSON、GSAP 插件或 3D 场景放入首屏同步包。
61
- - 不让动画改变阅读顺序、焦点顺序或键盘可达性。
62
- - 不用 skeleton 长时间占位掩盖真实加载失败;超过预期时应转入可理解的 loading、retry 或 error 状态。
62
+ - Do not mix Framer Motion and GSAP controls for the same element within the same component.
63
+ - Don’t use animations to cover up missing statuses such as loading, empty, error, disabled, etc.
64
+ - Do not add large parallax or scroll hijacking by default for ordinary background tables, configuration pages and high-frequency workbench.
65
+ - Do not use the same reveal template for all blocks; the rhythm of the animation should vary with the information level and user tasks.
66
+ - Do not animate `width`, `height`, `top`, `left`, `margin`, `padding` and other properties that frequently trigger layout.
67
+ - Do not put large Lottie JSON, GSAP plug-ins or 3D scenes into the above-the-fold sync package.
68
+ - Don't let animations change reading order, focus order, or keyboard accessibility.
69
+ - Do not use skeleton for a long time to cover up the actual loading failure; when it exceeds expectations, it should be transferred to an understandable loading, retry or error state.
63
70
 
64
71
  ## Expected Output
65
72
 
66
- 输出应包含动效目的、技术选型、强度等级、降级策略、性能边界和验证结果。完成后交互动效应帮助用户理解状态和层级,在 reduced-motion 与低端设备上仍可用,并且不显著拖慢首屏或滚动体验。
73
+ The output should include animation purpose, technology selection, intensity level, degradation strategy, performance boundaries and verification results. Post-completion interactions help users understand state and hierarchy, remain available on reduced-motion and low-end devices, and do not significantly slow down the above-the-fold or scrolling experience.
@@ -1,6 +1,6 @@
1
- # 交互动效实现模式
1
+ #Interactive effect implementation mode
2
2
 
3
- ## CSS 微交互
3
+ ## CSS Microinteractions
4
4
 
5
5
  ```css
6
6
  .action {
@@ -30,7 +30,7 @@
30
30
  }
31
31
  ```
32
32
 
33
- ## Framer Motion 组件入场
33
+ ## Framer Motion component entry
34
34
 
35
35
  ```tsx
36
36
  import { motion, useReducedMotion } from "framer-motion";
@@ -50,7 +50,7 @@ export function MotionPanel({ children }: { children: React.ReactNode }) {
50
50
  }
51
51
  ```
52
52
 
53
- ## GSAP 时间轴清理
53
+ ## GSAP Timeline Cleanup
54
54
 
55
55
  ```tsx
56
56
  import { useLayoutEffect, useRef } from "react";
@@ -87,7 +87,7 @@ export function RevealTimeline() {
87
87
  }
88
88
  ```
89
89
 
90
- ## 重型动效懒加载
90
+ ## Heavy animation lazy loading
91
91
 
92
92
  ```tsx
93
93
  import { lazy, Suspense } from "react";
@@ -103,10 +103,10 @@ export function ShowcaseSlot() {
103
103
  }
104
104
  ```
105
105
 
106
- ## 审查清单
106
+ ## Review Checklist
107
107
 
108
- - 动画目标能用一句话说明,且服务信息层级或状态反馈。
109
- - 高吞吐界面不使用滚动劫持或长时间入场遮挡。
110
- - reduced-motion 下信息仍完整,焦点与阅读顺序不变化。
111
- - 动画库按需加载,持续动画可暂停或卸载清理。
112
- - 关键设备上检查掉帧、文字遮挡和首屏 bundle 变化。
108
+ - Animation goals can be described in one sentence and serve information level or status feedback.
109
+ - High throughput interface does not use scroll hijacking or long entry occlusion.
110
+ - The information is still complete under reduced-motion, and the focus and reading order do not change.
111
+ - The animation library is loaded on demand, and continuous animation can be paused or uninstalled for cleaning.
112
+ - Check for frame drops, text occlusion and above-the-fold bundle changes on key devices.
@@ -3,43 +3,44 @@ name: fec-nextjs-project-standard
3
3
  description: Use when creating or reviewing Next.js 14+ App Router projects, file routes, layouts, server/client component boundaries, SSR/SSG/ISR, streaming, metadata, middleware, server actions, or Next-specific data fetching. For generic client React component architecture, apply the project's React conventions separately; Chinese triggers include Next.js, App Router.
4
4
  ---
5
5
 
6
- # Next.js 项目规范
6
+ # Next.js project specifications
7
7
 
8
- 适用于使用 Next.js 14+ 与 App Router 的仓库。
8
+ For repositories using Next.js 14+ with App Router.
9
9
 
10
10
  ## Purpose
11
11
 
12
- 规范 Next.js 14+ 项目中 App Router、SSR/SSG/ISR 渲染模式、数据获取、路由布局、中间件和 SEO 元数据的工程实践,确保服务端优先、性能优化和可维护性。
12
+ Standardize engineering practices for App Router, SSR/SSG/ISR rendering modes, data acquisition, route layout, middleware and SEO metadata in Next.js 14+ projects to ensure server-side priority, performance optimization and maintainability.
13
13
 
14
14
  ## Procedure
15
15
 
16
- 1. 先识别目标属于 App Router、布局、服务端数据、middleware、metadata 还是客户端交互。
17
- 2. 默认服务端组件优先;只有需要浏览器 API、交互状态或事件处理时才使用 `'use client'`。
18
- 3. 明确 SSR / SSG / ISR / CSR 渲染模式和 Next fetch/cache 策略。
19
- 4. 为路由补齐 `loading.tsx`、`error.tsx`、`not-found.tsx`、metadata 和敏感逻辑的服务端边界。
20
- 5. 引入第三方库前检查是否支持 Server Component;浏览器专属、动效、图表、编辑器和 WebGL 库必须放进客户端叶子组件并按需加载。
21
- 6. 客户端组件架构问题分流到 React 项目 workflow。
16
+ 1. First identify whether the target belongs to App Router, layout, server data, middleware, metadata or client interaction.
17
+ 2. Default server-side components take precedence; use `'use client'` only when browser API, interactive state or event handling is required.
18
+ 3. Clarify SSR / SSG / ISR / CSR rendering mode and Next fetch/cache strategy.
19
+ 4. Complete the server-side boundaries of `loading.tsx`, `error.tsx`, `not-found.tsx`, metadata and sensitive logic for routing.
20
+ 5. Check whether Server Component is supported before introducing third-party libraries; browser-specific, animation, chart, editor and WebGL libraries must be placed into client leaf components and loaded on demand.
21
+ 6. Prioritize evidence review for dynamic rendering, cache invalidation, RSC serialization, route handler, middleware, and first-screen bundles; first collect build, trace, headers, or routing behavior evidence when unsure.
22
+ 7. Client component architecture issues are offloaded to the React project workflow.
22
23
 
23
- ## 项目结构
24
+ ## Project structure
24
25
 
25
26
  ```
26
27
  src/
27
28
  ├── app/ # App Router
28
- │ ├── layout.tsx # 根布局
29
- │ ├── page.tsx # 首页
30
- │ ├── loading.tsx # 全局 loading UI
31
- │ ├── error.tsx # 全局错误边界
29
+ │ ├── layout.tsx # Root layout
30
+ │ ├── page.tsx # Home page
31
+ │ ├── loading.tsx # Global loading UI
32
+ │ ├── error.tsx # Global error boundary
32
33
  │ ├── not-found.tsx # 404
33
34
  │ ├── globals.css
34
35
  │ │
35
- │ ├── (auth)/ # 路由组
36
+ │ ├── (auth)/ # Routing group
36
37
  │ │ ├── login/
37
38
  │ │ │ └── page.tsx
38
39
  │ │ └── register/
39
40
  │ │ └── page.tsx
40
41
  │ │
41
- │ ├── (dashboard)/ # 仪表盘路由组
42
- │ │ ├── layout.tsx # 共享布局
42
+ │ ├── (dashboard)/ # Dashboard routing group
43
+ │ │ ├── layout.tsx # Shared layout
43
44
  │ │ ├── dashboard/
44
45
  │ │ │ └── page.tsx
45
46
  │ │ └── users/
@@ -51,67 +52,72 @@ src/
51
52
  │ └── users/
52
53
  │ └── route.ts
53
54
  │
54
- ├── components/ # 共享组件
55
- ├── lib/ # 工具、配置
55
+ ├── components/ # Shared components
56
+ ├── lib/ # Tools, configuration
56
57
  ├── hooks/
57
58
  ├── services/
58
59
  └── types/
59
60
  ```
60
61
 
61
- ## 渲染模式
62
+ ## Rendering mode
62
63
 
63
- | 模式 | 使用场景 | 实现方式 |
64
+ | Patterns | Usage scenarios | Implementation methods |
64
65
  | ------- | ---------------- | ----------------------------------------------- |
65
- | **SSR** | 动态、需实时数据 | 默认,`fetch` 不缓存或 `cache: 'no-store'` |
66
- | **SSG** | 静态内容 | `generateStaticParams` + 静态 `fetch` |
67
- | **ISR** | 定期更新 | `revalidate` 或 `revalidatePath` |
68
- | **CSR** | 客户端交互 | `'use client'` + `useEffect` 或 SWR/React Query |
66
+ | **SSR** | Dynamic, real-time data required | Default, `fetch` does not cache or `cache: 'no-store'` |
67
+ | **SSG** | Static content | `generateStaticParams` + static `fetch` |
68
+ | **ISR** | Periodically updated | `revalidate` or `revalidatePath` |
69
+ | **CSR** | Client interaction | `'use client'` + `useEffect` or SWR/React Query |
69
70
 
70
- ## 数据获取
71
+ ## Data acquisition
71
72
 
72
- - 服务端组件:直接 `async` 或 `fetch`,不暴露 `useEffect`
73
- - 客户端组件:`useEffect` + `useState`,或 SWR / React Query
74
- - 优先在服务端获取数据,减少客户端水合
75
- - 使用 `loading.tsx` 和 Suspense 包裹异步区块,提供流式体验
73
+ - Server component: directly `async` or `fetch`, without exposing `useEffect`
74
+ - Client component: `useEffect` + `useState`, or SWR / React Query
75
+ - Prioritize data acquisition on the server side to reduce hydration on the client side
76
+ - Use `loading.tsx` and Suspense to wrap asynchronous blocks to provide streaming experience
77
+ - The cache policy must include `force-cache`, `no-store`, `revalidate`, tag/path revalidation or user private data constraints
78
+ - Any read that will change the route from static to dynamic (cookies, headers, searchParams, uncached fetch) must explain the reason and verification method
76
79
 
77
- ## 路由与布局
80
+ ## Routing and layout
78
81
 
79
- - 路由组 `(auth)` 不改变 URL,只影响布局
80
- - 动态路由 `[id]` 配合 `generateStaticParams` 做 SSG
81
- - `layout.tsx` 包裹子路由,共享 UI 与布局
82
- - `page.tsx` 为叶子路由,不可嵌套
82
+ - Routing group `(auth)` does not change the URL, only affects the layout
83
+ - Dynamic routing `[id]` cooperates with `generateStaticParams` to do SSG
84
+ - `layout.tsx` wraps sub-routes to share UI and layout
85
+ - `page.tsx` is a leaf route and cannot be nested
83
86
 
84
- ## 中间件
87
+ ## Middleware
85
88
 
86
- - 放在 `middleware.ts` 根目录
87
- - 用于鉴权、重定向、rewrite、Header 修改
88
- - 尽量短小,避免阻塞请求
89
+ - Place it in the root directory of `middleware.ts`
90
+ - Used for authentication, redirection, rewrite, and Header modification
91
+ - Keep it as short as possible to avoid blocking requests
89
92
 
90
- ## 元数据与 SEO
93
+ ## Metadata and SEO
91
94
 
92
- - 使用 `metadata` 或 `generateMetadata` 导出
93
- - 支持 `title`、`description`、`openGraph`、`twitter` 等
94
- - 动态路由用 `generateMetadata(params)` 生成
95
+ - Export using `metadata` or `generateMetadata`
96
+ - Supports `title`, `description`, `openGraph`, `twitter`, etc.
97
+ - Dynamic routes are generated using `generateMetadata(params)`
95
98
 
96
99
  ## Constraints
97
100
 
98
- - 服务端组件默认,仅在需要客户端交互时加 `'use client'`
99
- - 不在服务端组件中直接使用 `useState`、`useEffect`、浏览器 API
100
- - 敏感逻辑(如鉴权)放在服务端或 API Route,不暴露在客户端
101
- - 图片使用 `next/image`,字体使用 `next/font`
102
- - 不把密钥、内部 API 地址或服务端 token 放入 `NEXT_PUBLIC_` 环境变量。
103
- - 不让大型动效库、3D 场景、富文本编辑器或地图 SDK 进入根布局同步 bundle。
104
- - 首屏媒体必须有确定尺寸、真实资源和合理 priority;不要用远程占位图撑布局。
101
+ - Server component defaults, add `'use client'` only when client interaction is required.
102
+ - Do not use `useState`, `useEffect`, and browser API directly in server components
103
+ - Sensitive logic (such as authentication) is placed on the server or API Route and is not exposed to the client
104
+ - Use `next/image` for images and `next/font` for fonts
105
+ - Do not put keys, internal API addresses or server tokens in the `NEXT_PUBLIC_` environment variable.
106
+ - Don't let large animation libraries, 3D scenes, rich text editors or map SDKs go into the root layout sync bundle.
107
+ - The first screen media must have a certain size, real resources and reasonable priority; do not use remote placeholder images to support the layout.
108
+ - Don't assert that a route is "cached" or "must be dynamic" without evidence of metrics, response headers, build output, or route behavior.
109
+ - Middleware only handles lightweight decision-making at the routing level and does not carry heavy authentication queries, log batch processing, or business logic that can be placed in the route handler.
105
110
 
106
- ## 与客户端 UI 模式的分工
111
+ ## Division of labor with client UI mode
107
112
 
108
- - **服务端**:渲染模式、数据获取与缓存、`loading.tsx` / `error.tsx`、路由与布局等以本 skill 为准。
109
- - **`'use client'` 组件**:组合与复合组件、表单、客户端状态、列表虚拟化、动效与键盘/焦点等,与纯 React 项目一致,遵循项目中的 React 规则(如 `.claude/rules/fec-react.md`)。
110
- - **权限与客户端数据**:鉴权、RBAC、redirect、客户端 server state 和缓存失效应按对应专项 workflow 处理;Next 服务端 fetch/cache 仍以本 skill 为准。
113
+ - **Server**: Rendering mode, data acquisition and caching, `loading.tsx` / `error.tsx`, routing and layout, etc. are subject to this skill.
114
+ - **`'use client'` component**: combined and composite components, forms, client state, list virtualization, animation and keyboard/focus, etc., consistent with pure React projects, following the React rules in the project (such as `.claude/rules/fec-react.md`).
115
+ - **Permissions and client data**: Authentication, RBAC, redirect, client server state, and cache failure should be handled according to the corresponding special workflow; Next server fetch/cache is still subject to this skill.
111
116
 
112
117
  ## Expected Output
113
118
 
114
- - 页面组件按 App Router 约定组织(`app/` 目录、`page.tsx`、`layout.tsx`、`loading.tsx`、`error.tsx`)
115
- - 渲染模式选择正确(SSR/SSG/ISR/CSR),数据获取路径清晰
116
- - 元数据和 SEO 配置完整(title、description、openGraph)
117
- - 敏感逻辑在服务端,客户端组件仅处理交互
119
+ - Page components are organized according to App Router conventions (`app/` directory, `page.tsx`, `layout.tsx`, `loading.tsx`, `error.tsx`)
120
+ - The rendering mode is selected correctly (SSR/SSG/ISR/CSR) and the data acquisition path is clear
121
+ - Complete metadata and SEO configuration (title, description, openGraph)
122
+ - Sensitive logic is on the server side, client components only handle interactions
123
+ - There is reviewable evidence for caching, dynamic rendering and above-the-fold bundle decisions, and performance risks can be offloaded to dedicated performance workflows
@@ -3,29 +3,29 @@ name: fec-nuxt-project-standard
3
3
  description: Use when creating or reviewing Nuxt 3 projects, file routes, pages, layouts, SSR/SSG/SPA behavior, Nuxt data fetching, route middleware, plugins, modules, server routes, or Nuxt-specific Vue 3 conventions. For generic Vue component architecture, apply the project's Vue conventions separately; Chinese triggers include Nuxt, Nuxt 3.
4
4
  ---
5
5
 
6
- # Nuxt 3 项目规范
6
+ # Nuxt 3 Project Specifications
7
7
 
8
- 适用于使用 Nuxt 3 + Vue 3 + TypeScript 的仓库。
8
+ For repositories using Nuxt 3 + Vue 3 + TypeScript.
9
9
 
10
10
  ## Purpose
11
11
 
12
- 规范 Nuxt 3 项目中 SSR/SSG 渲染模式、组合式 API、自动导入、数据获取、路由中间件和模块插件的工程实践,确保约定式开发和类型安全。
12
+ Standardize the engineering practices of SSR/SSG rendering mode, combined API, automatic import, data acquisition, routing middleware and module plug-ins in the Nuxt 3 project to ensure conventional development and type safety.
13
13
 
14
14
  ## Procedure
15
15
 
16
- 1. 先识别目标属于 Nuxt pages/layouts、渲染模式、数据获取、route middleware、plugin/module 还是 server route。
17
- 2. 明确 SSR / SSG / SPA 选择,避免服务端可执行代码依赖 `window` 或 `document`。
18
- 3. 数据获取优先使用 Nuxt 的 `useFetch` / `useAsyncData`,并检查水合一致性。
19
- 4. 路由鉴权、redirect 和权限问题与路由保护 workflow 对齐。
20
- 5. 通用 Vue 组件架构问题分流到 Vue 项目 workflow。
16
+ 1. First identify whether the target belongs to Nuxt pages/layouts, rendering mode, data acquisition, route middleware, plugin/module or server route.
17
+ 2. Clarify SSR / SSG / SPA selection to avoid server-side executable code relying on `window` or `document`.
18
+ 3. For data acquisition, Nuxt’s `useFetch` / `useAsyncData` is used first, and the hydration consistency is checked.
19
+ 4. Route authentication, redirection and permission issues are aligned with the route protection workflow.
20
+ 5. Common Vue component architecture issues are offloaded to the Vue project workflow.
21
21
 
22
- ## 项目结构
22
+ ## Project structure
23
23
 
24
24
  ```
25
- ├── app.vue # 根组件
26
- ├── nuxt.config.ts # Nuxt 配置
25
+ ├── app.vue # Root component
26
+ ├── nuxt.config.ts # Nuxt configuration
27
27
  │
28
- ├── pages/ # 基于文件的路由
28
+ ├── pages/ # File-based routing
29
29
  │ ├── index.vue # /
30
30
  │ ├── login.vue # /login
31
31
  │ ├── dashboard/
@@ -33,90 +33,90 @@ description: Use when creating or reviewing Nuxt 3 projects, file routes, pages,
33
33
  │ │ └── users/
34
34
  │ │ ├── index.vue # /dashboard/users
35
35
  │ │ └── [id].vue # /dashboard/users/:id
36
- │ └── [...slug].vue # 捕获所有
36
+ │ └── [...slug].vue # Capture all
37
37
  │
38
- ├── layouts/ # 布局
38
+ ├── layouts/ # layout
39
39
  │ ├── default.vue
40
40
  │ └── auth.vue
41
41
  │
42
- ├── components/ # 自动导入组件
42
+ ├── components/ # Automatically import components
43
43
  │ ├── Button/
44
44
  │ │ └── Button.vue
45
45
  │ └── AppHeader.vue
46
46
  │
47
- ├── composables/ # 组合式函数(自动导入)
47
+ ├── composables/ # Combined functions (automatically imported)
48
48
  │ ├── useAuth.ts
49
49
  │ └── useFetch.ts
50
50
  │
51
- ├── server/ # 服务端 API
52
- │ ├── api/ # API 路由
51
+ ├── server/ # Server API
52
+ │ ├── api/ # API routing
53
53
  │ │ └── users/
54
54
  │ │ └── index.get.ts
55
- │ ├── middleware/ # 服务端中间件
56
- │ └── utils/ # 服务端工具
55
+ │ ├── middleware/ # Server-side middleware
56
+ │ └── utils/ # Server-side tools
57
57
  │
58
- ├── plugins/ # 插件
58
+ ├── plugins/ # Plug-in
59
59
  │ └── i18n.client.ts
60
60
  │
61
- ├── middleware/ # 路由中间件
61
+ ├── middleware/ # Routing middleware
62
62
  │ └── auth.ts
63
63
  │
64
- ├── public/ # 静态资源
65
- ├── assets/ # 需构建的资源
66
- └── types/ # 类型定义
64
+ ├── public/ # Static resources
65
+ ├── assets/ # Resources to be built
66
+ └── types/ # Type definition
67
67
  ```
68
68
 
69
- ## 渲染模式
69
+ ## Rendering mode
70
70
 
71
- | 模式 | 配置 | 说明 |
71
+ | Mode | Configuration | Description |
72
72
  | ------- | --------------- | -------------- |
73
- | **SSR** | 默认 | `ssr: true` |
74
- | **SSG** | `nuxt generate` | 预渲染所有页面 |
75
- | **SPA** | `ssr: false` | 纯客户端渲染 |
73
+ | **SSR** | Default | `ssr: true` |
74
+ | **SSG** | `nuxt generate` | Pre-render all pages |
75
+ | **SPA** | `ssr: false` | Pure client-side rendering |
76
76
 
77
77
  ```ts
78
78
  // nuxt.config.ts
79
79
  export default defineNuxtConfig({
80
- ssr: true, // 或 false
80
+ ssr: true, // or false
81
81
  });
82
82
  ```
83
83
 
84
- ## 数据获取
84
+ ## Data acquisition
85
85
 
86
- - `useFetch` / `useAsyncData`:服务端 + 客户端,自动去重
87
- - `$fetch`:直接请求,适合服务端或一次性调用
88
- - `useLazyAsyncData`:不阻塞导航,适合非首屏
89
- - 避免在 `setup` 顶层混用同步/异步逻辑导致水合不匹配
86
+ - `useFetch` / `useAsyncData`: server + client, automatic deduplication
87
+ - `$fetch`: direct request, suitable for server or one-time call
88
+ - `useLazyAsyncData`: does not block navigation, suitable for non-first screen
89
+ - Avoid mixing synchronous/asynchronous logic at the top level of `setup` causing hydration mismatch
90
90
 
91
- ## 路由与布局
91
+ ## Routing and layout
92
92
 
93
- - `pages/` 下文件自动生成路由
94
- - 动态路由:`[id].vue`、`[...slug].vue`
95
- - 布局:`layout` 选项或 `layouts/default.vue` 默认
96
- - 嵌套路由:`pages/parent/child.vue` 需配合 `NuxtPage`
93
+ - Automatically generate routes for files under `pages/`
94
+ - Dynamic routing: `[id].vue`, `[...slug].vue`
95
+ - Layout: `layout` option or `layouts/default.vue` default
96
+ - Nested routing: `pages/parent/child.vue` needs to be combined with `NuxtPage`
97
97
 
98
- ## 中间件
98
+ ## Middleware
99
99
 
100
- - `middleware/` 下文件自动注册
101
- - 页面级:`definePageMeta({ middleware: ['auth'] })`
102
- - 全局:`nuxt.config.ts` 的 `router.middleware`
103
- - 服务端中间件:`server/middleware/`
100
+ - Automatically register files under `middleware/`
101
+ - Page level: `definePageMeta({ middleware: ['auth'] })`
102
+ - Global: `router.middleware` of `nuxt.config.ts`
103
+ - Server-side middleware: `server/middleware/`
104
104
 
105
- ## 插件与模块
105
+ ## Plug-ins and modules
106
106
 
107
- - 插件:`plugins/*.ts`,支持 `.client`、`.server` 后缀
108
- - 模块:`modules/` 或 `node_modules`,在 `nuxt.config` 中 `modules: []`
107
+ - Plug-in: `plugins/*.ts`, supports `.client`, `.server` suffixes
108
+ - Modules: `modules/` or `node_modules`, in `nuxt.config` `modules: []`
109
109
 
110
110
  ## Constraints
111
111
 
112
- - 服务端可访问的代码不要依赖 `window`、`document`
113
- - 使用 `useState` 共享状态时注意 SSR 序列化
114
- - 图片使用 `NuxtImg`,链接使用 `NuxtLink`
115
- - 避免在 `setup` 顶层使用 `await` 导致阻塞,优先用 `useAsyncData` / `useFetch`
112
+ - Server-accessible code should not rely on `window` or `document`
113
+ - Be careful about SSR serialization when using `useState` to share state
114
+ - Use `NuxtImg` for images and `NuxtLink` for links
115
+ - Avoid using `await` at the top level of `setup` which will cause blocking. Use `useAsyncData` / `useFetch` first
116
116
 
117
117
  ## Expected Output
118
118
 
119
- - 页面按 `pages/` 约定式路由组织,动态路由正确配置
120
- - 渲染模式(SSR/SSG/SPA)选择正确,`nuxt.config.ts` 配置清晰
121
- - 数据获取使用 `useFetch` / `useAsyncData`,自动去重和水合
122
- - Composables 和组件自动导入正确,服务端/客户端边界清晰
119
+ - Pages are organized according to `pages/` conventional routing, and dynamic routing is correctly configured
120
+ - The rendering mode (SSR/SSG/SPA) is correctly selected and the `nuxt.config.ts` configuration is clear
121
+ - Data acquisition uses `useFetch` / `useAsyncData`, automatic deduplication and hydration
122
+ - Composables and components are automatically imported correctly, and the server/client boundary is clear