Claude Code 推出 Mods 系统,允许开发者从内部改写该 AI 编程工具
原标题:Claude Code's new Mods system lets developers rewrite the AI coding tool from the inside
AI 摘要
Anthropic 为 Claude Code 推出名为 Mods 的插件式中间件系统,允许开发者通过 JavaScript 或 TypeScript 函数挂钩工具调用、用户提示和 UI 渲染等事件,从而修改该 AI 编程工具的外观与行为。官方称 /diff 等内置功能已用 Mods 实现,并在 GitHub 提供示例。Mods 以用户权限运行且未沙箱化,Anthropic 提醒仅从可信来源安装,企业可控制允许加载的 Mods。首个官方插件 You Should Know 会启动独立 agent 监控 Claude 输出并提醒用户可能遗漏的重要信息。
正文节选
Claude Code's new Mods system lets developers rewrite the AI coding tool from the inside 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