@bovinphang/frontend-craft 2.5.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 (180) hide show
  1. package/.claude-plugin/marketplace.json +61 -0
  2. package/.claude-plugin/plugin.json +32 -0
  3. package/.mcp.json +44 -0
  4. package/CHANGELOG.md +229 -0
  5. package/CHANGELOG.zh-CN.md +228 -0
  6. package/CODE_OF_CONDUCT.md +34 -0
  7. package/CODE_OF_CONDUCT.zh-CN.md +34 -0
  8. package/CONTRIBUTING.md +356 -0
  9. package/CONTRIBUTING.zh-CN.md +356 -0
  10. package/LICENSE +21 -0
  11. package/README.md +467 -0
  12. package/README.openclaw.md +262 -0
  13. package/README.openclaw.zh-CN.md +262 -0
  14. package/README.zh-CN.md +467 -0
  15. package/SECURITY.md +44 -0
  16. package/SECURITY.zh-CN.md +44 -0
  17. package/agents/fec-architect.md +125 -0
  18. package/agents/fec-code-reviewer.md +152 -0
  19. package/agents/fec-debugger.md +44 -0
  20. package/agents/fec-design-token-mapper.md +75 -0
  21. package/agents/fec-doc-updater.md +30 -0
  22. package/agents/fec-e2e-runner.md +107 -0
  23. package/agents/fec-figma-implementer.md +104 -0
  24. package/agents/fec-performance-optimizer.md +293 -0
  25. package/agents/fec-refactor-cleaner.md +32 -0
  26. package/agents/fec-security-reviewer.md +116 -0
  27. package/agents/fec-test-planner.md +50 -0
  28. package/agents/fec-typescript-reviewer.md +142 -0
  29. package/agents/fec-ui-checker.md +120 -0
  30. package/commands/fec-debug.md +30 -0
  31. package/commands/fec-doc-sync.md +18 -0
  32. package/commands/fec-init.md +70 -0
  33. package/commands/fec-plan.md +94 -0
  34. package/commands/fec-refactor-clean.md +19 -0
  35. package/commands/fec-review.md +66 -0
  36. package/commands/fec-scaffold.md +205 -0
  37. package/commands/fec-tdd.md +21 -0
  38. package/dist/bin/frontend-craft.js +82 -0
  39. package/dist/hooks/fec-cleanup-claude-cache.js +4 -0
  40. package/dist/hooks/fec-format-changed-file.js +1 -0
  41. package/dist/hooks/fec-notify.js +1 -0
  42. package/dist/hooks/fec-run-tests.js +1 -0
  43. package/dist/hooks/fec-security-check.js +2 -0
  44. package/dist/hooks/fec-session-start.js +1 -0
  45. package/docs/example-prompts.md +124 -0
  46. package/docs/ja-JP/README.md +467 -0
  47. package/docs/ko-KR/README.md +467 -0
  48. package/docs/project-structure.md +119 -0
  49. package/docs/runtimes/antigravity.md +10 -0
  50. package/docs/runtimes/augment.md +10 -0
  51. package/docs/runtimes/claude.md +171 -0
  52. package/docs/runtimes/claude.zh-CN.md +169 -0
  53. package/docs/runtimes/cline.md +10 -0
  54. package/docs/runtimes/codebuddy.md +10 -0
  55. package/docs/runtimes/codex.md +10 -0
  56. package/docs/runtimes/copilot.md +10 -0
  57. package/docs/runtimes/cursor.md +10 -0
  58. package/docs/runtimes/gemini.md +10 -0
  59. package/docs/runtimes/kilo.md +10 -0
  60. package/docs/runtimes/openclaw.md +10 -0
  61. package/docs/runtimes/opencode.md +10 -0
  62. package/docs/runtimes/qoder.md +19 -0
  63. package/docs/runtimes/trae.md +10 -0
  64. package/docs/runtimes/windsurf.md +10 -0
  65. package/docs/superpowers/plans/2026-05-29-fec-debug.md +491 -0
  66. package/docs/superpowers/specs/2026-05-29-fec-debug-design.md +340 -0
  67. package/docs/zh-CN/example-prompts.md +124 -0
  68. package/docs/zh-CN/project-structure.md +119 -0
  69. package/docs/zh-TW/README.md +467 -0
  70. package/hooks/hooks.json +71 -0
  71. package/openclaw.plugin.json +26 -0
  72. package/package.json +101 -0
  73. package/skills/TEMPLATE.md +155 -0
  74. package/skills/eval_queries.json +890 -0
  75. package/skills/fec-accessibility-check/SKILL.md +39 -0
  76. package/skills/fec-accessibility-check/references/report-template.md +23 -0
  77. package/skills/fec-accessibility-check/references/screen-reader-testing.md +33 -0
  78. package/skills/fec-api-integration/SKILL.md +78 -0
  79. package/skills/fec-api-integration/references/integration-patterns.md +80 -0
  80. package/skills/fec-browser-storage/SKILL.md +34 -0
  81. package/skills/fec-browser-storage/references/storage-patterns.md +65 -0
  82. package/skills/fec-canvas-threejs/SKILL.md +66 -0
  83. package/skills/fec-canvas-threejs/references/rendering-patterns.md +67 -0
  84. package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +67 -0
  85. package/skills/fec-code-review/SKILL.md +135 -0
  86. package/skills/fec-code-review/references/report-template.md +29 -0
  87. package/skills/fec-component-testing/SKILL.md +119 -0
  88. package/skills/fec-data-fetching/SKILL.md +62 -0
  89. package/skills/fec-data-fetching/references/query-patterns.md +77 -0
  90. package/skills/fec-debug-framework/SKILL.md +162 -0
  91. package/skills/fec-dependency-upgrade/SKILL.md +34 -0
  92. package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +56 -0
  93. package/skills/fec-doc-sync/SKILL.md +37 -0
  94. package/skills/fec-e2e-testing/SKILL.md +40 -0
  95. package/skills/fec-e2e-testing/references/e2e-advanced.md +176 -0
  96. package/skills/fec-e2e-testing/references/playwright-patterns.md +95 -0
  97. package/skills/fec-form-handling/SKILL.md +76 -0
  98. package/skills/fec-form-handling/references/advanced-form-patterns.md +72 -0
  99. package/skills/fec-implement-from-design/SKILL.md +122 -0
  100. package/skills/fec-implement-from-design/references/design-plan-template.md +36 -0
  101. package/skills/fec-legacy-to-modern-migration/SKILL.md +180 -0
  102. package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +41 -0
  103. package/skills/fec-legacy-web-standard/SKILL.md +35 -0
  104. package/skills/fec-legacy-web-standard/references/legacy-patterns.md +85 -0
  105. package/skills/fec-list-virtualization/SKILL.md +34 -0
  106. package/skills/fec-list-virtualization/references/virtualization-patterns.md +52 -0
  107. package/skills/fec-monorepo-project-standard/SKILL.md +142 -0
  108. package/skills/fec-motion-interaction/SKILL.md +66 -0
  109. package/skills/fec-motion-interaction/references/motion-patterns.md +112 -0
  110. package/skills/fec-nextjs-project-standard/SKILL.md +117 -0
  111. package/skills/fec-nuxt-project-standard/SKILL.md +122 -0
  112. package/skills/fec-performance-optimization/SKILL.md +72 -0
  113. package/skills/fec-pwa-implementation/SKILL.md +36 -0
  114. package/skills/fec-pwa-implementation/references/manifest-and-icons.md +53 -0
  115. package/skills/fec-pwa-implementation/references/service-worker-workbox.md +68 -0
  116. package/skills/fec-react-project-standard/SKILL.md +83 -0
  117. package/skills/fec-react-project-standard/references/react-project-details.md +642 -0
  118. package/skills/fec-refactor-clean/SKILL.md +48 -0
  119. package/skills/fec-responsive-layout/SKILL.md +34 -0
  120. package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +59 -0
  121. package/skills/fec-route-protection/SKILL.md +135 -0
  122. package/skills/fec-security-review/SKILL.md +38 -0
  123. package/skills/fec-security-review/references/report-template.md +27 -0
  124. package/skills/fec-security-review/references/security-checklist.md +64 -0
  125. package/skills/fec-source-driven-development/SKILL.md +61 -0
  126. package/skills/fec-state-management/SKILL.md +140 -0
  127. package/skills/fec-state-management/references/state-patterns.md +109 -0
  128. package/skills/fec-storybook-component-doc/SKILL.md +37 -0
  129. package/skills/fec-storybook-component-doc/references/story-patterns.md +118 -0
  130. package/skills/fec-svg-animation/SKILL.md +148 -0
  131. package/skills/fec-tailwind-design-system/SKILL.md +34 -0
  132. package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +55 -0
  133. package/skills/fec-tdd-workflow/SKILL.md +52 -0
  134. package/skills/fec-testing-strategy/SKILL.md +45 -0
  135. package/skills/fec-typescript-type-safety/SKILL.md +157 -0
  136. package/skills/fec-typescript-type-safety/references/type-safety-patterns.md +102 -0
  137. package/skills/fec-ui-design/SKILL.md +90 -0
  138. package/skills/fec-ui-design/data/product-rules.json +110 -0
  139. package/skills/fec-ui-design/data/stack-ui-rules.json +14 -0
  140. package/skills/fec-ui-design/data/style-archetypes.json +74 -0
  141. package/skills/fec-ui-design/data/ux-quality-rules.json +56 -0
  142. package/skills/fec-ui-design/references/design-intelligence.md +37 -0
  143. package/skills/fec-ui-design/references/master-page-overrides.md +30 -0
  144. package/skills/fec-ui-design/references/pre-delivery-checklist.md +33 -0
  145. package/skills/fec-ui-design/scripts/design-system.mjs +530 -0
  146. package/skills/fec-validation-fix/SKILL.md +48 -0
  147. package/skills/fec-vite-project-standard/SKILL.md +83 -0
  148. package/skills/fec-vue3-project-standard/SKILL.md +49 -0
  149. package/skills/fec-vue3-project-standard/references/vue3-project-details.md +547 -0
  150. package/skills/fec-web-workers/SKILL.md +36 -0
  151. package/skills/fec-web-workers/references/advanced-workers.md +54 -0
  152. package/skills/fec-web-workers/references/basic-worker.md +67 -0
  153. package/skills/metadata.json +1422 -0
  154. package/skills/relations.json +644 -0
  155. package/templates/claude/CLAUDE.md +106 -0
  156. package/templates/claude/settings.json +62 -0
  157. package/templates/codex/AGENTS.md +105 -0
  158. package/templates/codex/config.toml +32 -0
  159. package/templates/openclaw/AGENTS.md +101 -0
  160. package/templates/openclaw/OPENCLAW-CONFIG.md +12 -0
  161. package/templates/shared/rules/fec-agent-workflow.md +54 -0
  162. package/templates/shared/rules/fec-api-layer.md +99 -0
  163. package/templates/shared/rules/fec-ci-cd.md +128 -0
  164. package/templates/shared/rules/fec-code-comments.md +33 -0
  165. package/templates/shared/rules/fec-design-system.md +248 -0
  166. package/templates/shared/rules/fec-error-handling.md +200 -0
  167. package/templates/shared/rules/fec-git-conventions.md +73 -0
  168. package/templates/shared/rules/fec-i18n.md +112 -0
  169. package/templates/shared/rules/fec-naming-conventions.md +120 -0
  170. package/templates/shared/rules/fec-performance.md +101 -0
  171. package/templates/shared/rules/fec-react.md +82 -0
  172. package/templates/shared/rules/fec-refactoring.md +43 -0
  173. package/templates/shared/rules/fec-rendering-patterns.md +183 -0
  174. package/templates/shared/rules/fec-responsive-design.md +227 -0
  175. package/templates/shared/rules/fec-source-driven-development.md +31 -0
  176. package/templates/shared/rules/fec-state-management.md +163 -0
  177. package/templates/shared/rules/fec-testing.md +98 -0
  178. package/templates/shared/rules/fec-typescript.md +355 -0
  179. package/templates/shared/rules/fec-vue.md +64 -0
  180. package/templates/shared/rules/fec-working-modes.md +50 -0
package/README.md ADDED
@@ -0,0 +1,467 @@
1
+ <div align="center">
2
+
3
+ <img src="assets/brand/frontend-craft.png" alt="frontend-craft logo" width="200" />
4
+
5
+ # frontend-craft
6
+
7
+ ### One toolkit. Every AI coding assistant. Production-grade frontend standards.
8
+
9
+ [![Stars](https://img.shields.io/github/stars/bovinphang/frontend-craft?style=flat)](https://github.com/bovinphang/frontend-craft/stargazers)
10
+ [![CI](https://github.com/bovinphang/frontend-craft/actions/workflows/ci.yml/badge.svg)](https://github.com/bovinphang/frontend-craft/actions/workflows/ci.yml)
11
+ [![npm version](https://img.shields.io/npm/v/frontend-craft)](https://www.npmjs.com/package/frontend-craft)
12
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
13
+ ![Node](https://img.shields.io/badge/Node.js-22+-5FA04E?logo=node.js&logoColor=white)
14
+ ![TypeScript](https://img.shields.io/badge/-TypeScript-3178C6?logo=typescript&logoColor=white)
15
+ ![React](https://img.shields.io/badge/-React-61DAFB?logo=react&logoColor=black)
16
+ ![Vue](https://img.shields.io/badge/-Vue-4FC08D?logo=vue.js&logoColor=white)
17
+ ![Figma](https://img.shields.io/badge/-Figma-F24E1E?logo=figma&logoColor=white)
18
+
19
+ **🌐 Language / 语言 / 語言 / 言語 / 언어**
20
+
21
+ [**English**](README.md) · [简体中文](README.zh-CN.md) · [繁體中文](docs/zh-TW/README.md) · [日本語](docs/ja-JP/README.md) · [한국어](docs/ko-KR/README.md)
22
+
23
+ </div>
24
+
25
+ ---
26
+
27
+ `frontend-craft` is a **universal frontend plugin** that brings the same opinionated engineering standards to all **15 AI coding assistants** listed below:
28
+
29
+ `claude` `codex` `cursor` `windsurf` `opencode`
30
+ `kilo` `gemini` `copilot` `antigravity` `augment`
31
+ `trae` `codebuddy` `cline` `openclaw` `qoder`
32
+
33
+ Per-runtime paths and caveats live in [`docs/runtimes/`](docs/runtimes/).
34
+
35
+ It bundles **13 specialized agents**, **40 auto-activated skills**, **8 slash commands**, **5 event-driven hooks**, **MCP integrations** for 6 design-tool endpoints, and a complete **rules library** into a single installable package. Run one command, and every AI session on your team writes React, Vue, Next.js, or Nuxt the same way — typed, accessible, secure, and consistent.
36
+
37
+ ---
38
+
39
+ ## Why frontend-craft?
40
+
41
+ | Problem | What frontend-craft does |
42
+ | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
43
+ | AI assistants write inconsistent, untyped, or insecure frontend code | **40 skills** encode team standards — auto-activated when the assistant touches matching files |
44
+ | Each AI tool has its own plugin format | **One CLI** installs the same rules, agents, and hooks into 15 runtimes |
45
+ | Design-to-code handoff is lossy | **MCP integrations** bring in richer context from Figma, Figma Desktop, Sketch, MasterGo, Pixso, and 墨刀 |
46
+ | Reviews are ad-hoc and shallow | **13 agents** produce graded reports: code, security, a11y, performance, TS, UI fidelity |
47
+ | No one remembers to run lint/tests | **Event-driven hooks** validate on save and session end — automatically |
48
+ | New projects start from scratch every time | **`/fec-init`** scaffolds CLAUDE.md, rules, and settings in seconds |
49
+
50
+ ---
51
+
52
+ ## Install
53
+
54
+ Requires **Node.js 22+**. Works on **Windows, macOS, and Linux**.
55
+
56
+ ### Option 1 - Global CLI project init (recommended)
57
+
58
+ ```bash
59
+ npm install -g frontend-craft@latest
60
+ cd your-project
61
+ fec init
62
+ fec init codex # initialize for a specific runtime
63
+ fec init claude # initialize for Claude Code
64
+ ```
65
+
66
+ `fec init` is the terminal CLI command for initializing the current project. In an interactive terminal, omit the runtime to choose one from the prompt; in non-interactive terminals, the CLI defaults to `claude` when no runtime is specified. `init` installs locally by default unless you explicitly pass `--global`, for example `fec init codex --global`. The in-assistant `/fec-init` slash command is separate and runs after frontend-craft is installed in your AI runtime.
67
+
68
+ ### Option 2 — No-global interactive wizard
69
+
70
+ ```bash
71
+ npx frontend-craft@latest
72
+ ```
73
+
74
+ Use this when you do not want to install a global `fec` command. The wizard walks through the full install flow: choose one or more runtimes, then choose whether to install globally or into the current project.
75
+
76
+ ### Option 3 — Scripted install
77
+
78
+ ```bash
79
+ # Install into the current project
80
+ npx frontend-craft@latest install --local claude
81
+
82
+ # Install globally for a runtime
83
+ npx frontend-craft@latest install --global codex
84
+
85
+ # Preview what would be installed across all runtimes
86
+ npx frontend-craft@latest install --all --dry-run --global
87
+
88
+ # List available runtimes
89
+ npx frontend-craft@latest list
90
+ ```
91
+
92
+ > **CI / scripts:** always pass `--global` / `-g` or `--local` / `-l`. Without a TTY, the CLI defaults to `claude --global` if neither is set.
93
+
94
+ ### Option 4 — Claude Code Marketplace
95
+
96
+ For Claude Code users, **Claude Code Marketplace** is the preferred single-source install. Use the CLI for Claude only when you need cross-runtime installs, scripted/offline file copies, or non-Marketplace environments.
97
+
98
+ If Marketplace is already installed, the CLI will not install or update a second Claude copy, even with `--force`; update through Claude Code Marketplace instead. If a CLI-managed Claude install already exists in the other scope, interactive terminals ask whether to keep that source updated or uninstall it before switching. Non-interactive terminals stop and print the exact `update`, `uninstall`, and `install` commands to run.
99
+
100
+ Full Claude-specific steps are in [docs/runtimes/claude.md](docs/runtimes/claude.md) · [简体中文](docs/runtimes/claude.zh-CN.md).
101
+
102
+ ---
103
+
104
+ ## Quick start
105
+
106
+ Once installed, you have a full frontend engineering toolkit available in every AI session:
107
+
108
+ ```text
109
+ You: "Review my recent changes"
110
+ → The fec-code-reviewer agent is dispatched, produces reports/code-review-*.md
111
+
112
+ You: "/fec-review"
113
+ → Runs a structured review across architecture, types, rendering, styles, a11y
114
+
115
+ You: "Implement the checkout page from this Figma link"
116
+ → The fec-figma-implementer agent reads the design via MCP, emits components and a report
117
+
118
+ You: "/fec-scaffold dashboard feature"
119
+ → Creates a page / feature / component directory tree following project conventions
120
+
121
+ You: "/fec-refactor-clean"
122
+ → Classifies and safely removes dead code, unused exports, styles, and deps
123
+ ```
124
+
125
+ All slash commands below are shown for **Claude Code**; other runtimes expose the same capabilities through their own command systems (see [`docs/runtimes/`](docs/runtimes/)).
126
+
127
+ ---
128
+
129
+ ## Example prompts
130
+
131
+ For a complete scenario-based prompt library, see [docs/example-prompts.md](docs/example-prompts.md).
132
+
133
+ ```text
134
+ You: "Review my recent changes before merge. Focus on architecture, type safety, rendering behavior, styles, accessibility, and missing tests."
135
+ You: "Before coding, plan the account billing feature: route structure, component boundaries, data flow, state ownership, validation flow, and rollout risks."
136
+ You: "Build a multi-step registration form with React Hook Form + Zod, file upload, conditional fields, async validation, and accessible errors."
137
+ You: "Implement the UI from Figma node 123:456. Use existing design tokens and components, match spacing and responsive states, and document assumptions."
138
+ You: "`/fec-refactor-clean` Clean up dead code in this module."
139
+ ```
140
+
141
+ ---
142
+
143
+ ## What’s inside
144
+
145
+ ### Commands
146
+
147
+ Slash commands are the primary entry points for structured workflows. Most produce a timestamped Markdown report under `reports/`.
148
+
149
+ | Command | Purpose | Report |
150
+ | --------------------- | ---------------------------------------------------------------------- | ------------------------------------------------ |
151
+ | `/fec-init` | Initialize project templates (CLAUDE.md, rules, settings) | — |
152
+ | `/fec-review` | Structured review of specified or recently changed files | `code-review-*.md` |
153
+ | `/fec-scaffold` | Create page / feature / component boilerplate by convention | — |
154
+ | `/fec-plan` | Unified planning: implementation architecture or test strategy | `architecture-proposal-*.md` or `test-plan-*.md` |
155
+ | `/fec-tdd` | Red → green → refactor loop for frontend TDD | — |
156
+ | `/fec-debug` | Diagnose and fix frontend issues: build, runtime, UI, and API failures | `debug-*.md` |
157
+ | `/fec-refactor-clean` | Classify and safely remove dead code, unused exports, styles, and deps | `refactor-clean-*.md` |
158
+ | `/fec-doc-sync` | Sync READMEs, runtime docs, capability tables, and metadata | — |
159
+
160
+ ### Skills (auto-activated)
161
+
162
+ Skills are workflow definitions that activate automatically based on file patterns, frameworks, or task context. They encode review dimensions, output conventions, and report formats.
163
+
164
+ The skills below are grouped by use case so you can quickly find project standards, implementation, testing, review, design, migration, and documentation workflows.
165
+
166
+ **Project standards** — conventions enforced whenever matching frameworks are detected:
167
+
168
+ | Skill | Scope |
169
+ | ------------------------------- | --------------------------------------------------------------------- |
170
+ | `fec-react-project-standard` | React + TypeScript (structure, components, routing, state, API layer) |
171
+ | `fec-vue3-project-standard` | Vue 3 + TypeScript (structure, components, routing, Pinia, API layer) |
172
+ | `fec-nextjs-project-standard` | Next.js 14+ App Router, SSR/SSG, streaming, metadata |
173
+ | `fec-nuxt-project-standard` | Nuxt 3 SSR/SSG, composables, data fetching, middleware |
174
+ | `fec-vite-project-standard` | Vite config, env safety, HMR, dev proxy, build optimization |
175
+ | `fec-monorepo-project-standard` | pnpm workspace, Turborepo, Nx structure and task orchestration |
176
+
177
+ **Implementation capabilities** — activated when building specific frontend behavior:
178
+
179
+ | Skill | Scope |
180
+ | ------------------------- | ------------------------------------------------------------------------- |
181
+ | `fec-data-fetching` | TanStack Query / server-state fetching, caching, optimistic updates |
182
+ | `fec-api-integration` | Typed API clients, auth refresh, uploads, realtime integration |
183
+ | `fec-state-management` | State ownership, store selection, URL state, server/form/local boundaries |
184
+ | `fec-form-handling` | React Hook Form + Zod, dynamic fields, uploads, multi-step flows |
185
+ | `fec-browser-storage` | localStorage / sessionStorage / IndexedDB / Cookies selection |
186
+ | `fec-route-protection` | Auth and permission routes for React Router, Next.js, Vue Router, Nuxt |
187
+ | `fec-pwa-implementation` | Manifest, service worker, offline cache, install prompts |
188
+ | `fec-web-workers` | Web Worker integration, transferables, Comlink, worker pools |
189
+ | `fec-canvas-threejs` | Canvas 2D, Three.js, React Three Fiber, WebGL |
190
+ | `fec-svg-animation` | CSS / Framer Motion / GSAP SVG animation with reduced-motion |
191
+ | `fec-list-virtualization` | react-window / TanStack Virtual with measurement strategies |
192
+
193
+ **Testing** — activated when planning or authoring frontend test coverage:
194
+
195
+ | Skill | Scope |
196
+ | ----------------------- | ------------------------------------------------------------------------ |
197
+ | `fec-testing-strategy` | Layer selection across static, unit, component, integration, E2E, visual |
198
+ | `fec-component-testing` | React Testing Library / Vue Test Utils with regression scenarios |
199
+ | `fec-e2e-testing` | Playwright / Cypress E2E with Page Object and CI integration |
200
+ | `fec-tdd-workflow` | Test-first frontend implementation with red-green-refactor |
201
+
202
+ **Review & quality** — activated during review, validation, or cleanup workflows:
203
+
204
+ | Skill | Scope |
205
+ | ------------------------------ | ----------------------------------------------------------------------------- |
206
+ | `fec-code-review` | Architecture, types, rendering, styles, a11y review |
207
+ | `fec-typescript-type-safety` | Type contracts, DTO mapping, type guards, generics, type-level checks |
208
+ | `fec-security-review` | XSS, CSRF, sensitive data leakage, input validation |
209
+ | `fec-accessibility-check` | WCAG 2.2, keyboard, focus, touch, and screen-reader behavior |
210
+ | `fec-dependency-upgrade` | Dependency upgrades, lockfile review, CVE remediation, migration verification |
211
+ | `fec-validation-fix` | Run and repair lint, type-check, test, build in one pass |
212
+ | `fec-performance-optimization` | Core Web Vitals, bundle, rendering, memory, network, and budget reviews |
213
+ | `fec-refactor-clean` | Safe dead-code, unused export, style, route, dependency cleanup |
214
+
215
+ **Design UI** — activated for design-to-code, design systems, and visual polish:
216
+
217
+ | Skill | Scope |
218
+ | ----------------------------- | ----------------------------------------------------------------------------- |
219
+ | `fec-ui-design` | UI direction, visual identity, polish, states, visual QA |
220
+ | `fec-tailwind-design-system` | Tailwind tokens, theme extension, variants, class governance, dark mode |
221
+ | `fec-responsive-layout` | Mobile-first layouts, container queries, data-dense responsive UI |
222
+ | `fec-motion-interaction` | Interaction motion, page transitions, scroll animation, reduced motion |
223
+ | `fec-implement-from-design` | Build UI from Figma/Sketch/MasterGo/Pixso/墨刀 design files, or 摹客 assets |
224
+ | `fec-storybook-component-doc` | Storybook component docs, design-system presentation, isolated state previews |
225
+
226
+ **Legacy migration** — activated during modernization work:
227
+
228
+ | Skill | Scope |
229
+ | -------------------------------- | ---------------------------------------------------------- |
230
+ | `fec-legacy-web-standard` | Standards for JS + jQuery + HTML maintenance |
231
+ | `fec-legacy-to-modern-migration` | jQuery/MPA → React/Vue 3 + TS strategy and phased workflow |
232
+
233
+ **Maintenance docs** — activated during documentation upkeep:
234
+
235
+ | Skill | Scope |
236
+ | ------------------------------- | -------------------------------------------------------------------------------------- |
237
+ | `fec-doc-sync` | Keep public docs in sync with scripts, skills, agents, commands |
238
+ | `fec-source-driven-development` | Verify version-sensitive frontend decisions against project facts and official sources |
239
+
240
+ ### Agents
241
+
242
+ Agents are specialized sub-agents dispatched by the main assistant to handle a focused task. Each returns a structured report.
243
+
244
+ | Agent | Focus | Report |
245
+ | --------------------------- | -------------------------------------------------------------------------- | ---------------------------- |
246
+ | `fec-code-reviewer` | React/Vue/Next/Nuxt, TS, styles, client-side security (confidence-based) | `code-review-*.md` |
247
+ | `fec-typescript-reviewer` | Type safety, async correctness, idiomatic patterns (report-only) | `typescript-review-*.md` |
248
+ | `fec-security-reviewer` | XSS, client secrets, dangerous DOM/APIs, CSP, dependency audit | `security-review-*.md` |
249
+ | `fec-performance-optimizer` | Bundle size, render performance, network bottlenecks | `performance-review-*.md` |
250
+ | `fec-architect` | Page splitting, component architecture, state flow, directory planning | `architecture-proposal-*.md` |
251
+ | `fec-test-planner` | Risk-to-layer matrix: static, unit, component, E2E, visual, a11y, security | `test-plan-*.md` |
252
+ | `fec-debugger` | Complex frontend diagnostics for build, runtime, UI, and API failures | `debug-*.md` |
253
+ | `fec-refactor-cleaner` | Classify and safely remove unused code, exports, styles, routes, deps | `refactor-clean-*.md` |
254
+ | `fec-e2e-runner` | E2E authoring and runs (Playwright/Cypress), flaky quarantine, traces | `e2e-summary-*.md` |
255
+ | `fec-doc-updater` | Sync README, runtime docs, structure, capability tables, metadata | — |
256
+ | `fec-ui-checker` | Visual issue debugging and design fidelity evaluation | `ui-fidelity-review-*.md` |
257
+ | `fec-figma-implementer` | Precise UI implementation from Figma/Sketch/MasterGo/Pixso/墨刀 designs | `design-implementation-*.md` |
258
+ | `fec-design-token-mapper` | Map design variables to project Design Tokens | `token-mapping-*.md` |
259
+
260
+ ### Hooks (event-driven)
261
+
262
+ Hooks run automatically on AI assistant events — no invocation needed.
263
+
264
+ | Event | Behavior |
265
+ | ------------------------- | -------------------------------------------------------------- |
266
+ | `SessionStart` | Clean Claude cache, then detect project framework and package manager |
267
+ | `PreToolUse(Bash)` | Block dangerous commands (`rm -rf`, force push, etc.) |
268
+ | `PostToolUse(Write/Edit)` | Auto-format modified files with Prettier |
269
+ | `Stop` | Run lint, type-check, test, and build on session end |
270
+ | `Notification` | Cross-platform desktop notifications (macOS / Linux / Windows) |
271
+
272
+ ### MCP integration
273
+
274
+ Plug your AI assistant into design tools for design-to-code workflows with richer design context.
275
+
276
+ | Service | Capabilities |
277
+ | ----------------- | ---------------------------------------------------- |
278
+ | **Figma** | Read design context and variable definitions |
279
+ | **Figma Desktop** | Figma desktop client integration |
280
+ | **Sketch** | Read design selection screenshots |
281
+ | **MasterGo** | Read DSL structure, component hierarchy, styles |
282
+ | **Pixso** | Local MCP: frame data, code snippets, image assets |
283
+ | **墨刀** | Prototype data, design descriptions, HTML import |
284
+ | **摹客** | Screenshot/annotation/exported-CSS workflow (no MCP) |
285
+
286
+ ### Project templates (`/fec-init`)
287
+
288
+ Run `/fec-init` to scaffold a ready-to-use rules library and project config into `.claude/`:
289
+
290
+ <details>
291
+ <summary>Click to see all 20 template files</summary>
292
+
293
+ | File | Purpose |
294
+ | ---------------------------------------- | --------------------------------------------------------------------- |
295
+ | `CLAUDE.md` | Project description, commands, working principles, security |
296
+ | `settings.json` | Permission whitelist/blacklist, environment variables |
297
+ | `rules/fec-vue.md` | Vue 3 component standards and anti-patterns |
298
+ | `rules/fec-react.md` | React component standards and anti-patterns |
299
+ | `rules/fec-design-system.md` | Design system, tokens, accessibility |
300
+ | `rules/fec-testing.md` | Testing and validation rules |
301
+ | `rules/fec-git-conventions.md` | Conventional Commits |
302
+ | `rules/fec-i18n.md` | Internationalization copy standards |
303
+ | `rules/fec-performance.md` | Frontend performance rules |
304
+ | `rules/fec-rendering-patterns.md` | Rendering lifecycle, hydration, SSR/CSR, and update patterns |
305
+ | `rules/fec-responsive-design.md` | Responsive layout, breakpoints, touch targets, and viewport behavior |
306
+ | `rules/fec-source-driven-development.md` | Source-driven decisions, official docs, version-sensitive assumptions |
307
+ | `rules/fec-api-layer.md` | API layer typing and error handling |
308
+ | `rules/fec-state-management.md` | State classification, strategy, anti-patterns |
309
+ | `rules/fec-error-handling.md` | Error layering, Error Boundary, fallback UI, reporting |
310
+ | `rules/fec-naming-conventions.md` | Unified naming for files, components, variables, routes, API, CSS |
311
+ | `rules/fec-code-comments.md` | When and how to write frontend comments |
312
+ | `rules/fec-ci-cd.md` | CI/CD pipeline stages, GitHub Actions / GitLab CI, secrets |
313
+ | `rules/fec-refactoring.md` | Refactoring constraints and feature-parity requirements |
314
+ | `rules/fec-agent-workflow.md` | Agent collaboration boundaries and delegation |
315
+ | `rules/fec-working-modes.md` | Research, planning, development, review, finishing modes |
316
+
317
+ </details>
318
+
319
+ ---
320
+
321
+ ## Configuration
322
+
323
+ ### Prerequisites
324
+
325
+ - **Node.js 22+**
326
+ - **npm, pnpm, or yarn**
327
+ - **Git Bash or a compatible shell** (Windows only, when your AI runtime invokes shell-based commands)
328
+
329
+ ### MCP design-tool tokens
330
+
331
+ Set the environment variable for whichever design tool your team uses:
332
+
333
+ | Variable | Tool | How to get |
334
+ | ---------------- | --------------------- | ----------------------------------------------------- |
335
+ | `FIGMA_API_KEY` | Figma / Figma Desktop | Figma account settings → Personal Access Tokens |
336
+ | `SKETCH_API_KEY` | Sketch | Sketch developer settings |
337
+ | `MG_MCP_TOKEN` | MasterGo | MasterGo account settings → Security → Generate Token |
338
+ | `MODAO_TOKEN` | 墨刀 | 墨刀 AI feature page → access token |
339
+
340
+ > **Pixso** uses a local MCP server — enable MCP in the Pixso client, no env var needed.
341
+ > **摹客** has no MCP integration; works via screenshots and exported CSS.
342
+
343
+ Add to your shell config for persistence:
344
+
345
+ ```bash
346
+ # macOS / Linux — append to ~/.bashrc or ~/.zshrc
347
+ export FIGMA_API_KEY="your-figma-api-key"
348
+ export SKETCH_API_KEY="your-sketch-api-key"
349
+ export MG_MCP_TOKEN="your-mastergo-token"
350
+ export MODAO_TOKEN="your-modao-token"
351
+ ```
352
+
353
+ ```powershell
354
+ # Windows — set as system environment variables, or in PowerShell:
355
+ $env:FIGMA_API_KEY = "your-figma-api-key"
356
+ $env:SKETCH_API_KEY = "your-sketch-api-key"
357
+ $env:MG_MCP_TOKEN = "your-mastergo-token"
358
+ $env:MODAO_TOKEN = "your-modao-token"
359
+ ```
360
+
361
+ ---
362
+
363
+ ## Reports
364
+
365
+ Every review, analysis, and evaluation writes a timestamped Markdown report to `reports/`. These serve as an audit trail and a handoff artifact for PRs.
366
+
367
+ <details>
368
+ <summary>Click to see all 15 report types</summary>
369
+
370
+ | Report type | Filename pattern | Produced by |
371
+ | ---------------------- | -------------------------------------------- | ------------------------------------------------------------------- |
372
+ | Code review | `code-review-YYYY-MM-DD-HHmmss.md` | `/fec-review`, `fec-code-review`, `fec-code-reviewer` |
373
+ | TypeScript / JS review | `typescript-review-YYYY-MM-DD-HHmmss.md` | `fec-typescript-reviewer` |
374
+ | Security review | `security-review-YYYY-MM-DD-HHmmss.md` | `fec-security-review`, `fec-security-reviewer` |
375
+ | Accessibility | `accessibility-review-YYYY-MM-DD-HHmmss.md` | `fec-accessibility-check` |
376
+ | Performance | `performance-review-YYYY-MM-DD-HHmmss.md` | `fec-performance-optimizer` |
377
+ | Architecture | `architecture-proposal-YYYY-MM-DD-HHmmss.md` | `fec-architect` |
378
+ | Design fidelity | `ui-fidelity-review-YYYY-MM-DD-HHmmss.md` | `fec-ui-checker` |
379
+ | Design implementation | `design-implementation-YYYY-MM-DD-HHmmss.md` | `fec-figma-implementer` |
380
+ | Token mapping | `token-mapping-YYYY-MM-DD-HHmmss.md` | `fec-design-token-mapper` |
381
+ | Design plan | `design-plan-YYYY-MM-DD-HHmmss.md` | `fec-implement-from-design` |
382
+ | Test plan | `test-plan-YYYY-MM-DD-HHmmss.md` | `/fec-plan`, `fec-testing-strategy`, `fec-test-planner` |
383
+ | Validation fix | `validation-fix-YYYY-MM-DD-HHmmss.md` | `fec-validation-fix` |
384
+ | Refactor clean | `refactor-clean-YYYY-MM-DD-HHmmss.md` | `/fec-refactor-clean`, `fec-refactor-clean`, `fec-refactor-cleaner` |
385
+ | E2E run summary | `e2e-summary-YYYY-MM-DD-HHmmss.md` | `fec-e2e-runner` (optional) |
386
+ | Migration plan | `migration-plan-YYYY-MM-DD-HHmmss.md` | `fec-legacy-to-modern-migration` |
387
+
388
+ </details>
389
+
390
+ > **Tip:** add `reports/` to `.gitignore` to keep the auto-generated reports out of version control — or commit them to preserve a team review history.
391
+
392
+ ---
393
+
394
+ ## Update and Remove
395
+
396
+ `fec` is the short command for `frontend-craft`. If you have not installed the global `fec` command, use the same arguments with `npx frontend-craft@latest`, for example `npx frontend-craft@latest update`.
397
+
398
+ ### Update
399
+
400
+ ```bash
401
+ fec update # Update all discovered CLI-managed installs
402
+ fec update <runtime> --local # Update one local CLI-managed install
403
+ fec update <runtime> --global # Update one global CLI-managed install
404
+ fec upgrade <runtime> --global # `upgrade` is an alias for `update`
405
+ ```
406
+
407
+ ### Remove
408
+
409
+ ```bash
410
+ fec uninstall # Remove all discovered CLI-managed installs
411
+ fec remove # `remove` is an alias for `uninstall`
412
+ fec uninstall <runtime> # Remove a specific runtime install
413
+ fec remove <runtime> # Same removal through the alias
414
+ fec uninstall --global # Remove discovered global installs only
415
+ fec remove --local # Remove discovered local installs only
416
+ fec uninstall <runtime> --dry-run # Preview removals
417
+ fec uninstall <runtime> --force # Remove modified managed files too
418
+ ```
419
+
420
+ The CLI writes `frontend-craft.manifest.json` into the runtime directory. `update` discovers those manifests automatically when no runtime is provided and **skips files you’ve modified locally**, so customizations survive updates.
421
+
422
+ `uninstall`/`remove` only deletes files recorded in the manifest. It skips modified files by default; add `--force` only when you want to remove modified managed files too. `--force` does not override a Claude Code Marketplace install.
423
+
424
+ For **Claude Code Marketplace** or **submodule** installs, see [docs/runtimes/claude.md](docs/runtimes/claude.md) · [简体中文](docs/runtimes/claude.zh-CN.md). `/fec-init` only initializes project config; it is not a second plugin install.
425
+
426
+ ---
427
+
428
+ ## Legacy Skills CLI
429
+
430
+ If your team already uses the standalone [Skills CLI](https://skills.sh/docs/cli), it can still install just the workflow skill packages from [`skills/`](skills/):
431
+
432
+ ```bash
433
+ npx skills add bovinphang/frontend-craft # follow prompts, or add -g for global
434
+ npx skills update # update to latest
435
+ npx skills check # preview available updates
436
+ ```
437
+
438
+ | CLI | Installs |
439
+ | -------------------- | ------------------------------------------------------------------- |
440
+ | `npx frontend-craft` | Skills + runtime-specific agents, commands, hooks, rules, templates |
441
+ | `npx skills` | Skills only (for existing Skills CLI workflows) |
442
+
443
+ To disable telemetry: `DISABLE_TELEMETRY=1`. Details: [skills.sh CLI docs](https://skills.sh/docs/cli).
444
+
445
+ ---
446
+
447
+ ## Community
448
+
449
+ - [Contributing Guide](CONTRIBUTING.md) — development setup, PR checklist, localization policy ([简体中文](CONTRIBUTING.zh-CN.md))
450
+ - [Security Policy](SECURITY.md) — private vulnerability reporting ([简体中文](SECURITY.zh-CN.md))
451
+ - [Code of Conduct](CODE_OF_CONDUCT.md) — community standards ([简体中文](CODE_OF_CONDUCT.zh-CN.md))
452
+ - [Changelog](CHANGELOG.md) — release notes ([简体中文](CHANGELOG.zh-CN.md))
453
+ - [Project structure](docs/project-structure.md) — full directory layout and file responsibilities ([简体中文](docs/zh-CN/project-structure.md))
454
+
455
+ ---
456
+
457
+ ## License
458
+
459
+ [MIT](LICENSE) — use freely, modify as needed, contribute back if you can.
460
+
461
+ ---
462
+
463
+ <div align="center">
464
+
465
+ **If frontend-craft helps your team ship better code, [give it a Star](https://github.com/bovinphang/frontend-craft).**
466
+
467
+ </div>