How to stop Claude from saying load-bearing

How to stop Claude from saying load-bearing

如何阻止 Claude 使用“load-bearing”(承重)一词

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. 当你看到 Claude 把什么都称为“honest takes”(诚恳的看法)和“load-bearing seams”(承重接缝)时,是不是气得想抓狂?你不是一个人。但如果我告诉你,有一种方法可以将这种巨大的挫败感变得荒谬可笑,让你忍不住发笑呢?或者,干脆直接修正 Claude 的词汇库。

I present to you, the MessageDisplay hook. First you need a little script with some replacements set up: 我向你介绍 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,
    }
}))

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: 将上述代码保存到 ~/.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 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! 钩子会在启动时加载,所以你只需要开启一个新的会话,就能开启你的“新生活”了。我相信你能想出比我更好、更有成效的替换词。玩得开心!

Written by Johanna Larsson. Thoughts on this post? Find me on Bluesky at @jola.dev. 作者:Johanna Larsson。对这篇文章有什么想法?欢迎在 Bluesky 上关注我:@jola.dev。