Better Phrase
100% 本地 · 0 API 调用 · 0 遥测

Claude Code 装一个 英文润色器

写英文挑出语法、用词、地道度问题。写中文顺手给一段地道英文版。
代码、命令、不需要的输入 — 完全静默

$ curl -fsSL https://betterphrase.roseduan.cn/install.sh | bash

需要 Python 3.9+ · 已安装 Claude Code · 一行命令完成 hook 注册

演示

看看它在 Claude Code 里长什么样

写英文时
> how are you todya, tell me a joke

Better Phrase (1ms)

✏️ English tip:

· "todya" → "today" — 拼写错误,字母顺序颠倒。

· comma splice — 两个独立句子应该用句号。

✍️ Better Phrase: "Hey, how's it going today? Also, tell me a joke."

写中文时
> 我想约客户下周二开会讨论合同细节

Better Phrase (1ms)

🌐 English:

"I'd like to schedule a meeting with the client next Tuesday to go over the contract details."

写代码、敲命令、或者不需要翻译的中文 — 完全静默,0 token,0 干扰。

为什么不是 skill

语言检测交给代码 · 不交给 LLM

"判断这条 prompt 是不是英文"是一道 yes/no 题。让 LLM 每次重新判断,看似等价,token 成本和触发可靠性完全不一样。

如果做成 skill(让 LLM 决定调用) Better Phrase(hook + 代码过滤)
触发判定 每条 prompt 都要 LLM 判断要不要调用 Python 正则确定性判定,0 模型成本
Token 成本 skill 描述常驻上下文,每条消息都加载 只在检测到英文时才注入指令
触发可靠性 模型可能漏调用 / 调用时机错 100% 一致,不依赖模型记性
非英文场景 就算最终不调用,描述也已经占了 token 0 token,hook 直接退出

skill 适合"AI 该不该用 X 工具"这种需要判断的场景。语言检测是一道 yes/no 题,写在代码里更便宜也更稳。

特性

小而克制,做好一件事

✏️

英文润色

语法 / 词汇 / 表达地道度修正,顺手给一段 native rewrite。

🌐

中文 → 英文翻译

写中文时附带一段地道英文版本,可一键开关。

🎯

零干扰

代码、命令、不相关输入完全不触发,不浪费一个 token。

🇨🇳

中文讲解

tip 用中文解释,聚焦常见中式英语模式,看一次记一次。

🚀

启动开销可忽略

hook 本身只做语言检测,相对 Claude 响应延迟感知不到。

🔒

100% 本地

无 API 调用,无遥测,数据永不出本机。

安装

30 秒装好

方式 A · 一行命令
$ curl -fsSL https://betterphrase.roseduan.cn/install.sh | bash
方式 B · 先 clone 再装(看过脚本再跑)
$ git clone https://github.com/roseduan/better-phrase.git ~/.claude/skills/better-phrase
$ cd ~/.claude/skills/better-phrase
$ ./install.sh

安装脚本做了什么

  1. 检查 ~/.claude/ 存在,且 python3 / git 可用
  2. 给你现有的 ~/.claude/settings.json 打时间戳备份
  3. hooks.UserPromptSubmit 加一条入口
  4. 清理掉之前装过的旧版本(如有)
装完重启 Claude Code,然后输入任意一句英文,会看到 ✦ Better Phrase · English tip 块出现。