ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 LorcanChinnock

grudge

😤 记住你的纠正:提供保存长期偏好的选项,在每个会话提醒 Claude,并安全地修正可以替换的命令。

LorcanChinnock@LorcanChinnock

LorcanChinnock/claude-desk-neighbours/tree/main/plugins/grudge

原帖图片1
已翻译

关于这个 mod

😤 Grudge

记住你的纠正,因此你只需要说一次 "no, use pnpm"。

说出 "no, use pnpm, not npm":Grudge 会在 Claude 工作时提供保存选项,按 4 保存

/plugin install grudge@claude-desk-neighbours

工作方式

当你发送的短提示听起来像长期偏好("no, use pnpm"、"don't use default exports"、"always use the logger, not console")时,提示条会在 Claude 继续工作时提供记住它的选项:

😤 Hold a grudge? "use pnpm, not npm"                      4: Hold  5: Nah

除非你按下 Hold,否则不会记住任何内容;你可以在空提示中输入 4,也可以点击它。一次性纠正("that's the wrong file")根本不会触发选项;如果忽略某个选项,它会在你发送下一条提示时消失。

你保存的每条规则都会在该仓库的每个会话中传给 Claude。拼写或语气等个人风格规则会应用于每个仓库。

如果规则是精确的命令替换,Grudge 会在命令运行前修正它,并在工具调用下方添加说明:😤 grudge #4: npm → pnpm。它只替换完整命令(绝不会触碰 .npmrc),而且只在参数含义相同的地方替换:

| From | To | After | |---|---|---| | npm | pnpm | install, i, run, test, start | | npm | yarn | run, test, start | | npm | bun | install, i, run | | pnpm | npm | install, i, run, test, start | | yarn | npm | run, test, start | | yarn | pnpm | run, test, start | | pip | pip3 | anything | | python | python3 | anything |

这里 Claude 被要求运行 npm test,但实际以 pnpm test 运行:

一次 Bash 调用,下方说明为 "grudge #1: npm → pnpm"

面板

点击状态行中的 😤 1 grudge,或运行 /grudges。先列出此仓库的规则,再列出适用于所有地方的规则:

Grudges 面板列出 "use pnpm, not npm",保存于 3 Oct,强制执行 1×,带有 Forgive 按钮

原谅一条规则后,它会立即消失。

后台

如果提示少于 400 个字符,并且其中有看起来像纠正的内容,它会交给 Haiku 判断是否属于长期偏好。其他提示不产生费用。规则保存在插件的存储中。

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add LorcanChinnock/claude-desk-neighbours
claude plugin install grudge
原文 / README

😤 Grudge

Remembers your corrections, so you only have to say "no, use pnpm" once.

Saying "no, use pnpm, not npm": Grudge offers to hold it while Claude works, and 4 holds it

/plugin install grudge@claude-desk-neighbours

How it works

When you send a short prompt that sounds like a lasting preference ("no, use pnpm", "don't use default exports", "always use the logger, not console"), the band offers to remember it while Claude carries on working:

😤 Hold a grudge? "use pnpm, not npm"                      4: Hold  5: Nah

Nothing gets remembered unless you press Hold, either by typing 4 into an empty prompt or by clicking it. One-off fixes ("that's the wrong file") don't get an offer at all, and if you ignore an offer it goes away when you send your next prompt.

Every rule you hold is passed to Claude in every session in that repo. Rules about personal style, like spelling or tone, apply in every repo.

When a rule is an exact command swap, Grudge fixes the command before it runs and adds a note under the tool call: 😤 grudge #4: npm → pnpm. It only swaps whole commands (it never touches .npmrc), and only where the arguments mean the same thing:

| From | To | After | |---|---|---| | npm | pnpm | install, i, run, test, start | | npm | yarn | run, test, start | | npm | bun | install, i, run | | pnpm | npm | install, i, run, test, start | | yarn | npm | run, test, start | | yarn | pnpm | install, run, test, start | | pip | pip3 | anything | | python | python3 | anything |

Here Claude was asked to run npm test anyway, and it ran as pnpm test:

A Bash call with the note "grudge #1: npm → pnpm" under it

The pane

Click 😤 1 grudge in the status row, or run /grudges. Rules for this repo are listed first, then the ones that apply everywhere:

The Grudges pane listing "use pnpm, not npm", held 3 Oct, enforced 1×, with a Forgive button

Forgive a rule and it's gone straight away.

In the background

If a prompt is under 400 characters and has something in it that looks like a correction, it goes to Haiku to decide whether it's a lasting preference. Any other prompt costs nothing. Rules are kept in the plugin's store.

其他同名作品

更多类似作品