跳到正文
原文
The Decoder· Matthias Bastian·· 12 天前精选AI 评分81

Anthropic 为 Claude Code 推出 Mods 插件系统

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

AI 导读

Anthropic 为 Claude Code 发布 Mods,这是一套直接运行在工具内部的插件式中间件,开发者可用 JavaScript 或 TypeScript 函数挂钩工具调用、用户提示词和 UI 渲染等事件,添加自定义面板、拦截工具调用或接入新命令。

推荐理由

原文给出 Mods 的事件钩子范围、内置示例与安全限制,读者可据此判断 Claude Code 的可改造边界。

正文 · 原文

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 · the-decoder.com