/frontend:i18nfrom frontend
前端 i18n 違規偵測與翻譯 key 組織——系統性掃出硬寫字串、依 feature 而非元件組織 key、處理 template literal 的部分硬寫。附 Vue 3 附錄。Use when refactoring pages, creating new features, or fixing i18n violations;觸發:「i18n 違規」「這頁還有硬寫中文」「翻譯 key 怎麼組織」「補 i18n」「國際化」。
Ships in frontend. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
掃出 i18n 違規,並以可維護的方式組織翻譯 key。
先看專案的 package.json dependencies(vue、react、svelte、@angular/core 等)與目錄結構,對照下表載入附錄,並在回報第一行寫「附錄:<檔名>」。
| 偵測到 | 附錄 |
|---|---|
dependencies 有 vue | ${CLAUDE_PLUGIN_ROOT}/references/stacks/vue.md |
react、svelte、@angular/core | 目前沒有附錄,走下方退路 |
沒有對應附錄:照本 skill 的通用方法,加上專案既有程式的寫法(先找 2–3 個同類檔當樣板;有裝 workspace 就照 workspace:convention-first(可選,沒裝就自己 grep 既有實作當樣板))。做完問使用者要不要把這次的寫法整理成新附錄 references/stacks/<stack>.md,回報寫「附錄:無(照既有程式)」。
前提:translate 函式、locale 切換、語系選擇元件通常由 i18n framework 或專案共享元件庫提供;元件端統一取用,不各自 new instance。
適用:重構頁面或開發新功能時。例外:純開發用 debug 文字(非 user-facing)。
即使只有部分硬寫(前綴、後綴)也算違規。
依 feature 領域組織,而非依元件,相關元件才能共用 key:
[domain].[feature].[area].*
├── pageTitle
├── tabs.*
├── sections.*
│ ├── columns.*
│ ├── filters.*
│ └── empty.*
├── actions.*
└── messages.*
├── success.*
└── errors.*
前綴也要走 i18n:把「材質:」硬寫在 template 裡是錯的,正確寫法是用翻譯函式取得標籤後再接動態值。各框架的語法見附錄。
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
4 skills in this plugin
/component-logic把業務邏輯從前端元件抽成可復用單元的做法——單一職責、reactive 輸入、side effect 隔離、清楚介面型別。附 Vue 3 composable 寫法附錄。Use when extracting business logic over 50 lines or creating reusable component logic;觸發:「抽 composable」「抽 hook」「這段邏輯太長要拆」「可復用邏輯」「component logic」。/frontend-architecture前端架構決策——分層合規、元件選型、依賴方向檢查、大型元件重構、狀態管理與資料取得原則、效能策略。附 Vue 3 附錄。Use when making frontend architecture decisions, checking layer violations, or planning refactoring;觸發:「前端架構」「分層違規」「元件該放哪層」「重構這個大元件」「architecture review」「狀態放哪」。/runtime-debug用瀏覽器 DevTools(chrome-devtools MCP)除錯執行中的前端——console error 分流、API request 檢查、前端 state 檢視、realtime 連線、視覺回歸、表單互動、router。附 Vue 3 附錄(Vue DevTools、Pinia、TanStack Query 檢視)。Use when debugging the running frontend via browser DevTools;觸發:「除錯執行中的前端」「頁面壞了幫我看」「看 console error」「檢查 API 請求」「inspect state」。npx claudepluginhub kerryhuang/plugharbor --plugin frontend