How to add your own high-risk actions

~4 min · WorkBuddy · Claude · Cline

如何实现自定义高危词

约 4 分钟 · WorkBuddy · Claude · Cline

Out of the box, memory-lock gates the common destructive verbs — delete, money, reset, credentials, bulk. But your business has its own “don’t do this without me” moments: retract a post, merge a channel, bill a client. You don’t need an update for that. Here is how to bring your own actions under the same gate — done on your side, nothing changes on the server.

Why this works without a “custom keyword” feature

There are two different steps in the loop:

  • detect_high_risk_action suggests “this looks risky, should you gate it?” — it runs locally against a built-in list.
  • verify_dynamic_code authorises — it checks that a real person approves before you proceed. It doesn’t care about the wording of the action at all.
The key idea: the gate verifies the person, not the wording. So “which actions get gated” is fully up to you. You don’t edit any keyword list — you simply tell your AI, in your own words, which of your actions should always wait for your 6-digit code.

Step 1 · Say it out loud in the conversation

The simplest path — no files to edit. When you first ask your AI to watch a specific action, state the rule yourself:

From now on, treat “retract a post” as a high-risk action.
Before you retract a post, show me exactly what you are
about to do, call verify_dynamic_code, and only proceed if I
give you the current 6-digit code from the memory-lock mini
program.

Most assistants keep this in the session while it stays open. To make it persist across sessions, move it one level deeper (next).

Step 2 · Move it to something that persists

So the rule survives restarts, put it where the client reads standing rules:

Client
Where a standing rule lives
WorkBuddy
an active skill or the client-level instruction/memory that loads in every session
Claude Desktop
a CLAUDE.md / project memory file read at the start of each session
Cline (VS Code)
the project rules file (.clinerules) or a system/persona prompt
STANDING RULE — my high-risk watch-list:
retract a post, merge the upload folder, bill a client.
For any of these: pause, show the command, call
verify_dynamic_code, and run only after my 6-digit code
passes. Never treat a watch-list action as “safe” just
because it is not in the built-in detector.

Step 3 · Test it on a real-but-safe case

  1. Ask it to do a watch-list action on a throwaway item (e.g. “retract the draft post test-1”).
  2. It should stop, show you the exact step, and ask for your current code.
  3. Open the mini program, read the 6-digit code, and let it verify. Only then should it act.

If it just runs: your wording didn’t stick. Restate it (Step 1) in the same sentence, and check Step 2 actually loads before the session.

One rule of thumb to avoid over-blocking: don’t watch-list read-only or everyday actions. Save the gate for actions you could not undo and would genuinely not want your AI to do alone (deleting, publishing outward, moving money).
That’s it. Your own actions now ride the same human gate — decided by you, executed locally, approved by your phone.

默认情况下,记忆之锁能把常见的破坏性动词挡住——删除、资金、重置、权限、批量。但你的业务总有自己「没我点头不许做」的时刻:撤回投稿合并渠道给客户开账单。这些你不需要等一次更新。下面讲怎么让你的专属动作也走进同一条闸 —— 全程在你本机做,服务器端什么都不用动。

为什么不需要「自定义词库」这个功能

这套流程里其实是两步,性质不一样:

  • detect_high_risk_action 负责建议:“这看着有风险,要不要拦?”——它在本地对着内置清单判断。
  • verify_dynamic_code 负责授权——它只确认「是不是有真人在放行」,根本不在乎动作本身用的是什么词。
关键点:这道闸验的是,不是措辞。所以“哪些动作要拦”完全由你定。你不需要去改任何词表——只需用你自己的话告诉你的 AI:哪些动作,永远要先等你报那 6 位码。

第 1 步 · 先在对话里亲口说清楚

最快的方式——一个文件都不用改。第一次让 AI 盯某个专属动作时,自己把规则说清楚:

从现在起,把「撤回投稿」当作高危操作。
撤回一篇投稿前,先把你准备做什么完整列给我,
调用 verify_dynamic_code 校验,只有我从小程序
报出当前 6 位动态口令并通过,你才能执行。

多数助手会在当前会话里一直记得它。想让它在重启之后仍然有效,就再往下放一层(见下一步)。

第 2 步 · 移到能跨会话留存的地方

让规则扛得住重启,把它放进客户端每次都会读的「常驻规则」里:

客户端
常驻规则放哪
WorkBuddy
一个启用的 skill,或客户端级指令/记忆,让每个会话都自动带上
Claude Desktop
CLAUDE.md 或项目记忆文件,会话开始时读取
Cline(VS Code)
项目规则文件(.clinerules)或系统/人格提示词
常驻规则 —— 我的高危关注清单:
撤回投稿、合并上传文件夹、给客户开账单。
碰到以上任一动作:先暂停,列出要执行的命令,
调用 verify_dynamic_code,只有我的 6 位动态口令
通过才能动手。绝不要因为某动作不在内置词库里,
就当它是「安全」的直接执行。

第 3 步 · 拿一个不伤真数据的样例试一遍

  1. 让它对一个随手可弃的东西做关注清单里的动作(比如“撤回草稿 test-1”)。
  2. 它应当先停下,把确切步骤列给你,然后找你要当前动态口令。
  3. 打开小程序报出 6 位码,让它校验,通过之后才动手。

要是它直接就干了:说明你的话没被记住。用第 1 步的原话重说一遍,并检查第 2 步的设置确实在这个会话开始前加载了。

别过度拦截的提醒:不要在清单里放只读、日常的操作。把闸留给那些不可撤销、又确实不希望 AI 独自去做的动作(删除、对外发布、动钱)。
就这样。你的专属动作从此走上同一道人形闸 —— 由你决定、在你本机执行、用你的手机放行。