環境変数

CLAUDE_CODE_PLUGIN_CACHE_DIR

プラグインのルートディレクトリを上書きする。名前に反して、これはキャッシュ自体ではなく親ディレクトリを設定するものであり、マーケットプレイスとプラグインキャッシュはこのパスの下のサブディレクトリに置かれる。デフォルトは ~/.claude/plugins

使い方・用途

  • プラグインのキャッシュやマーケットプレイスの保存先をホームディレクトリ以外に置きたいときに、プラグインルートの親ディレクトリを指定する
  • 実行時にクローンできないコンテナイメージや CI ランナー向けに、ビルド時にプラグインをシードディレクトリへ配置する運用でプラグインルートを指定する
  • OneDrive フォルダなどホームディレクトリ配下で Windows の EEXIST エラーが発生する環境において、プラグインディレクトリの配置先を変更して問題を回避する
英語原文(公式ドキュメントより)

Override the plugins root directory. Despite the name, this sets the parent directory, not the cache itself: marketplaces and the plugin cache live in subdirectories under this path. Defaults to ~/.claude/plugins

関連ドキュメント

関連する変更履歴

v2.1.72(1件)

Fixed
Windows でのプラグインインストール失敗やキャッシュパスの不具合など、プラグイン周りの複数の問題を修正
英語原文を表示
Fixed several plugin issues: installation failing on Windows with EEXIST error in OneDrive folders, marketplace blocking user-scope installs when a project-scope install exists, CLAUDE_CODE_PLUGIN_CACHE_DIR creating literal ~ directories, and plugin.json with marketplace-only fields failing to load

変更後

OS やインストール環境を問わず、プラグインによる機能拡張が確実に動作するようになります。

関連ドキュメント