@bovinphang/frontend-craft 2.7.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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +34 -0
- package/CHANGELOG.zh-CN.md +34 -0
- package/README.md +1 -1
- package/README.openclaw.md +99 -43
- package/README.openclaw.zh-CN.md +99 -43
- package/README.zh-CN.md +1 -1
- package/agents/fec-architect.md +70 -70
- package/agents/fec-code-reviewer.md +82 -82
- package/agents/fec-debugger.md +20 -20
- package/agents/fec-design-token-mapper.md +36 -36
- package/agents/fec-doc-updater.md +13 -13
- package/agents/fec-e2e-runner.md +45 -45
- package/agents/fec-figma-implementer.md +59 -59
- package/agents/fec-performance-optimizer.md +128 -128
- package/agents/fec-refactor-cleaner.md +14 -14
- package/agents/fec-security-reviewer.md +66 -67
- package/agents/fec-test-planner.md +27 -27
- package/agents/fec-typescript-reviewer.md +87 -87
- package/agents/fec-ui-checker.md +74 -74
- package/commands/fec-debug.md +19 -19
- package/commands/fec-doc-sync.md +11 -11
- package/commands/fec-init.md +37 -38
- package/commands/fec-plan.md +58 -58
- package/commands/fec-refactor-clean.md +11 -11
- package/commands/fec-review.md +41 -41
- package/commands/fec-scaffold.md +41 -41
- package/commands/fec-tdd.md +13 -13
- package/dist/bin/frontend-craft.js +29 -27
- package/docs/example-prompts.md +3 -0
- package/docs/ja-JP/README.md +1 -1
- package/docs/ko-KR/README.md +1 -1
- package/docs/project-structure.md +13 -5
- package/docs/zh-CN/example-prompts.md +3 -0
- package/docs/zh-CN/project-structure.md +6 -1
- package/docs/zh-TW/README.md +1 -1
- package/localized/zh-CN/agents/fec-architect.md +125 -0
- package/localized/zh-CN/agents/fec-code-reviewer.md +152 -0
- package/localized/zh-CN/agents/fec-debugger.md +44 -0
- package/localized/zh-CN/agents/fec-design-token-mapper.md +75 -0
- package/localized/zh-CN/agents/fec-doc-updater.md +30 -0
- package/localized/zh-CN/agents/fec-e2e-runner.md +107 -0
- package/localized/zh-CN/agents/fec-figma-implementer.md +104 -0
- package/localized/zh-CN/agents/fec-performance-optimizer.md +293 -0
- package/localized/zh-CN/agents/fec-refactor-cleaner.md +32 -0
- package/localized/zh-CN/agents/fec-security-reviewer.md +116 -0
- package/localized/zh-CN/agents/fec-test-planner.md +50 -0
- package/localized/zh-CN/agents/fec-typescript-reviewer.md +142 -0
- package/localized/zh-CN/agents/fec-ui-checker.md +120 -0
- package/localized/zh-CN/commands/fec-debug.md +30 -0
- package/localized/zh-CN/commands/fec-doc-sync.md +19 -0
- package/localized/zh-CN/commands/fec-init.md +70 -0
- package/localized/zh-CN/commands/fec-plan.md +94 -0
- package/localized/zh-CN/commands/fec-refactor-clean.md +19 -0
- package/localized/zh-CN/commands/fec-review.md +66 -0
- package/localized/zh-CN/commands/fec-scaffold.md +205 -0
- package/localized/zh-CN/commands/fec-tdd.md +21 -0
- package/localized/zh-CN/skills/TEMPLATE.md +155 -0
- package/localized/zh-CN/skills/eval_queries.json +1013 -0
- package/localized/zh-CN/skills/fec-accessibility-check/SKILL.md +39 -0
- package/localized/zh-CN/skills/fec-accessibility-check/references/report-template.md +23 -0
- package/localized/zh-CN/skills/fec-accessibility-check/references/screen-reader-testing.md +33 -0
- package/localized/zh-CN/skills/fec-alchemy/SKILL.md +74 -0
- package/localized/zh-CN/skills/fec-alchemy/assets/absorption-plan-template.md +47 -0
- package/localized/zh-CN/skills/fec-alchemy/assets/intake-template.md +55 -0
- package/localized/zh-CN/skills/fec-alchemy/assets/review-checklist.md +31 -0
- package/localized/zh-CN/skills/fec-alchemy/references/methodology.md +94 -0
- package/localized/zh-CN/skills/fec-alchemy/references/originality-and-licensing.md +57 -0
- package/localized/zh-CN/skills/fec-api-integration/SKILL.md +78 -0
- package/localized/zh-CN/skills/fec-api-integration/references/integration-patterns.md +80 -0
- package/localized/zh-CN/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
- package/localized/zh-CN/skills/fec-browser-storage/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-browser-storage/references/storage-patterns.md +65 -0
- package/localized/zh-CN/skills/fec-canvas-threejs/SKILL.md +66 -0
- package/localized/zh-CN/skills/fec-canvas-threejs/references/rendering-patterns.md +67 -0
- package/localized/zh-CN/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +67 -0
- package/localized/zh-CN/skills/fec-code-review/SKILL.md +143 -0
- package/localized/zh-CN/skills/fec-code-review/references/report-template.md +29 -0
- package/localized/zh-CN/skills/fec-component-testing/SKILL.md +119 -0
- package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +62 -0
- package/localized/zh-CN/skills/fec-data-fetching/references/query-patterns.md +103 -0
- package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +157 -0
- package/localized/zh-CN/skills/fec-debug-framework/references/report-template.md +58 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +56 -0
- package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +39 -0
- package/localized/zh-CN/skills/fec-drawio-studio/SKILL.md +73 -0
- package/localized/zh-CN/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
- package/localized/zh-CN/skills/fec-drawio-studio/data/brand-icons.json +878 -0
- package/localized/zh-CN/skills/fec-drawio-studio/data/shape-index.json +83570 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/data-residency.md +27 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/schema.json +112 -0
- package/localized/zh-CN/skills/fec-e2e-testing/SKILL.md +42 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/playwright-patterns.md +95 -0
- package/localized/zh-CN/skills/fec-form-handling/SKILL.md +76 -0
- package/localized/zh-CN/skills/fec-form-handling/references/advanced-form-patterns.md +101 -0
- package/localized/zh-CN/skills/fec-image-generation/SKILL.md +80 -0
- package/localized/zh-CN/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
- package/localized/zh-CN/skills/fec-image-generation/references/artifact-routing.md +80 -0
- package/localized/zh-CN/skills/fec-image-generation/references/diagram-workflows.md +74 -0
- package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
- package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
- package/localized/zh-CN/skills/fec-implement-from-design/SKILL.md +129 -0
- package/localized/zh-CN/skills/fec-implement-from-design/references/design-plan-template.md +36 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/SKILL.md +46 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +41 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
- package/localized/zh-CN/skills/fec-legacy-web-standard/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-legacy-web-standard/references/legacy-patterns.md +85 -0
- package/localized/zh-CN/skills/fec-list-virtualization/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-list-virtualization/references/virtualization-patterns.md +80 -0
- package/localized/zh-CN/skills/fec-monorepo-project-standard/SKILL.md +142 -0
- package/localized/zh-CN/skills/fec-motion-interaction/SKILL.md +73 -0
- package/localized/zh-CN/skills/fec-motion-interaction/references/motion-patterns.md +112 -0
- package/localized/zh-CN/skills/fec-nextjs-project-standard/SKILL.md +123 -0
- package/localized/zh-CN/skills/fec-nuxt-project-standard/SKILL.md +122 -0
- package/localized/zh-CN/skills/fec-performance-optimization/SKILL.md +80 -0
- package/localized/zh-CN/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
- package/localized/zh-CN/skills/fec-performance-optimization/references/report-template.md +59 -0
- package/localized/zh-CN/skills/fec-pwa-implementation/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-pwa-implementation/references/manifest-and-icons.md +53 -0
- package/localized/zh-CN/skills/fec-pwa-implementation/references/service-worker-workbox.md +68 -0
- package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +91 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
- package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +51 -0
- package/localized/zh-CN/skills/fec-refactor-clean/references/report-template.md +42 -0
- package/localized/zh-CN/skills/fec-responsive-layout/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-responsive-layout/references/responsive-layout-patterns.md +70 -0
- package/localized/zh-CN/skills/fec-route-protection/SKILL.md +135 -0
- package/localized/zh-CN/skills/fec-security-review/SKILL.md +38 -0
- package/localized/zh-CN/skills/fec-security-review/references/report-template.md +27 -0
- package/localized/zh-CN/skills/fec-security-review/references/security-checklist.md +64 -0
- package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +87 -0
- package/localized/zh-CN/skills/fec-state-management/SKILL.md +140 -0
- package/localized/zh-CN/skills/fec-state-management/references/state-patterns.md +109 -0
- package/localized/zh-CN/skills/fec-storybook-component-doc/SKILL.md +37 -0
- package/localized/zh-CN/skills/fec-storybook-component-doc/references/story-patterns.md +118 -0
- package/localized/zh-CN/skills/fec-svg-animation/SKILL.md +148 -0
- package/localized/zh-CN/skills/fec-tailwind-design-system/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +59 -0
- package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +52 -0
- package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +45 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/SKILL.md +54 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
- package/localized/zh-CN/skills/fec-ui-design/SKILL.md +108 -0
- package/localized/zh-CN/skills/fec-ui-design/data/product-rules.json +231 -0
- package/localized/zh-CN/skills/fec-ui-design/data/stack-ui-rules.json +146 -0
- package/localized/zh-CN/skills/fec-ui-design/data/style-archetypes.json +373 -0
- package/localized/zh-CN/skills/fec-ui-design/data/ux-quality-rules.json +203 -0
- package/localized/zh-CN/skills/fec-ui-design/references/design-intelligence.md +97 -0
- package/localized/zh-CN/skills/fec-ui-design/references/master-page-overrides.md +30 -0
- package/localized/zh-CN/skills/fec-ui-design/references/pre-delivery-checklist.md +39 -0
- package/localized/zh-CN/skills/fec-ui-design/scripts/design-system.mjs +648 -0
- package/localized/zh-CN/skills/fec-validation-fix/SKILL.md +51 -0
- package/localized/zh-CN/skills/fec-validation-fix/references/report-template.md +43 -0
- package/localized/zh-CN/skills/fec-vite-project-standard/SKILL.md +83 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +58 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +162 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +176 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/SKILL.md +61 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/content-plan.md +38 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/theme-system.md +36 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
- package/localized/zh-CN/skills/fec-web-workers/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-web-workers/references/advanced-workers.md +54 -0
- package/localized/zh-CN/skills/fec-web-workers/references/basic-worker.md +67 -0
- package/localized/zh-CN/skills/metadata.json +1646 -0
- package/localized/zh-CN/skills/relations.json +755 -0
- package/localized/zh-CN/templates/claude/CLAUDE.md +106 -0
- package/localized/zh-CN/templates/claude/settings.json +62 -0
- package/localized/zh-CN/templates/codex/AGENTS.md +105 -0
- package/localized/zh-CN/templates/codex/config.toml +32 -0
- package/localized/zh-CN/templates/openclaw/AGENTS.md +101 -0
- package/localized/zh-CN/templates/openclaw/OPENCLAW-CONFIG.md +12 -0
- package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +54 -0
- package/localized/zh-CN/templates/shared/rules/fec-api-layer.md +99 -0
- package/localized/zh-CN/templates/shared/rules/fec-ci-cd.md +40 -0
- package/localized/zh-CN/templates/shared/rules/fec-code-comments.md +33 -0
- package/localized/zh-CN/templates/shared/rules/fec-design-system.md +72 -0
- package/localized/zh-CN/templates/shared/rules/fec-error-handling.md +56 -0
- package/localized/zh-CN/templates/shared/rules/fec-git-conventions.md +73 -0
- package/localized/zh-CN/templates/shared/rules/fec-i18n.md +64 -0
- package/localized/zh-CN/templates/shared/rules/fec-naming-conventions.md +120 -0
- package/localized/zh-CN/templates/shared/rules/fec-performance.md +101 -0
- package/localized/zh-CN/templates/shared/rules/fec-react.md +82 -0
- package/localized/zh-CN/templates/shared/rules/fec-refactoring.md +47 -0
- package/localized/zh-CN/templates/shared/rules/fec-rendering-patterns.md +40 -0
- package/localized/zh-CN/templates/shared/rules/fec-responsive-design.md +50 -0
- package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +31 -0
- package/localized/zh-CN/templates/shared/rules/fec-state-management.md +60 -0
- package/localized/zh-CN/templates/shared/rules/fec-testing.md +98 -0
- package/localized/zh-CN/templates/shared/rules/fec-typescript.md +112 -0
- package/localized/zh-CN/templates/shared/rules/fec-vue.md +64 -0
- package/localized/zh-CN/templates/shared/rules/fec-working-modes.md +50 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -2
- package/skills/TEMPLATE.md +74 -74
- package/skills/eval_queries.json +678 -678
- package/skills/fec-accessibility-check/SKILL.md +21 -21
- package/skills/fec-accessibility-check/references/report-template.md +12 -12
- package/skills/fec-accessibility-check/references/screen-reader-testing.md +24 -24
- package/skills/fec-alchemy/SKILL.md +50 -50
- package/skills/fec-alchemy/assets/absorption-plan-template.md +32 -32
- package/skills/fec-alchemy/assets/intake-template.md +55 -55
- package/skills/fec-alchemy/assets/review-checklist.md +23 -23
- package/skills/fec-alchemy/references/methodology.md +66 -66
- package/skills/fec-alchemy/references/originality-and-licensing.md +42 -42
- package/skills/fec-api-integration/SKILL.md +61 -61
- package/skills/fec-api-integration/references/integration-patterns.md +30 -30
- package/skills/fec-backend-requirements-handoff/SKILL.md +25 -25
- package/skills/fec-browser-storage/SKILL.md +16 -16
- package/skills/fec-browser-storage/references/storage-patterns.md +16 -16
- package/skills/fec-canvas-threejs/SKILL.md +21 -21
- package/skills/fec-canvas-threejs/references/rendering-patterns.md +10 -10
- package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +37 -37
- package/skills/fec-code-review/SKILL.md +94 -94
- package/skills/fec-code-review/references/report-template.md +13 -13
- package/skills/fec-component-testing/SKILL.md +39 -39
- package/skills/fec-data-fetching/SKILL.md +16 -16
- package/skills/fec-data-fetching/references/query-patterns.md +27 -27
- package/skills/fec-debug-framework/SKILL.md +95 -95
- package/skills/fec-debug-framework/references/report-template.md +34 -34
- package/skills/fec-dependency-upgrade/SKILL.md +17 -17
- package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +31 -31
- package/skills/fec-doc-sync/SKILL.md +23 -23
- package/skills/fec-drawio-studio/SKILL.md +42 -38
- package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +1 -1
- package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
- package/skills/fec-drawio-studio/references/diagram-patterns.md +19 -0
- package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
- package/skills/fec-drawio-studio/references/layout-and-export.md +18 -3
- package/skills/fec-drawio-studio/references/xml-and-mermaid.md +5 -1
- package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +62 -0
- package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
- package/skills/fec-drawio-studio/scripts/shape-query.mjs +55 -15
- package/skills/fec-e2e-testing/SKILL.md +24 -24
- package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +20 -20
- package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +10 -10
- package/skills/fec-e2e-testing/references/e2e-visual-regression.md +17 -17
- package/skills/fec-e2e-testing/references/playwright-patterns.md +6 -6
- package/skills/fec-form-handling/SKILL.md +21 -21
- package/skills/fec-form-handling/references/advanced-form-patterns.md +41 -41
- package/skills/fec-image-generation/SKILL.md +54 -29
- package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
- package/skills/fec-image-generation/references/diagram-workflows.md +33 -2
- package/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
- package/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
- package/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
- package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
- package/skills/fec-implement-from-design/SKILL.md +81 -81
- package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
- package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -29
- package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +81 -81
- package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +37 -37
- package/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +31 -31
- package/skills/fec-legacy-web-standard/SKILL.md +17 -17
- package/skills/fec-legacy-web-standard/references/legacy-patterns.md +16 -16
- package/skills/fec-list-virtualization/SKILL.md +16 -16
- package/skills/fec-list-virtualization/references/virtualization-patterns.md +31 -31
- package/skills/fec-monorepo-project-standard/SKILL.md +52 -52
- package/skills/fec-motion-interaction/SKILL.md +51 -51
- package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
- package/skills/fec-nextjs-project-standard/SKILL.md +64 -64
- package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
- package/skills/fec-performance-optimization/SKILL.md +54 -54
- package/skills/fec-performance-optimization/references/framework-performance-patterns.md +23 -23
- package/skills/fec-performance-optimization/references/report-template.md +31 -31
- package/skills/fec-pwa-implementation/SKILL.md +17 -17
- package/skills/fec-pwa-implementation/references/manifest-and-icons.md +12 -12
- package/skills/fec-pwa-implementation/references/service-worker-workbox.md +13 -13
- package/skills/fec-react-project-standard/SKILL.md +72 -72
- package/skills/fec-react-project-standard/references/react-performance-patterns.md +28 -28
- package/skills/fec-react-project-standard/references/react-project-structure.md +112 -112
- package/skills/fec-react-project-standard/references/react-quality-patterns.md +72 -72
- package/skills/fec-react-project-standard/references/react-runtime-patterns.md +94 -94
- package/skills/fec-refactor-clean/SKILL.md +30 -30
- package/skills/fec-refactor-clean/references/report-template.md +23 -23
- package/skills/fec-responsive-layout/SKILL.md +17 -17
- package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +37 -37
- package/skills/fec-route-protection/SKILL.md +26 -26
- package/skills/fec-security-review/SKILL.md +20 -20
- package/skills/fec-security-review/references/report-template.md +12 -12
- package/skills/fec-security-review/references/security-checklist.md +27 -27
- package/skills/fec-source-driven-development/SKILL.md +59 -59
- package/skills/fec-state-management/SKILL.md +34 -34
- package/skills/fec-state-management/references/state-patterns.md +19 -19
- package/skills/fec-storybook-component-doc/SKILL.md +19 -19
- package/skills/fec-storybook-component-doc/references/story-patterns.md +12 -12
- package/skills/fec-svg-animation/SKILL.md +32 -32
- package/skills/fec-tailwind-design-system/SKILL.md +17 -17
- package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +36 -36
- package/skills/fec-tdd-workflow/SKILL.md +28 -28
- package/skills/fec-testing-strategy/SKILL.md +29 -29
- package/skills/fec-typescript-project-standard/SKILL.md +38 -38
- package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +20 -20
- package/skills/fec-typescript-project-standard/references/type-safety.md +18 -18
- package/skills/fec-ui-design/SKILL.md +90 -90
- package/skills/fec-ui-design/references/design-intelligence.md +61 -61
- package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
- package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -38
- package/skills/fec-validation-fix/SKILL.md +26 -26
- package/skills/fec-validation-fix/references/report-template.md +25 -25
- package/skills/fec-vite-project-standard/SKILL.md +39 -39
- package/skills/fec-vue3-project-standard/SKILL.md +38 -38
- package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +36 -36
- package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +8 -8
- package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +112 -112
- package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +74 -74
- package/skills/fec-web-video-presentation/SKILL.md +33 -33
- package/skills/fec-web-workers/SKILL.md +16 -16
- package/skills/fec-web-workers/references/advanced-workers.md +13 -13
- package/skills/fec-web-workers/references/basic-worker.md +8 -8
- package/skills/metadata.json +121 -115
- package/skills/relations.json +4 -0
- package/templates/claude/CLAUDE.md +60 -60
- package/templates/codex/AGENTS.md +76 -76
- package/templates/codex/config.toml +4 -4
- package/templates/openclaw/AGENTS.md +68 -68
- package/templates/openclaw/OPENCLAW-CONFIG.md +8 -8
- package/templates/shared/rules/fec-agent-workflow.md +40 -40
- package/templates/shared/rules/fec-api-layer.md +52 -52
- package/templates/shared/rules/fec-ci-cd.md +29 -29
- package/templates/shared/rules/fec-code-comments.md +22 -22
- package/templates/shared/rules/fec-design-system.md +53 -53
- package/templates/shared/rules/fec-error-handling.md +40 -40
- package/templates/shared/rules/fec-git-conventions.md +42 -42
- package/templates/shared/rules/fec-i18n.md +48 -48
- package/templates/shared/rules/fec-naming-conventions.md +91 -91
- package/templates/shared/rules/fec-performance.md +78 -78
- package/templates/shared/rules/fec-react.md +58 -58
- package/templates/shared/rules/fec-refactoring.md +34 -34
- package/templates/shared/rules/fec-rendering-patterns.md +36 -36
- package/templates/shared/rules/fec-responsive-design.md +37 -37
- package/templates/shared/rules/fec-source-driven-development.md +22 -22
- package/templates/shared/rules/fec-state-management.md +56 -56
- package/templates/shared/rules/fec-testing.md +64 -64
- package/templates/shared/rules/fec-typescript.md +75 -75
- package/templates/shared/rules/fec-vue.md +42 -42
- package/templates/shared/rules/fec-working-modes.md +34 -34
- package/skills/fec-drawio-studio/data/shape-index.json.gz +0 -0
|
@@ -1,73 +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
|
|
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
|
-
|
|
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
|
-
-
|
|
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
|
|
24
|
-
- Framer Motion
|
|
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
|
|
31
|
-
- Level 3-4
|
|
32
|
-
- Level 5-6
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
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.
|
|
36
36
|
|
|
37
|
-
4.
|
|
38
|
-
-
|
|
39
|
-
- GSAP
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
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.
|
|
44
44
|
|
|
45
|
-
5.
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
- focus ring
|
|
50
|
-
-
|
|
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.
|
|
51
51
|
|
|
52
|
-
6.
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
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.
|
|
59
59
|
|
|
60
60
|
## Constraints
|
|
61
61
|
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
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.
|
|
70
70
|
|
|
71
71
|
## Expected Output
|
|
72
72
|
|
|
73
|
-
|
|
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
|
-
-
|
|
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,44 +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
|
-
|
|
8
|
+
For repositories using Next.js 14+ with App Router.
|
|
9
9
|
|
|
10
10
|
## Purpose
|
|
11
11
|
|
|
12
|
-
|
|
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.
|
|
17
|
-
2.
|
|
18
|
-
3.
|
|
19
|
-
4.
|
|
20
|
-
5.
|
|
21
|
-
6.
|
|
22
|
-
7.
|
|
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.
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Project structure
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
src/
|
|
28
28
|
├── app/ # App Router
|
|
29
|
-
│
|
|
30
|
-
│
|
|
31
|
-
│
|
|
32
|
-
│
|
|
29
|
+
│ ├── layout.tsx # Root layout
|
|
30
|
+
│ ├── page.tsx # Home page
|
|
31
|
+
│ ├── loading.tsx # Global loading UI
|
|
32
|
+
│ ├── error.tsx # Global error boundary
|
|
33
33
|
│ ├── not-found.tsx # 404
|
|
34
34
|
│ ├── globals.css
|
|
35
35
|
│ │
|
|
36
|
-
│
|
|
36
|
+
│ ├── (auth)/ # Routing group
|
|
37
37
|
│ │ ├── login/
|
|
38
38
|
│ │ │ └── page.tsx
|
|
39
39
|
│ │ └── register/
|
|
40
40
|
│ │ └── page.tsx
|
|
41
41
|
│ │
|
|
42
|
-
│
|
|
43
|
-
│
|
|
42
|
+
│ ├── (dashboard)/ # Dashboard routing group
|
|
43
|
+
│ │ ├── layout.tsx # Shared layout
|
|
44
44
|
│ │ ├── dashboard/
|
|
45
45
|
│ │ │ └── page.tsx
|
|
46
46
|
│ │ └── users/
|
|
@@ -52,72 +52,72 @@ src/
|
|
|
52
52
|
│ └── users/
|
|
53
53
|
│ └── route.ts
|
|
54
54
|
│
|
|
55
|
-
├── components/
|
|
56
|
-
├── lib/
|
|
55
|
+
├── components/ # Shared components
|
|
56
|
+
├── lib/ # Tools, configuration
|
|
57
57
|
├── hooks/
|
|
58
58
|
├── services/
|
|
59
59
|
└── types/
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
##
|
|
62
|
+
## Rendering mode
|
|
63
63
|
|
|
64
|
-
|
|
|
64
|
+
| Patterns | Usage scenarios | Implementation methods |
|
|
65
65
|
| ------- | ---------------- | ----------------------------------------------- |
|
|
66
|
-
| **SSR** |
|
|
67
|
-
| **SSG** |
|
|
68
|
-
| **ISR** |
|
|
69
|
-
| **CSR** |
|
|
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 |
|
|
70
70
|
|
|
71
|
-
##
|
|
71
|
+
## Data acquisition
|
|
72
72
|
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
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
|
|
79
79
|
|
|
80
|
-
##
|
|
80
|
+
## Routing and layout
|
|
81
81
|
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
- `layout.tsx`
|
|
85
|
-
- `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
|
|
86
86
|
|
|
87
|
-
##
|
|
87
|
+
## Middleware
|
|
88
88
|
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
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
|
|
92
92
|
|
|
93
|
-
##
|
|
93
|
+
## Metadata and SEO
|
|
94
94
|
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
95
|
+
- Export using `metadata` or `generateMetadata`
|
|
96
|
+
- Supports `title`, `description`, `openGraph`, `twitter`, etc.
|
|
97
|
+
- Dynamic routes are generated using `generateMetadata(params)`
|
|
98
98
|
|
|
99
99
|
## Constraints
|
|
100
100
|
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
- Middleware
|
|
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.
|
|
110
110
|
|
|
111
|
-
##
|
|
111
|
+
## Division of labor with client UI mode
|
|
112
112
|
|
|
113
|
-
-
|
|
114
|
-
- **`'use client'`
|
|
115
|
-
-
|
|
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.
|
|
116
116
|
|
|
117
117
|
## Expected Output
|
|
118
118
|
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
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
|
-
|
|
8
|
+
For repositories using Nuxt 3 + Vue 3 + TypeScript.
|
|
9
9
|
|
|
10
10
|
## Purpose
|
|
11
11
|
|
|
12
|
-
|
|
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.
|
|
17
|
-
2.
|
|
18
|
-
3.
|
|
19
|
-
4.
|
|
20
|
-
5.
|
|
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
|
|
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
|
-
│
|
|
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/
|
|
52
|
-
│
|
|
51
|
+
├── server/ # Server API
|
|
52
|
+
│ ├── api/ # API routing
|
|
53
53
|
│ │ └── users/
|
|
54
54
|
│ │ └── index.get.ts
|
|
55
|
-
│
|
|
56
|
-
│
|
|
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** |
|
|
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, //
|
|
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
|
-
-
|
|
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
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
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
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
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
|
-
-
|
|
108
|
-
-
|
|
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
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
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
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
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
|