ClaudeModsClaude Code 模组目录
☰
● 0 人在线 · 浏览 0 次
+ 提交作品
← 返回作品集
教程资源 · 开发与调试 / 其他 / 安全与隐私 / 工具与集成 / 工作流与 CI

Claude Code 推出 Mods:用 TypeScript 插件自定义行为与界面 — Claude Code 插件 · ClaudeMods

回报这个作品这是你的作品?认领

在 ClaudeMods 了解这款 Claude Code 插件,查看原始来源与所需权限。 Anthropic 为 Claude Code 引入 Mods:以 TypeScript 模块形式打包在插件中,可钩取工具调用、提示、轮次、斜杠命令与 UI 绘制等事件并重写或拦截;用 /plugin 安装,需 2.1.287+。官方示例含

SShakthi@v_shakthi

1/

Claude Code now takes mods. You change how it behaves, customize the UI, and swap in your own features. A mod is a small TypeScript module that ships inside a plugin. It hooks events as they happen: tool calls, prompts, turns, slash commands, and every UI draw. It can watch an event, rewrite it, or answer it without passing it on. Install with /plugin in the CLI or the desktop app. Write one in a few lines of TypeScript, or have Claude build it and hot reload it in the session. You need Claude Code 2.1.287 or later. Mods are on by default. Anthropic shipped three examples. Token Weather sits above the prompt and forecasts your context window: how full it is, plus a sparkline of the last 12 turns. Blast Radius catches risky shell commands such as rm -rf, git reset --hard, and a force push before they run, then shows what the command would touch in a side pane. Replay Theater records every file edit Claude makes in a turn. Run /replay and step through the diffs one at a time. Anthropic already used mods to build /diff and AGENTS md support. Keep yours private, or submit them to the Claude directory. Sample mods are in the Claude Code Playground repo. Mods run with the same access to your machine as Claude Code. Install only from sources you trust. On Team and Enterprise plans, a built-in mod loads first and blocks overrides of permission deny rules. Getting started: https://claude.dev/blog/getting-started-with-claude-code-mods/ #ClaudeCode #ClaudeAI #Anthropic #DeveloperTools #TypeScript #AIEngineering #DevTools #Plugins

已翻译

关于这个 mod

Claude Code 现已支持 Mods:一种随插件发布的小型 TypeScript 模块,可改变 Claude Code 的行为、定制界面并替换功能。Mod 可以钩取实时发生的事件——工具调用、提示(prompts)、轮次(turns)、斜杠命令以及每次 UI 绘制——并能监听、重写或在不再向下传递的情况下直接应答该事件。

安装方式:在 CLI 或桌面应用中使用 /plugin;编写只需几行 TypeScript,也可让 Claude 生成并在会话中热重载。要求 Claude Code 2.1.287 或更高版本,Mods 默认开启。

Anthropic 提供了三个示例:

  • Token Weather:位于提示框上方,预测上下文窗口占用情况(有多满)并给出最近 12 轮的迷你趋势图。
  • Blast Radius:在 rm -rf、git reset --hard、强制推送等危险 shell 命令执行前拦截,并在侧栏展示该命令会影响哪些内容。
  • Replay Theater:记录 Claude 在一轮中做的每次文件编辑,运行 /replay 可逐个查看 diff。

Anthropic 已用 Mods 实现了 /diff 和 AGENTS.md 支持。Mod 可保持私有,也可提交到 Claude 目录;示例 Mod 位于 Claude Code Playground 仓

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

在 CLI 或桌面应用中使用 /plugin
原文 / README

Claude Code now takes mods.

You change how it behaves, customize the UI, and swap in your own features. A mod is a small TypeScript module that ships inside a plugin. It hooks events as they happen: tool calls, prompts, turns, slash commands, and every UI draw. It can watch an event, rewrite it, or answer it without passing it on.

Install with /plugin in the CLI or the desktop app. Write one in a few lines of TypeScript, or have Claude build it and hot reload it in the session. You need Claude Code 2.1.287 or later. Mods are on by default.

Anthropic shipped three examples.

Token Weather sits above the prompt and forecasts your context window: how full it is, plus a sparkline of the last 12 turns.

Blast Radius catches risky shell commands such as rm -rf, git reset --hard, and a force push before they run, then shows what the command would touch in a side pane.

Replay Theater records every file edit Claude makes in a turn. Run /replay and step through the diffs one at a time.

Anthropic already used mods to build /diff and AGENTS md support. Keep yours private, or submit them to the Claude directory. Sample mods are in the Claude Code Playground repo.

Mods run with the same access to your machine as Claude Code. Install only from sources you trust. On Team and Enterprise plans, a built-in mod loads first and blocks overrides of permission deny rules.

Getting started: https://claude.dev/blog/getting-started-with-claude-code-mods/

#ClaudeCode #ClaudeAI #Anthropic #DeveloperTools #TypeScript #AIEngineering #DevTools #Plugins

查看原始来源 ↗

更多类似作品