settings.json
prependPlugins
型
string[]記述場所ユーザー設定または管理者設定組織の管理対象プラグインのうち、ユーザーがインストールしたすべての mod の前に、リスト順にその mod を実行させるための設定。managed settings でこのキーを設定する際は、組込みガードを維持するためにリストに sec-default@builtin を明記する必要があり、組織のものと見なされないプラグインの id はスキップされる。
記述例
{
"extraKnownMarketplaces": {
"acme-tools": {
"source": { "source": "directory", "path": "/opt/acme/claude-plugins" }
}
},
"enabledPlugins": { "acme-guard@acme-tools": true },
"prependPlugins": ["acme-guard@acme-tools", "sec-default@builtin"]
}使い方・用途
- 組織の mod がどのユーザーの mod より先にすべてのイベントを見て、すべての結果を最後に受け取れるようにする。イベントの変更、拒否、ユーザーの mod のスキップが可能- managed settings でこのキーを設定するときは、組込みガード sec-default@builtin をリストに明記しないとガードが読み込まれなくなる。ガードはユーザーの mod の読み込みを拒否するフェイルクローズ動作を持つ- 例: { "prependPlugins": ["acme-guard@acme-tools", "sec-default@builtin"] }- 組込みガードのオプションは pluginConfigs の cc-plugin-sec-default@builtin キーの下でのみ設定でき(managed settings のみ有効)、prependPlugins では sec-default@builtin の表記も受け付ける- スコープは User または Managed
英語原文(公式ドキュメントより)
List the managed plugins whose [mods](/docs/en/plugins/mods/overview) run before every mod a user installs, in the listed order. When you set this key in managed settings, name sec-default@builtin in the list to keep the built-in guard. In managed settings, Claude Code skips an id whose plugin doesn't count as your organization's. See [Install your organization's mods and set the order](/docs/en/plugins/mods/admin#install-your-organizations-mods) for those conditions and for how the two ordering keys work together.