Anthropic 为 Claude Code 发布基于插件的 Mods 系统,开发者可用 JavaScript 或 TypeScript 函数挂钩工具调用、用户提示和 UI
Anthropic 发布了 Claude Code 的“Mods”,实质上是一种直接在工具中运行的中间件。基于插件的系统:https://code.claude.com/docs/en/plugins/mods/overview 允许开发者改变 Claude Code 的外观和功能。Mods 是 JavaScript 或 TypeScript 函数,可挂钩到特定事件,从工具调用和用户提示到 UI 渲染。这意味着开发者可以在聊天界面旁添加自定义面板、拦截工具调用或创建全新的命令。公司表示,一些内置功能,如:https://code.claude.com/docs/en/commands /diff 命令:https://code.claude.com/docs/en/commands 已经作为 Mods 构建好。
Anthropic 在 GitHub 上提供了示例 Mods:https://github.com/anthropics/claude-code-playground/tree/main/claude-code/mods。Mods 以用户权限运行,并未被沙箱隔离,因此 Anthropic 警告用户仅从可信来源安装。它们可在 CLI、桌面应用及部分 VS Code 扩展中使用。组织可以控制允许加载的 Mods。
首个官方 Mod 插件名为“你应该知道(You Should Know)”:https://x.com/ClaudeDevs/status/2106118517447876618 它启动一个独立代理,监视 Claude 的输出,并在发现用户可能错过的重要信息时发送“提醒(Heads up)”消息。你可以使用 /plugin enable cc-plugin-you-should-know@builtin 开启它。
保持对 AI 的关注。清晰、有用、无废话。
关注 The Decoder 获取 AI 新闻、背景故事和专家分析。
解码器:https://the-decoder.com/
Anthropic released "Mods" for Claude Code, essentially middleware that runs directly inside the tool. The plugin-based system:https://code.claude.com/docs/en/plugins/mods/overview 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:https://code.claude.com/docs/en/commands /diff command:https://code.claude.com/docs/en/commands are already built as Mods, the company says.
Anthropic provides sample Mods on GitHub:https://github.com/anthropics/claude-code-playground/tree/main/claude-code/mods. 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.":https://x.com/ClaudeDevs/status/2106118517447876618 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 . Ad Ad
Stay in the loop on AI. Clear, useful, no fluff.
Follow The Decoder for AI news, background stories and expert analyses.
The Decoder:https://the-decoder.com/