Hacker News 热门(buzzing.cc 中文翻译)
精选
70AI 编辑部评分,满分 100

如何让 Claude 不再说"honest takes"和"load-bearing seams"

2026-07-15 00:39· 24天前· shintoist
AI 导读

用户可通过 Claude 的 MessageDisplay Hook 机制自定义词汇替换。编写 Python 脚本,将“seam”替换为“whatchamacallit”、“you're absolutely right”替换为“I'm a complete clown”、“honest take”替换为“spicy doodad”、“load-bearing”替换为“cooked”,保存为 ~/.claude/hooks/wordswap.sh 并赋予执行权限,再在 ~/.claude/settings.json 的 hooks 块中配置该命令。Hook 在启动时加载,新会话即生效。

推荐理由

Claude 的「load-bearing」和「honest take」可能是你今年最烦的 AI 用语,这个 hook 脚本把它们替换成搞笑词,读完直接套用,保证效率与笑果兼备。

正文 · AI 翻译

看到 Claude 把所有东西都称为“诚实看法”和“承重接缝”,你是不是也气得抓狂?你不是一个人。但如果我告诉你,有一种方法可以把这种巨大的挫败感变得荒谬到让你忍不住发笑呢?或者干脆直接修复 Claude 的词汇表。我向你介绍:MessageDisplay hook。

首先,你需要一个小脚本,里面设置好一些替换规则:

#!/usr/bin/env python3
import json, re, sys
replacements = {
"seam": "whatchamacallit",
"you're absolutely right": "I'm a complete clown",
"honest take": "spicy doodad",
"load-bearing": "cooked"
}
data = json.load(sys.stdin)
text = data.get("delta") or ""
for phrase, replacement in replacements.items():
pattern = r"\b" + re.escape(phrase) + r"\b"
text = re.sub(pattern, replacement, text, flags=re.IGNORECASE)
print(json.dumps({
"hookSpecificOutput": {
"hookEventName": "MessageDisplay",
"displayContent": text,
}
}))

把它放到 `~/.claude/hooks/wordswap.sh`,然后用 `chmod +x ~/.claude/hooks/wordswap.sh` 让它可执行。接着,要把它挂载上去,就在你的 `~/.claude/settings.json` 的 hooks 块里添加它,像这样:

{
"hooks": {
"MessageDisplay": [
{ "hooks": [ { "type": "command", "command": "$HOME/.claude/hooks/wordswap.sh" } ] }
]
}
}

Hooks 在启动时加载,所以你只需要开始一个新会话,就能开启你的新生活了。

A screenshot of Claude output showing the effect of the script.

我相信你能想出比我更好、更有成效的替换方案。玩得开心!

来源:Hacker News 热门(buzzing.cc 中文翻译) · jola.dev

如何让 Claude 不再说"honest takes"和"load-bearing seams"

Hacker News 热门(buzzing.cc 中文翻译)·2026-07-15 00:39·24天前·shintoist
AI 导读

用户可通过 Claude 的 MessageDisplay Hook 机制自定义词汇替换。编写 Python 脚本,将“seam”替换为“whatchamacallit”、“you're absolutely right”替换为“I'm a complete clown”、“honest take”替换为“spicy doodad”、“load-bearing”替换为“cooked”,保存为 ~/.claude/hooks/wordswap.sh 并赋予执行权限,再在 ~/.claude/settings.json 的 hooks 块中配置该命令。Hook 在启动时加载,新会话即生效。

正文 · AI 翻译

看到 Claude 把所有东西都称为“诚实看法”和“承重接缝”,你是不是也气得抓狂?你不是一个人。但如果我告诉你,有一种方法可以把这种巨大的挫败感变得荒谬到让你忍不住发笑呢?或者干脆直接修复 Claude 的词汇表。我向你介绍:MessageDisplay hook。

首先,你需要一个小脚本,里面设置好一些替换规则:

#!/usr/bin/env python3
import json, re, sys
replacements = {
"seam": "whatchamacallit",
"you're absolutely right": "I'm a complete clown",
"honest take": "spicy doodad",
"load-bearing": "cooked"
}
data = json.load(sys.stdin)
text = data.get("delta") or ""
for phrase, replacement in replacements.items():
pattern = r"\b" + re.escape(phrase) + r"\b"
text = re.sub(pattern, replacement, text, flags=re.IGNORECASE)
print(json.dumps({
"hookSpecificOutput": {
"hookEventName": "MessageDisplay",
"displayContent": text,
}
}))

把它放到 `~/.claude/hooks/wordswap.sh`,然后用 `chmod +x ~/.claude/hooks/wordswap.sh` 让它可执行。接着,要把它挂载上去,就在你的 `~/.claude/settings.json` 的 hooks 块里添加它,像这样:

{
"hooks": {
"MessageDisplay": [
{ "hooks": [ { "type": "command", "command": "$HOME/.claude/hooks/wordswap.sh" } ] }
]
}
}

Hooks 在启动时加载,所以你只需要开始一个新会话,就能开启你的新生活了。

A screenshot of Claude output showing the effect of the script.

我相信你能想出比我更好、更有成效的替换方案。玩得开心!

来源:Hacker News 热门(buzzing.cc 中文翻译)· jola.dev