跳到主内容
@wquguru
精选88Latent Space(RSS)技巧与观点

Claude Mods:将注意力接口编程化,重塑人机协作

Claude Mods: Flipping the Harness Inside Out

原文
发到 X
推荐理由

深度解读 Claude Mods 这一新特性,不仅解释了其作为“注意力接口”的技术原理,还给出了具体的插件示例和工作流取舍,对从事 AI 工程实践的同学极具参考价值。

For the last few weeks I’ve used Claude Mods to mold Claude Code to my AI engineering workflow. Claude Code is great out of the box, but every engineering workflow is different. Claude Mods let you make Claude Code yours, in the way you want to pay attention.

过去几周,我一直在使用 Claude Mods 将 Claude Code 塑造成符合我 AI 工程工作流的样子。Claude Code 开箱即用就很棒,但每个工程工作流都不尽相同。Claude Mods 让你能够按照自己希望被关注的方式,将 Claude Code 变成你自己的工具。

The “paying attention” part is now the most important thing.

"被关注"的部分现在变得最为重要。

In a recent Latent Space post, The Evolution of the Agent Harness, I argued that as models absorb more of the harness into their weights, the part that’s left faces the human. It becomes the Attention Interface: the layer that decides when the agent interrupts you, what it shows you, and which decisions it needs you to make. Claude Mods are an early version of the Attention Interface, and one you can shape yourself.

在 Latent Space 最近的一篇文章《Agent Harness 的演变》中,我认为随着模型将越来越多的 harness(框架/编排层)吸收进其权重中,剩余的部分便面向人类。它变成了注意力接口(Attention Interface):决定代理何时打断你、向你展示什么以及需要你做哪些决策的层级。Claude Mods 是注意力接口的早期版本,而且你可以亲自塑造它。

Here’s my bet: ultimately, the harness becomes a platform that other companies build on, with models as the engine. Just as the browser became a platform for web apps, the harness could become a platform for the interfaces between people and agents.

我的预测是:最终,harness 将成为一个平台,其他公司在此基础上构建,而模型作为引擎。正如浏览器成为了 Web 应用的平台,harness 也可能成为人与代理之间接口的平台。

Claude Mods: What is it?

Claude Mods:它是什么?

A mod is a Claude Code plugin that consists of TypeScript or JavaScript functions that run inside Claude Code. These functions customize the behavior and appearance of the interface in the CLI and Desktop. Mods respond to events, like a prompt, tool call or interface render. They can observe the event, modify how it’s rendered, and handle it in place of the default behavior.

Mod 是一种 Claude Code 插件,由在 Claude Code 内部运行的 TypeScript 或 JavaScript 函数组成。这些函数定制 CLI 和桌面端界面的行为与外观。Mod 会响应事件,例如提示词、工具调用或界面渲染。它们可以观察事件、修改渲染方式,并替代默认行为来处理该事件。

Claude Mods are middleware for the agent harness. They inject code that changes Claude Code’s execution and rendering flow, changing how the application behaves at runtime.

Claude Mods 是 agent harness 的中间件。它们注入代码以改变 Claude Code 的执行和渲染流程,从而改变应用程序在运行时的行为。

Claude Mods let the human and the agent build the human-facing part of the harness together. You can now work with Claude to design how Claude works with you. That is the essence of the “Attention Interface.”

Claude Mods 让人类和代理共同构建 harness 中面向人类的部分。你现在可以与 Claude 合作,设计 Claude 如何与你协作。这正是“注意力接口”的本质。

The harness reversal

Harness 的反转

The agent harness started as an interface between the agent and the machine it runs on. It lets you prompt the agent and the agent then sends commands, edits files and calls tools. Now it’s gradually becoming a way for the agent to interface with the human.

Agent harness 最初是代理与其运行所在机器之间的接口。它允许你向代理发出提示,然后代理发送命令、编辑文件和调用工具。现在,它正逐渐转变为代理与人类交互的一种方式。

Claude Mods let you reverse the direction of the harness. Rather than the harness pointing from the agent to the machine, you point it from the agent to the human operator, and the harness becomes a way to interface with human attention.

Claude Mods 让你反转了 harness 的方向。与其让 harness 从代理指向机器,不如让它从代理指向人类操作员,这样 harness 就变成了与人类注意力交互的方式。

Claude Mods make the human layer programmable, by the human who uses Claude.

Claude Mods 使 harness 中的人类层变得可编程,且由使用 Claude 的人类来编程。

Claude can also build mods for you. Claude Code has a built-in skill that teaches it how to build mods, so you can ask for the mod you want in plain language and Claude will build it.

Claude 还可以为你构建模组。Claude Code 内置了一项技能,教会它如何构建模组,因此你可以用自然语言描述你想要的模组,Claude 就会为你构建出来。

Mods in practice

模组实践

Some of Claude Code’s own features are already mods. Anthropic has shipped six of them built-in. You can see these by running /plugin and opening Installed, where they’re listed under Built-in:

Claude Code 的一些自身功能已经是模组了。Anthropic 已预装了六个内置模组。你可以通过运行 /plugin 并打开 Installed(已安装)选项卡来查看它们,它们会列在 Built-in(内置)下:

  • agents-md: loads AGENTS.md as project instructions.
  • diff: takes over /diff and draws its pane.
  • plugin-authoring: gives Claude the skill it uses to write mods for you.
  • sec-default: guards what your organization manages from the mods a user installs.
  • telemetry: sends the analytics records that Claude Code and its built-in mods log.
  • you-should-know: a side agent that shows a note above the prompt when it finds something you might have missed. It’s the only one that’s off by default.
  • agents-md:加载 AGENTS.md 作为项目指令。
  • diff:接管 /diff 命令并绘制其面板。
  • plugin-authoring:赋予 Claude 编写模组所需的技能。
  • sec-default:保护组织管理的范围免受用户安装的模组影响。
  • telemetry:发送 Claude Code 及其内置模组记录的遥测数据。
  • you-should-know:一个侧边代理,当发现你可能遗漏的内容时,会在提示符上方显示一条备注。它是唯一一个默认关闭的模组。

Most of these work in the background, which is interesting because it means Anthropic is building parts of Claude Code as mods — even parts you may not notice. The one I’ve turned on myself is You Should Know.

这些模组大多在后台运行,这很有趣,因为这意味着 Anthropic 正在将 Claude Code 的部分功能以模组的形式构建——甚至包括你可能注意不到的部分。我自己开启的是 You Should Know。

Here are the two mods I’ve found most useful in practice: one a built-in, and one I built myself.

以下是我在实践中发现最有用的两个模组:一个是内置的,另一个是我自己构建的。

1. You Should Know

This is a native Claude Code plugin built by Anthropic. It runs a side-agent that observes the main agent while it works and flags important information you’re likely to miss. Think about it like: tool calls and decisions that have a material impact on the output, but aren’t necessarily easily visible because they’re buried in the agent trace. It comes built into Claude Code, but it’s off until you turn it on.

这是 Anthropic 构建的原生 Claude Code 插件。它运行一个侧边代理,在主代理工作时进行观察,并标记出你可能忽略的重要信息。可以这样理解:那些对输出结果有实质性影响、但因隐藏在代理追踪日志中而不一定容易察觉的工具调用和决策。它随 Claude Code 内置,但默认处于关闭状态,直到你手动开启。

Here’s a real example. I asked Claude Code to simplify the noisy UI text in one of my personal projects. The main agent trimmed the copy on the Compare screen, installed the new build and took before-and-after screenshots. Everything looked done.

这里有一个真实案例。我要求 Claude Code 简化我个人项目中某个界面的杂乱 UI 文本。主代理精简了 Compare 屏幕上的文案,安装了新构建版本,并拍摄了修改前后的截图。一切看起来都已完成。

Then You Should Know flagged something for me. CompareView.swift, the file the agent was editing, already had uncommitted work in it — and so did about 45 other files. If I later discarded the demo edits, I’d throw away that earlier unfinished work too. Its suggestion was to commit or stash the earlier work first.

随后,You Should Know 为我标记了一些内容。CompareView.swift 是代理正在编辑的文件,其中已经存在未提交的更改——另外大约 45 个文件也是如此。如果我之后丢弃这些演示编辑,我也会同时丢失之前未完成的工作。它的建议是先提交或暂存之前的工作。

In this case, the You Should Know mod saved me from discarding work unintentionally.

在这种情况下,You Should Know 模组使我避免了无意中丢弃工作。

2. Next Steps Supervisor

This mod only runs after a turn that edited files, ran commands or made 8 or more tool calls. In the screenshot below, you’ll see six different pieces of information flagged for your attention. Next Steps Supervisor then suggests a next step to take, as a clickable button which sends the instruction as a message to Claude Code. This mod is available as part of ModSmith — an open-source Claude Code plugin I built with several different built-in mods, as well as a template Claude can use to build new mods that work together.

此 Mod 仅在编辑了文件、运行了命令或进行了 8 次或更多工具调用的回合之后运行。在下图中,你会看到六条不同的信息被标记以引起你的注意。Next Steps Supervisor 随后会建议一个下一步操作,作为一个可点击的按钮,将指令作为消息发送给 Claude Code。此 Mod 作为 ModSmith 的一部分提供——ModSmith 是一个开源的 Claude Code 插件,我构建了它,其中包含多个内置的 Mod,以及一个模板,Claude 可以利用该模板构建协同工作的新 Mod。

Attention Interfaces elsewhere

其他地方的注意力界面

Anthropic isn’t the only company that’s building an Attention Interface. Two recent products, one from OpenAI and one from Cursor, point in the same direction. Using the new ChatGPT Intelligent UI and Cursor’s PR Routing & Approval as a frame of reference shows what’s unique about Claude Mods.

Anthropic 并非唯一一家正在构建注意力界面的公司。最近两款产品,一款来自 OpenAI,另一款来自 Cursor,都指向了同一个方向。以新的 ChatGPT 智能界面和 Cursor 的 PR 路由与审批为参照,可以显示出 Claude Mods 的独特之处。

ChatGPT’s Intelligent UI

ChatGPT 的智能界面

On October 7, OpenAI shipped GPT-6 inside ChatGPT alongside a new ChatGPT interface it calls Intelligent UI. Rather than answering only in text, ChatGPT now can generate an interface as it answers: charts, maps, checklists, forms, and small tools like a bill splitter or a savings calculator. All generated on the fly by the model as a type of generative UI.

10 月 7 日,OpenAI 在 ChatGPT 中推出了 GPT-6,并附带了一个它称为“智能界面”的新 ChatGPT 界面。ChatGPT 不再仅以文本形式回答,而是可以在回答时生成界面:图表、地图、清单、表单,以及像账单分摊器或储蓄计算器这样的小工具。所有这些都由模型即时生成,作为一种生成式 UI。

Source: OpenAI’s GPT-6 announcement

来源:OpenAI 的 GPT-6 公告

In one of OpenAI’s examples, ChatGPT replies with multiple-choice follow-up questions to narrow down what you’re looking for. Think about it like: the model decides when it needs your judgment, then builds the interface for you to give it.

在 OpenAI 的一个示例中,ChatGPT 通过多项选择后续问题进行回复,以缩小你正在寻找的范围。你可以这样理解:模型决定何时需要你的判断,然后为你构建界面以便你提供反馈。

That’s an Attention Interface. The agent designs how you interact with its response.

这就是注意力界面。代理设计了你与其响应交互的方式。

But notice the difference between ChatGPT’s Intelligent UI and Claude Mods. For Intelligent UI, the model picks the interface, answer by answer, from a component library that OpenAI built. The one control mentioned at launch is turning the visuals down.

但请注意 ChatGPT 的智能界面与 Claude Mods 之间的区别。对于智能界面,模型从 OpenAI 构建的组件库中逐个回答地选择界面。发布时提到的唯一控制选项是降低视觉效果。

Cursor’s PR Routing & Approval

Cursor 的 PR 路由与审批

Cursor is working on the same problem from the other end: not one person and one answer, but a team and a stream of pull requests, more and more of them written by agents. Someone has to decide which changes deserve the attention of the human-in-the-loop.

Cursor 正从另一端解决相同的问题:不是一个人和一个答案,而是一个团队和一系列拉取请求,其中越来越多的请求由代理编写。必须有人来决定哪些更改值得人类在环(human-in-the-loop)的关注。

PR Routing & Approval makes that decision. It assigns reviewers based on code ownership and commit history, and it can auto-approve low-risk PRs. It weighs a risk score against a threshold you set, findings from Cursor’s Bugbot and Security reviewers, and policy files that live in the repo.

PR 路由与审批做出了这一决定。它基于代码所有权和提交历史分配审查者,并且可以自动批准低风险 PR。它将风险评分与你设置的阈值、来自 Cursor Bugbot 和安全审查者的发现以及存储在仓库中的策略文件进行权衡。

One rule caught my attention during research. If a PR edits an approval policy, the agent won’t use the edited version to relax review on that same PR. It reads the policy from the base branch instead. That means an agent can’t change the rules to get its own PR approved.

研究过程中有一条规则引起了我的注意。如果某个 PR(Pull Request)修改了审批策略,代理不会使用该修改后的版本来放宽对该 PR 的审查。它会从基础分支读取策略。这意味着代理无法通过更改规则来让自己的 PR 获得批准。

Cursor is also clear about the limits. Its docs say the feature “does not replace a full code review.” The point is to spend human review where it matters, not to remove it.

Cursor 也明确指出了其局限性。其文档说明该功能“不能替代完整的代码审查”。其核心在于将人工审查集中在关键之处,而非将其完全移除。

Differences between the 3 systems

这三个系统之间的差异

All three systems shape what gets your attention and how. The main difference is who gets to design the Attention Interface.

这三个系统都塑造了你的注意力被吸引的方式和程度。主要的区别在于谁有权设计注意力界面(Attention Interface)。

  • ChatGPT Intelligent UI: the model designs the interface for each answer, inside a frame the lab built. Zero setup, but little control. (I don’t believe the target user is engineers.)
  • ChatGPT 智能用户界面:模型为每个回答在实验室构建的框架内设计界面。无需设置,但控制权较少。(我认为目标用户并非工程师。)

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

关联讨论

同一事件的更多信源

相似阅读

关联信息,但可能不是同一事件