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

查看原始來源 ↗

更多類似作品