跳到正文
The Decoder:AI News· Matthias Bastian·· 3 小时前AI 评分71

Anthropic 为 Claude Code 推出 Mods 系统,可用 JS/TS 函数改写工具内部行为

Claude Code's new Mods system lets developers rewrite the AI coding tool from the inside

AI 导读

Anthropic 为 Claude Code 发布基于插件的 Mods 系统,开发者可用 JavaScript 或 TypeScript 函数挂钩工具调用、用户提示和 UI 渲染等事件,添加自定义面板、拦截工具调用或新增命令。

正文

Anthropic released "Mods" for Claude Code, essentially middleware that runs directly inside the tool. The plugin-based system lets developers change how Claude Code looks and works. Mods are JavaScript or TypeScript functions that hook into specific events, from tool calls and user prompts to UI rendering. That means developers can add custom panels next to the chat, intercept tool calls, or wire up entirely new commands. Some built-in features like the /diff command are already built as Mods, the company says.

Anthropic provides sample Mods on GitHub. Mods run with the user's permissions and aren't sandboxed, so Anthropic warns users to only install them from trusted sources. They work in the CLI, the desktop app, and partly in the VS Code extension. Organizations can control which Mods are allowed to load.

The first official Mod plugin is called "You Should Know." It spins up a separate agent that watches Claude's output and sends a "Heads up" message when it spots important information users might have missed. You can turn it on with /plugin enable cc-plugin-you-should-know@builtin.

AI News Without the Hype – Curated by Humans

Subscribe to THE DECODER for ad-free reading, a weekly AI newsletter, our exclusive "AI Radar" frontier report six times a year, full archive access, and access to our comment section.

来源:The Decoder:AI News · the-decoder.com