1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

複数プラグインを marketplace.json で管理する実装パターン

1
Posted at

Claude Code のプラグインを 1 つ作った後、2 つ目以降をどう追加し、どう 1 つのマーケットプレイスとして束ねるか。本稿は公式ドキュメント(2026-10-16 検証)で確認できた marketplace.json の仕様と、バリデーション・インストール時の挙動を、ドキュメントの構造順に整理します。

marketplace.json の必須フィールド

marketplace.json のトップレベルには name、owner、plugins の 3 つが必須です (出典 [1])。plugins は配列で、各エントリオブジェクトには name と source の 2 つが必要です (出典 [1])。

The file requires a name , an owner , and a plugins array. Each object in plugins is a plugin entry and needs a name and a source .

複数プラグインを管理する場合、plugins 配列にエントリを並べていくのが基本形になります。

インストール ID はエントリ名から決まる

プラグインのインストール ID は、エントリ名・@・マーケットプレイス名を連結した形です (出典 [1])。利用者が実際に打つのはこの ID になります。

The install id is the entry's name , an @ , and the marketplace name .

source の相対パスの起点

相対パス source の起点はマーケットプレイスルート、すなわち .claude-plugin/ を含むディレクトリです (出典 [1])。したがって source に書く ./plugins/... は、このルートから見た相対位置を指します。

.. を含むパスは validate で無効になる

source に .. を含むエントリは claude plugin validate が無効と報告し、メッセージは Path contains ".." で始まります (出典 [1])。

A path with .. : claude plugin validate reports the entry as invalid. The message begins Path contains "..":

存在しないパスは install で失敗する

存在しないディレクトリへの相対パスは validate をパスしますが、claude plugin install は Source path does not exist: で失敗します (出典 [1])。検証と実インストールで検出タイミングが異なる点に注意が必要です。

エントリ名とマニフェスト名のずれ

marketplace.json のエントリ名と plugin.json のマニフェスト名が異なるとき、マニフェスト名でインストールすると Plugin not found エラーが返ります (出典 [1])。

When the two names differ and someone installs by the manifest name, Claude Code reports Plugin "" not found in marketplace ""

相対パスソースの更新反映

相対パス source を使う場合、プラグインファイルの編集は次セッション開始時または /reload-plugins 実行時に反映され、バージョン番号は変化しません (出典 [1])。

予約済みのマーケットプレイス名

claude-plugins-official のような公式マーケットプレイス名はバリデーションを通りますが、追加時に Claude Code が拒否し、The name '' is reserved for official Anthropic marketplaces で始まるメッセージが表示されます (出典 [1])。

source の種類

source には少なくとも url(任意ホストの git リポジトリ)、archive(HTTPS で取得する zip)、npm(npm パッケージ)、command(インストール先マシンでコマンドを実行して生成するディレクトリ)の 4 種類が指定できます (出典 [1])。git リポジトリのサブディレクトリを使う git-subdir ソースでは、url に git URL または owner/repo 形式の GitHub 省略記法が使えます (出典 [1])。

組織への強制適用

管理者はマーケットプレイスを組織の全マシンに強制適用できます (出典 [1])。具体的な適用手段や設定項目は、本稿が照合した公式ドキュメントの範囲には明示されていません。

References

[1] https://code.claude.com/docs/en/plugin-marketplaces

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?