Communitygithub.com

copy-check (UI文字檢查)

跨語系比對UI文案的一致性,檢查next-intl訊息目錄與程式碼中sv/en COPY物件的按鍵對等性,找出佔位符、陣列長度不匹配以及外語詞彙滲入(例如英文中出現「och」的錯誤),並手動審核宣稱是否與定價、條款及專案禁用片語一致。編輯文案或翻譯後、在推出含有新文字的頁面前,或當被要求校對或檢查翻譯時使用。

copy-check (UI文字檢查) 是什麼?

此技能專為使用 next-intl 進行國際化的專案設計,能自動比對不同語系(如 sv 與 en)的 UI 文案。它會執行程式腳本 `i18n-parity.mjs`,掃描 JSON 訊息目錄與 TypeScript/JavaScript 中的 `sv: {…}` / `en: {…}` 物件,回報缺少的按鍵、陣列長度不一致、佔位符不匹配等錯誤,以及偵測外語詞彙錯誤滲入(例如英文字串中出現瑞典文「och」)並提出警告。此外,技能還包含手動審核階段,檢查是否有專案禁止使用的片語、事實宣稱是否與實際定價/條款/合規要求一致、瑞典語文案的正確性(如詞序、性別冠詞、貨幣格式)、英語文案的句式與標點習慣,以及跨頁面術語的一致性。此技能適合在修改文案或翻譯後、發佈含新文字的頁面前使用,確保在地化品質與法規遵循。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/iamk3nnyt/claude-skills/tree/HEAD/skills/copy-check

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

copy-check

1. 機械化檢查

參數:$ARGUMENTS

node ${CLAUDE_SKILL_DIR}/scripts/i18n-parity.mjs <目錄, 預設為目前專案的 app 根目錄> --locales sv,en

此腳本會尋找 **/messages|locales|i18n/<locale>.json 目錄以及 TypeScript/JS 中以 sv: {…} / en: {…} 形式出現的物件字面值。它會回報:

  • 錯誤: 缺少按鍵、陣列長度不符、佔位符不符({name}、${x}、{{x}})。請修正所有此類錯誤。
  • 警告: 英文字串中出現瑞典文功能詞(och、att、för、med、inte、är 等),或反之亦然;以及較長且完全相同的字串(可能是未翻譯?)。請逐一判斷;產品名稱及以引號括起來的瑞典文術語是允許的。
  • 無法解析: 迷你解析器無法讀取的區塊。請以人工檢查這些檔案。

在此模式之外建構的字串(JSX 字面值、包含內建預設值的 t())不在此範圍內。請 grep 已變更的檔案,找出用錯誤語系寫死的文字。

2. 判斷階段(先處理已變更的檔案,再處理它們所屬的頁面)

  • 禁用或過時片語: 閱讀專案的 CLAUDE.md 及專案記憶條目。專案通常會保留一份已淘汰的標語、必要引言清單,或是絕對不得公開陳述的內容。
  • 宣稱與實際情況: 價格、試用期長度、限制以及「免費」等詞,須對照實際定價設定檔、Stripe 產品及條款頁面。覆蓋率宣稱不得將顯示上限當作覆蓋率。「最快」、「每個」和「所有」需要來源佐證。
  • 法律/同意措辭: 行銷同意不得與條款綑綁,且瑞典法律術語需正確(ångerrätt、personuppgifter)。
  • 語系品質(以瑞典語為例): 自然的詞序、無複合詞錯誤(如「hyres lägenhet」)、正確的 en/ett、小數點使用逗號、貨幣格式為 1 299 kr(數字後加 kr)、日期格式為 19 okt / 2026-10-19。
  • 英語品質: 使用句子大小寫,無瑞典文標點習慣,且貨幣格式符合該語系規範。
  • 一致性: 跨頁面使用相同術語指稱相同事物(沿用既有的)。

退出條件

  • i18n-parity 以結束碼 0 退出,或所有剩餘的警告都已被判斷。
  • 無禁用片語,且每項事實宣稱都與設定檔、條款或來源一致。
  • 僅對文案進行修正,未夾帶重新設計。
  • 向使用者提供簡短摘要。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

iamk3nnyt/claude-skills

Turns a feature idea into a one-page spec covering problem, audience, MVP scope, non-goals, numbered Given/When/Then acceptance criteria, affected routes, data and emails, and open questions. Use when the user says "brief", "spec this", "scope this" or "what would it take", or before starting a feature whose scope is unclear.

iamk3nnyt/claude-skills

Applies an agreed visual direction to a page or component by reusing existing components first, then verifies every width and dark mode with the headless-Chrome audit plus a before/after pixel diff, and reviews against Refactoring UI, Nielsen and WCAG 2.2. Use when asked to redesign, restyle, polish or "make it look like the reference", after design-ref or when the direction is already clear.

iamk3nnyt/claude-skills

Extracts the visual system from a reference site or pasted HTML (colour roles, type scale, spacing scale, radii, shadows, button/card/eyebrow anatomy, tone) and maps it onto the current project's existing tokens as a short token table. Use when the user shares a reference ("make it look like <site>", "in this style", a URL or HTML paste) before a redesign.

iamk3nnyt/claude-skills

QAs a project's transactional and digest emails by rendering every template without DB or network, screenshotting at 600 and 375 px in light, dark and images-off, and checking for placeholder leaks (undefined, NaN, {{…}}), preheader, unsubscribe, alt text, absolute links, Outlook-safe buttons, viewport meta and Gmail's 102 KB clip. Use when email templates change, before sending a campaign, or when asked to check how emails look.

相關技能