如何阻止 Claude 说“承重”
How to stop Claude from saying load-bearing

原始链接: https://jola.dev/posts/how-to-stop-claude-from-saying-load-bearing

厌倦了 Claude 那些如“honest takes”或“load-bearing seams”般重复的语言怪癖了吗?通过使用 Claude 的 `MessageDisplay` 钩子(hook),你可以轻松消除这些短语,或者将其替换为任何你想要的内容。 为此,请编写一个简单的脚本(例如 `wordswap.sh`),用它解析传入的 JSON 数据,对文本执行正则表达式替换,并输出修改后的内容。脚本准备好后,使用 `chmod +x` 使其可执行,然后在 `~/.claude/settings.json` 文件的 `hooks` 配置块中进行注册。 通过将特定短语映射为你偏好的替换词,你可以自定义 Claude 的词汇,使其更自然或更幽默。配置完成后,只需重启会话,钩子就会自动拦截并过滤 Claude 的输出。

最近的一场 Hacker News 讨论指出,用户对 Claude 等大语言模型中重复、“类似垃圾信息”的词汇和可预测的语言模式越来越不满。“load-bearing”(承重/支撑性的)、“smoking gun”(确凿证据)和“belt and suspenders”(双重保险)等短语已成为一种“AI腔”的标志,令用户感到愈发刺耳。 评论者将此现象归因于以下几个因素: * **过度优化:** 人类反馈强化学习(RLHF)过程往往偏好“安全”、润色过且带有伪权威感的企业化文风,导致不同模型趋于同质化。 * **“模式扩展器”的本质:** 由于大语言模型缺乏真实经验,它们依赖统计概率高的短语,导致某些修辞手法被过度使用。 * **智能体导向:** 随着模型针对编程和智能体任务进行微调,其自然语言输出往往变得更加技术化、术语化且机械化。 提出的解决方案包括提示词工程(例如指示模型使用“穴居人”风格或重命名第一人称代词),以及构建通过正则表达式过滤陈词滥调的“去冗余”脚本。虽然有人认为这些短语是有效的速记,但普遍共识是,它们的频繁重复干扰了清晰的沟通,使 AI 的输出变成了一种令人烦躁、需要耗费脑力去解读的“谜题”。
相关文章

原文

Absolutely ripping your hair out reading Claude referring to everything as “honest takes” and "load-bearing seams"? You’re not the only one. But what if I tell you there’s a way to take this massive source of frustration and make it so ridiculous you can't but laugh at it? Or just simply fix Claude's vocabulary. I present to you, the MessageDisplay hook.

First you need a little script with some replacements set up:

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,

}

}))

put that in ~/.claude/hooks/wordswap.sh and make it executable with chmod +x ~/.claude/hooks/wordswap.sh. Then to hook it up, add it to your ~/.claude/settings.json in the hooks block like:

{

"hooks": {

"MessageDisplay": [

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

]

}

}

Hooks load at startup, so you just need to start a new session to start your new life.

I'm sure you can come up with much better and more productive replacements than me. Have fun!

联系我们 contact @ memedata.com