Communitygithub.com

copy-check

检查 UI 文案在多个语言环境间的一致性,通过比对 next-intl 消息目录与代码中的 sv/en COPY 对象的键值一致性,发现占位符、数组不匹配以及另一种语言的词汇混入问题,然后手动复核声明中的术语、定价与项目禁用短语。在编辑文案或翻译后、发布包含新文本的页面之前,或者在要求校对或检查翻译时使用。

copy-check 是什么?

此技能提供了一套系统化的 UI 文案审查流程,支持 Claude Code、Cursor 等 AI 编码助手,适用于使用 next-intl 国际化方案的中型到大型项目。它首先运行一个机械检查:解析 `**/messages|locales|i18n/<locale>.json` 目录与代码中的 `sv{...}`/`en{...}` 对象,报告缺失键、数组长度不匹配、占位符不匹配(如 {name}、${x}、{{x}})等错误,并警告瑞典语功能词(如 och、att、för)出现在英语字符串中或反之亦然,以及长度相同的未翻译字符串。接着进入人工判断环节:检查项目中的禁用短语(通过 CLAUDE.md 或记忆条目)、核实价格、试用时长、限制和“免费”声明是否与实际配置一致,确认法律/同意措辞正确(如瑞典语 ångerrätt、personuppgifter),评估语言质量(自然语序、名词连写、en/ett 用法、小数逗号与 kr 位置、日期格式)。最后形成退出清单:脚本退出码为 0 或所有警告已人工判断、无禁用短语且事实声明匹配配置/来源、仅修改文案未夹带设计变更、向用户提交简短摘要。

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

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

文案检查

1. 机械检查

参数:$ARGUMENTS

node ${CLAUDE_SKILL_DIR}/scripts/i18n-parity.mjs <dir, 默认:当前项目的根目录> --locales sv,en

该脚本查找 **/messages|locales|i18n/<locale>.json 目录以及 TS/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,小数逗号和 kr 放在数字后(1 299 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.

相关技能