andrewli315/mod-manager
mod-manager
Claude Code 用のセッション単位の mod マネージャーです。プロンプト上のツールバーから、現在のセッションでローカルにインストールされた mod を切り替えられます。
この mod について
mod-manager は Claude Code のプロンプト上に MODS ツールバーを追加し、セッションごとにローカルインストール済み mod のオン/オフを切り替えられるようにします。既知の mod とオン/オフ状態、バージョンを一覧表示し、Enable all / Disable all と、Manage ペイン(/mods)での mod ごとの Enable/Disable および Save-as-default 操作を提供します。選択内容は session id ごとに保存され、↻ Apply ボタン(ホットキー a)で保留中の変更を適用します。新しく見つかった、まだ認識されていない mod は、決定(Enable または Keep off)するまで拒否されます。~/.claude/dev-mods、~/.claude/plugins/synced、~/.claude/plugins/marketplaces、~/.claude/skills、CLAUDE_CODE_PLUGIN_DIRS 内のフォルダー、兄弟フォルダーをスキャンします。.claude-plugin/plugin.json と modules リストを含む hooks/hooks.json があるフォルダーが mod として扱われます。plugin.register hook は各 mod がセッションに参加する前に評価し、無効な mod を拒否するため、その hooks、コマンド、ツールは読み込まれません。フォルダーを mod ディレクトリに置くか、claude --plugin-dir を使ってインストールします。ホットリロードする場合は CLAUDE_CODE_PLUGIN_DIR_WATCH=1 とともに CLAUDE_CODE_PLUGIN_DIRS に追加できます。制限は、オフにできるのがユーザー階層の mod だけであること、先に読み込まれる mod を拒否できないこと、読み込まれていない marketplace プラグインは一覧に出ないこと、モバイルではツールバーを使えないこと(/mods は動作)です。
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add andrewli315/mod-manager claude plugin install mod-manager
原文 / README
mod-manager
A per-session mod manager for Claude Code. A toolbar above the prompt lets you switch any locally installed mod on or off for the current session.
╭────────────────────────────────────────────────────────╮
│ ⬢ MODS [ Mods ▾ 3/5 on ] ● pending [ ↻ Apply ] ⚙ Manage │
╰────────────────────────────────────────────────────────╯
Features
- Dropdown toolbar above the prompt listing every mod it knows about, marked
●(on) or○(off), with versions. Pick a mod to toggle it;Enable allandDisable allare included. - Manage pane (
/modsor the⚙ Managebutton): one card per mod with Enable/Disable buttons and a★ Save as defaultbutton. - Per-session choices: selections are stored per session id. New sessions start from your saved default (everything on unless you saved otherwise).
- Apply button: a change shows a yellow
● pendingmarker until you press↻ Apply(hotkeya). mod-manageritself is locked on so you can always turn mods back on.
Hotkeys (when the bar has focus): a Apply, m Manage.
Install
Requires a Claude Code build with function-hook mods (plugin authoring support).
-
Put this folder inside your mods folder, for example
~/.claude/dev-mods/<id>/mod-manager/, and accept the "Enable hot reloading for this session?" prompt. -
Or load it directly for one session:
claude --plugin-dir /path/to/mod-manager
Make it available in every session
Add the folder to CLAUDE_CODE_PLUGIN_DIRS in the env block of ~/.claude/settings.json
(separate several folders with ; on Windows, : elsewhere). CLAUDE_CODE_PLUGIN_DIR_WATCH=1
makes long-lived sessions (the desktop app, the SDK) hot-reload it too:
{
"env": {
"CLAUDE_CODE_PLUGIN_DIRS": "/absolute/path/to/mod-manager",
"CLAUDE_CODE_PLUGIN_DIR_WATCH": "1"
}
}
New mods ask first
The first time mod-manager runs it treats every mod already present as known. After
that, a mod it has never seen is refused until you decide: the MODS bar shows a
magenta ✦ NEW MOD row with Enable and Keep off. Enable loads it right away;
Keep off records the choice for this session. Your choices are remembered, so each mod
asks once.
Where it looks for mods
~/.claude/dev-mods, ~/.claude/plugins/synced, ~/.claude/plugins/marketplaces,
~/.claude/skills, every folder in CLAUDE_CODE_PLUGIN_DIRS, and the folder beside
mod-manager. A folder counts as a mod when it has a .claude-plugin/plugin.json and a
hooks/hooks.json with a modules list. Mods that have loaded in any session are also
listed, whatever their location.
How it works
- A
plugin.registerhook sees every mod before it joins the session. Mods you switched off are refused, so none of their hooks, commands or tools load. It records each mod it sees in the plugin store so the dropdown can list it. - Sibling folders next to
mod-managerare scanned for.claude-plugin/plugin.json, so mods that never loaded still appear. ↻ Applywriteshooks/.reload. With hot reloading on, that save reloads all mods, and the refusal list is applied. Without hot reloading, changes take effect the next time mods load.
Limitations
- Only mods in the
usertier can be switched off; managed and built-in plugins are never refused. - A mod that loads before
mod-managercannot be refused by it. - The dropdown lists mods the manager has seen load plus siblings on disk. It does not scan marketplace-installed plugins that have never loaded.
- No toolbar on the mobile surface (it has no dropdown element);
/modsstill works.
Development
claude plugin validate .
Files:
| Path | Purpose |
| --- | --- |
| .claude-plugin/plugin.json | Manifest |
| hooks/hooks.json | Points at the hooks module |
| hooks/register.tsx | All hooks: register filter, toolbar, pane, /mods |
| types/index.d.ts | $.state contract (mods, disabled, isDirty) |
Contributing
Issues and pull requests are welcome. Please run claude plugin validate . before
submitting.
License
同名の他の作品
- mod-managermishgoldenberg · ★ 3
