ClaudeMods
☰
JA
● 0 人がオンライン ・閲覧 0 回
スポンサー作品を投稿
GitHub リポジトリ · 投稿者 KilimcininKorOglu

mod-doctor

マーケットプレイスのクローンがすでに新しいバージョンを提供しているインストール済みプラグインに名前を付け、ギャップを埋めるためにClaude プラグイン更新コマンドを出力する Claude Code MOD。

KilimcininKorOglu@KilimcininKorOglu

KilimcininKorOglu/claude-code-mods/tree/main/plugins/mod-doctor

翻訳済み

この mod について

モッドドクター

claude plugin marketplace update を実行すると、クローンが新しいバージョンを取得し、インストールされたプラグインは、one ごとに claude plugin update を実行するまで元の場所に残ります。この 2 番目のステップは忘れられがちです。この MOD は、各マーケットプレイスのインストールされているプラ​​グインに名前を付けます。そのローカル クローンはすでに新しいバージョンを提供しているため、プラグインではなくマーケットプレイスに対して実行したアップデートが見逃されることはありません。

何をするのか

1。各セッションの開始時、各メインループ ターンの終了時、および対話型セッションの各 60 で、MOD はホストがディスク上に保持しているものを読み取ります。

  • ~/.claude/plugins/installed_plugins.json (ホストが読み取るように、CLAUDE_CONFIG_DIR が設定されている場合は代わりに $CLAUDE_CONFIG_DIR/plugins/)。スコープごとに各 <plugin>@<marketplace> のインストールされたバージョンに名前を付けます。つまり、ユーザー インストール、および名前が付けられたプロジェクトのプロジェクト インストールです。別のプロジェクトのプロジェクト インストールは読み取られず、 update available sidebar 0.4.1 → 0.5.0 turkish-native 1.0.0 → 1.2.0 claude plugin update sidebar@kilimcininkoroglu-mods turkish-native@turkish-native Q インストールでは古いバージョンが強制的に比較されます。

  • クローン内の各マーケットプレイス独自の .claude-plugin/marketplace.json。これは、そのプラグインがその内部のどこにあるかを示します (one マーケットプレイスはそのプラグインを plugins/ の下に保持し、別のマーケットプレイスはそのルートにある one プラグインです)。

  • そのプラグインの .claude-plugin/plugin.json、クローンが提供するバージョン。 2。各パーツの番号によってインストールされているものと提供されているものを比較するため、0.10.0 は 0.9.0 よりも新しいものとしてカウントされます。 Two バージョンは数値が等しいものとしてカウントされるため比較できません。そのため、別の形状のバージョンが更新を要求することはありません。 3。 サイドバー が開いている間、背後にあるプラグインは one update available セクションであり、セッション中は残ります。

    update available sidebar 0.4.1 → 0.5.0 turkish-native 1.0.0 → 1.2.0 claude plugin update sidebar@kilimcininkoroglu-mods turkish-native@turkish-native

各行では、インストールされているバージョンが淡く表示され、提供されているバージョンがジャンプによって色分けされています。新しいメジャー バージョンは赤、新しいマイナー バージョンは黄色、新しいパッチは緑です。 8 行目以降の行は one の淡い行でカウントされ、その下の淡い更新コマンドは最初の eight 行のプラグインに名前を付けます。サイドバーを閉じても、その MOD がインストールされていない場合でも、同じ結果が one トランスクリプト行になります。 4。インストールされているすべてのプラグインがそのクローンのバージョンである間は何も描画されず、そのことが真実になるとすぐにセクションは削除されます。 5。各ターンの終了時の測定と 60 の one は、セッション開始時に捕捉できないものを捕捉します。つまり、このセッションが開いている間に別のウィンドウで更新したプラグインまたはマーケットプレイス、およびこの MOD が最初に計測したときに独自のプラグインがまだペインを開いていなかったサイドバーです。 60 のメジャーは、このセッションがアイドル状態である間もそれらを捕捉します。調査結果は一度記録に残ります。同じ結果をその後測定しても何も語られません。 6。 /mod-doctor はその場で再度測定し、設定、スコープ、保持しているプラ​​グインの数と背後にあるプラグインを出力します。 /mod-doctor marketplace <name> は one マーケットプレイスに絞り込み、marketplace all は再び広げます。クローンは最後の claude plugin marketplace update と同じくらい新しいので、この MOD は「GitHub に新しいバージョンはありますか?」ではなく「マーケットプレイスを更新しました。プラグインも更新しましたか?」と答えます。

コマンド

/mod-doctor                        the setting, the scope, and every plugin that is behind
/mod-doctor on | off               on by default
/mod-doctor marketplace my-mods    that marketplace alone
/mod-doctor marketplace all        every marketplace the host cloned; the default, stored across sessions

インストール

claude plugin marketplace add KilimcininKorOglu/claude-code-mods
claude plugin install mod-doctor@kilimcininkoroglu-mods

関数フックは早期アクセスです。Claude 2.1.288 をコード化し、後でデフォルトでロードするため、オンにするものは何もありません。

インストール後

1。Claude Codeを再起動します。 2。プラグインごとの行に サイドバー mod をインストールします。これがないと、MOD は代わりに one トランスクリプト行を書き込みます。

到達できるもの

Claude Code 2.1.284 の claude plugin validate で検証済み:

❯ ./register.ts hooks: session.start, command.run{command=mod-doctor}, turn.complete
❯ ./register.ts calls: $.clock.every, $.command.register, $.env.get, $.fs.read (via readText), $.sidebar.clear (via clearShown), $.sidebar.set (via toPerson), $.store.get (via readScope, readSettings), $.store.set (via setEnabled, setScope), $.ui.log (via toPerson)
❯ ./register.ts env writes: nothing
❯ ./register.ts env reads: CLAUDE_CONFIG_DIR, HOME

L1 に到達すると、ファイルが読み取られます。

1. Reads:    CLAUDE_CONFIG_DIR, HOME, the host's install record, each marketplace clone's manifest, and one plugin.json per installed plugin. No project file, no prompt, no transcript.
2. Runs:     nothing; the update command is text for the person to run
3. Sends:    nothing to the model and nothing to the network; the rows are for the person only
4. Persists: in $.store, the on/off setting and the scope
5. Hostile input: every file is read as data, the versions are compared as numbers, and a file of another shape is skipped without a finding

制限

  • クローンはメジャーであり、アップストリーム リポジトリではありません。最初に claude plugin marketplace update <marketplace> を実行しないと、MOD は新しい情報を何も報告しません。
  • コミット sha によってプラグインをバージョン管理するマーケットプレイス (公式の one は行います) は、two sha は数値として比較できないため、何も報告しません。
  • マーケットプレイスが git サブディレクトリとして別のリポジトリからプルするプラグインは、クローンにバージョンがないため、スキップされます。
  • 実行中のセッションが新しいコードをロードしたかどうかは示されません。セッション中の claude plugin update は、/reload-plugins または再起動するまで、古いコードがロードされたままになります。
  • 何も更新されません。 MOD はコマンドに名前を付けます。実行するのはあなたのものです。

開発

make install     # eslint, typescript-eslint, typescript
make lint        # complexity limit 10, the build fails above it
make typecheck   # needs .claude/types/ from /plugin-types
make validate
make test        # claude plugin test

インストール

まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。

claude plugin marketplace add KilimcininKorOglu/claude-code-mods
claude plugin install mod-doctor
原文 / README

mod-doctor

You run claude plugin marketplace update, the clone gets the new versions, and the installed plugins stay where they were until you also run claude plugin update for each one. That second step is easy to forget. This mod names each installed plugin, of every marketplace, whose local clone already offers a newer version, so an update you ran for the marketplace and not for the plugin does not stay unnoticed.

What it does

  1. At each session start, at the end of each main-loop turn, and every 60 s in an interactive session, the mod reads what the host keeps on disk:

    • ~/.claude/plugins/installed_plugins.json ($CLAUDE_CONFIG_DIR/plugins/ instead when CLAUDE_CONFIG_DIR is set, as the host reads it), which names the version installed of each <plugin>@<marketplace> per scope: the user install, and a project install for the project it names. A project install of another project is not read, and of two installs in force the older version is compared;
    • each marketplace's own .claude-plugin/marketplace.json in its clone, which says where that plugin sits inside it (one marketplace keeps its plugins under plugins/, another is one plugin at its root);
    • that plugin's .claude-plugin/plugin.json, the version the clone offers.
  2. It compares installed against offered by the numbers of each part, so 0.10.0 counts as newer than 0.9.0. Two versions it cannot compare as numbers count as equal, so a version of another shape never asks for an update.

  3. While the sidebar is open, the plugins that are behind are one update available section that stays for the session:

    update available
    sidebar 0.4.1 → 0.5.0
    turkish-native 1.0.0 → 1.2.0
    claude plugin update sidebar@kilimcininkoroglu-mods turkish-native@turkish-native
    

    In each row the installed version is faint and the offered version is coloured by the jump: a new major version red, a new minor version yellow, a new patch green. The rows past the eighth are counted in one faint line, and the faint update command under them names the plugins of the first eight rows. With the sidebar closed, or without that mod installed, the same finding is one transcript line.

  4. Nothing is drawn while every installed plugin is at its clone's version, and the section is taken down as soon as that is true.

  5. The measure at each turn's end and the 60 s one catch what the session start cannot: a plugin or a marketplace you updated in another window while this session was open, and a sidebar whose own plugin had not opened its pane yet when this mod first measured. The 60 s measure also catches them while this session is idle. The finding reaches the transcript once; a later measure of the same finding says nothing.

  6. /mod-doctor measures again on the spot and prints the setting, the scope, how many plugins it holds and which are behind. /mod-doctor marketplace <name> narrows it to one marketplace, and marketplace all widens it back.

The clone is only as new as the last claude plugin marketplace update, so this mod answers "I updated the marketplace, did I update the plugins?", not "is there a newer version on GitHub?".

Command

/mod-doctor                        the setting, the scope, and every plugin that is behind
/mod-doctor on | off               on by default
/mod-doctor marketplace my-mods    that marketplace alone
/mod-doctor marketplace all        every marketplace the host cloned; the default, stored across sessions

Install

claude plugin marketplace add KilimcininKorOglu/claude-code-mods
claude plugin install mod-doctor@kilimcininkoroglu-mods

Function hooks are early access. Claude Code 2.1.288 and later load them by default, so there is nothing to switch on.

After installing

  1. Restart Claude Code.
  2. Install the sidebar mod for the per-plugin rows. Without it the mod writes one transcript line instead.

What it can reach

Validated with claude plugin validate on Claude Code 2.1.284:

❯ ./register.ts hooks: session.start, command.run{command=mod-doctor}, turn.complete
❯ ./register.ts calls: $.clock.every, $.command.register, $.env.get, $.fs.read (via readText), $.sidebar.clear (via clearShown), $.sidebar.set (via toPerson), $.store.get (via readScope, readSettings), $.store.set (via setEnabled, setScope), $.ui.log (via toPerson)
❯ ./register.ts env writes: nothing
❯ ./register.ts env reads: CLAUDE_CONFIG_DIR, HOME

Reach L1, it reads files.

1. Reads:    CLAUDE_CONFIG_DIR, HOME, the host's install record, each marketplace clone's manifest, and one plugin.json per installed plugin. No project file, no prompt, no transcript.
2. Runs:     nothing; the update command is text for the person to run
3. Sends:    nothing to the model and nothing to the network; the rows are for the person only
4. Persists: in $.store, the on/off setting and the scope
5. Hostile input: every file is read as data, the versions are compared as numbers, and a file of another shape is skipped without a finding

Limits

  • The clone is the measure, not the upstream repository. Run claude plugin marketplace update <marketplace> first, or the mod reports nothing new.
  • A marketplace that versions its plugins by commit sha (the official one does) reports nothing, because two shas are not comparable as numbers.
  • A plugin the marketplace pulls from another repository as a git subdirectory has no version in the clone, so it is skipped.
  • It does not say whether the running session loaded the new code. A claude plugin update during a session leaves the old code loaded until /reload-plugins or a restart.
  • Nothing is updated for you. The mod names the command; running it is yours.

Development

make install     # eslint, typescript-eslint, typescript
make lint        # complexity limit 10, the build fails above it
make typecheck   # needs .claude/types/ from /plugin-types
make validate
make test        # claude plugin test

関連作品