在 PowerShell 中執行 claude plugin install <plugin>@<marketplace>,而不啟動工作階段
`claude: command not found` after `claude plugin ...`
您在 shell 中執行了 claude plugin install ...,shell 根本找不到 claude。在 Windows 上,訊息是 'claude' is not recognized as the name of a cmdlet 或 'claude' is not recognized as an internal or external command。
您執行了 /plugin install <name>@<marketplace> 或 claude plugin install <name>@<marketplace>,外掛程式名稱不在您機器上該市集目錄的副本中。
當您根本沒有新增市集時,claude plugin install 在您的 shell 中列印相同的訊息。如果 claude plugin marketplace update <marketplace> 然後回答 Marketplace '<marketplace>' not found,首先新增市集。
`not found in marketplace` with a refresh hint
提示讀取 Your local copy may be out of date — try claude plugin marketplace update <marketplace> 或 The marketplace couldn't be refreshed (...)。Claude Code 在查詢前沒有重新整理市集,例如當您離線時,所以您的目錄副本可能已過時。使用市集的名稱重新整理,然後再次安裝:
claude plugin install 在您的 shell 中列印不同的訊息。對於已在目標範圍安裝的外掛程式,它列印 Plugin "<name>@<marketplace>" is already installed (scope: user) 並以退出代碼 0 退出。如果其快取目錄遺失,相同的命令會重新下載它。
`"" was not installed: it would share its folder with ""`
您透過 claude plugin install、/plugin 或工作階段中的安裝建議安裝了外掛程式,Claude Code 拒絕了它,並顯示此行或 would share its saved data with。
被拒絕的外掛程式的 id 和已安裝的外掛程式的 id 對應到磁碟上的相同資料夾:一旦 . 和 @ 被寫成 -,它們就是相同的。在 macOS 和 Windows 上,僅在大寫字母中不同的 id 也對應到相同的資料夾。安裝兩者會將一個外掛程式的檔案放在另一個的資料夾中,因此 Claude Code 拒絕,已安裝的外掛程式保留其檔案。
訊息命名了解決方案:
其他外掛程式已安裝:訊息說 Only one of the two can be installed. 並命名 claude plugin uninstall 命令或 /plugin 中的卸載步驟,以移除其他外掛程式。執行它,然後再次安裝。對於卸載移除的內容,請參閱 卸載刪除和保留的內容。
兩個 id 在一次安裝中到達,例如外掛程式及其需要的依賴項:沒有安裝順序可以幫助。只有列出這兩個外掛程式的市集的維護者可以修復它,方法是重新命名其中一個。當兩者來自不同的市集時,任一個的維護者都可以。
`This plugin uses a source type your Claude Code version does not support`
您安裝了一個外掛程式,其市集條目使用此版本 Claude Code 無法擷取的來源類型,Claude Code 停止並顯示此訊息和 Update Claude Code and try again.
您安裝了一個作為 zip 存檔分發的外掛程式,Claude Code 拒絕了它,並顯示此行和 The archive was not installed.。外掛程式的市集條目使用帶有 sha256 釘選的 archive 來源,下載的檔案的摘要與釘選不符。
完整訊息如下所示:
Plugin archive integrity check failed for https://artifacts.example.com/claude-plugins/my-plugin.zip: expected sha256 6bfa50e3d2e00c052b46abe51fff89346ac803e45771f76dcf6df1ab74cca5e1, got ac52220c0914ef8ca6a602e4a7362f88d30fb021110f72a6d15b68c3fe7df2b7. The archive was not installed. Verify the sha256 in the marketplace entry, or that the URL serves the intended file.
Marketplace "claude-community" is registered from an untrusted source: The name 'claude-community' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/anthropics/' can use this name. To fix it, remove the marketplace and re-add it from the official source.
修復因使用者和發佈者而異:
您使用市集:在您的 shell 中,執行 claude plugin marketplace remove <name>,然後從官方 github.com/anthropics 儲存庫再次新增市集
Marketplace "acme-tools" is already added from a different source (github:acme/plugins). To use this source instead, remove that marketplace first with /plugin marketplace remove acme-tools.
Could not move the new copy of this plugin version into /home/user/.claude/plugins/cache/acme-tools/formatter/1.2.0: the new copy or the version folder stayed busy while the install ran (ENOTEMPTY) — usually a scanner still reading the freshly downloaded files, another program using that folder, or another process re-creating it. The previously installed copy was moved back. Run the install again once other Claude Code sessions or programs using that folder have finished.
訊息說明了安裝前的副本發生了什麼,這告訴您外掛程式是否仍然有效:
The previously installed copy was moved back:您擁有的版本仍然安裝
had to be removed first、was not moved back 或 could not be moved back:該外掛程式版本在安裝成功前未安裝
沒有這樣的句子:沒有較早的副本,因此版本未安裝
在 Windows 上,當另一個程式持有已安裝的副本本身時,訊息改為說該副本 could not be replaced,並且 It was not replaced and the new copy was discarded,因此您擁有的版本仍然安裝。
Left on disk 清單命名快取內的預留資料夾。稍後安裝該版本或外掛程式快取清理會移除它們,因此您不需要刪除它們。
若要修復安裝:
關閉使用外掛程式資料夾(在 ~/.claude/plugins/cache 下)的其他 Claude Code 工作階段、編輯器和終端機,然後再次執行安裝
Reloaded: 及外掛程式、技能、代理、hooks 和伺服器的計數:外掛程式現在處於活動狀態。當某些無法載入時,該行新增 N errors during load. Run /plugin for details.
This reload changes MCP tools (...) — your next message will re-read the whole conversation instead of using the cache. Run /reload-plugins --force to apply.:重新載入會新增或移除外掛程式 MCP 伺服器,或 LSP 工具,並使您的提示快取失效。對於 LSP 情況,該行以 This reload adds the LSP tool 或 This reload removes the LSP tool 開頭。執行它時使用 --force 以啟用外掛程式,或啟動新工作階段
`installed_plugins.json holds a record under "" that this version of Claude Code cannot read`
訊息以這些形式出現:
claude plugin list:將其列印為 Note:
claude plugin install、uninstall 和 update:拒絕並顯示 Plugin "<name>" was not installed:、Plugin "<name>" was not uninstalled: 或 Plugin "<name>" was not updated:,後跟相同的文字
`install records under names that no version of Claude Code can use were removed from installed_plugins.json`
claude plugin list 列印此注意事項,其路徑為副本,名為 installed_plugins.set-aside.<date>.<hash>.json,只要該副本位於 installed_plugins.json 旁邊。注意事項以 Nothing needs doing about these copies. 結尾。
installed_plugins.json 中的記錄位於不是有效外掛程式 id 的金鑰下,因此沒有版本的 Claude Code 可以使用它。檔案的其餘部分正常載入。
Claude Code 將無法使用的記錄複製到 .set-aside 檔案中,並將其從清單中刪除。Claude Code 永遠不會讀取副本,副本在 cleanupPeriodDays 排程上老化。
`Disabled in ~/.claude/settings.json but still loads`
您在 ~/.claude/settings.json 中將外掛程式設定為 false,其在 claude plugin list 或 /plugin 中的行顯示此訊息,後跟啟用它的來源,例如 — project settings enable it, which overrides your user setting。該更高優先順序來源中的 true 正在覆蓋您的使用者設定。
若要在您的機器上選擇退出專案啟用的外掛程式,請在 .claude/settings.local.json 中將 id 設定為 false,其優先順序高於專案檔案。對於訊息可以命名的其他來源,請參閱 在使用者設定中停用但仍然載入。
如果 claude plugin list 改為將外掛程式標記為 required by your org,沒有設定檔涉及:您的組織在 claude.ai 上將該同步外掛程式標記為必需,即使您之前停用了它,它也會載入。請參閱 從 claude.ai 同步的外掛程式。
`Plugin "" is enabled in project settings but isn't installed here`
Errors 標籤顯示此行用於您的專案的 .claude/settings.json 啟用的外掛程式,指導 Run claude plugin install <name>@<marketplace> --scope project to install it for this project。
Failed to load hooks from <path>: <reason>:hooks/hooks.json 不是有效的 JSON 或失敗 hooks 架構。原因命名解析或驗證錯誤。修復檔案。若要在發佈外掛程式前在 hooks/hooks.json 中捕捉 JSON 語法問題,請在您的 shell 中執行 claude plugin validate <plugin-directory>
hooks path not found: <path>:清單的 hooks 欄位命名在相對於外掛程式根目錄的該路徑處不存在的檔案。修復路徑或新增檔案
`hook error` notices in the transcript
形式為 ... hook error: Failed with non-blocking status code: <stderr> 的通知表示 hook 執行且其命令失敗。例如,Stop hook error: Failed with non-blocking status code: /bin/sh: node: command not found 表示 Claude Code 產生的 shell 找不到 node。安裝它,或確保它在您啟動 claude 的終端機的 PATH 上。
退出代碼為 2 的 hook 阻止它執行的動作。當外掛程式的 hook 以這種方式阻止且其 stderr 是阻止訊息時,錯誤以 This hook comes from the <plugin> plugin. 結尾,以便您知道要停用或修復哪個外掛程式。在 v2.1.281 之前,錯誤沒有命名外掛程式。
若要讀取伺服器在啟動時列印的錯誤,請執行 claude --debug 並在 ~/.claude/debug/<session-id>.txt 開啟日誌。--debug 旗標不會列印到終端機。
.mcp.json 中失敗架構的伺服器條目不會出現在 Errors 標籤中。Claude Code 丟棄該伺服器,並僅在該偵錯日誌中記錄 Invalid MCP server config for <server> in <path>。若要在不載入外掛程式的情況下找到條目,請在外掛程式目錄上在您的 shell 中執行 claude plugin validate,它將其報告為錯誤。
Errors 標籤顯示 commands path not found: <absolute path>,並提供指導 Check that the path in your manifest or marketplace config is correct。skills、agents 和 hooks 也會出現相同訊息。
Claude Code 從您的 plugin.json 或市集項目解析了一個路徑,相對於外掛程式根目錄,但在該處找不到任何內容。訊息中的路徑是它檢查的絕對路徑,因此請將其與磁碟上的內容進行比較。修正路徑或建立目錄,然後執行 /reload-plugins。
VS Code 擴充功能的管理外掛程式對話框:在安裝後以表單形式要求未設定的選項。在 v2.1.285 之前,在該處安裝不會顯示選項表單,因此請使用 /plugin configure <plugin>@<marketplace> 從終端機工作階段設定值
在您的 shell 中的 claude plugin install:永遠不會提示 userConfig 值。它會儲存您傳遞的任何 --config KEY=VALUE 值,當選項保持未設定時,它會列印 N userConfig options not yet set — run /plugin configure <plugin>@<marketplace> in Claude Code, or pass --config KEY=VALUE. 當任何未設定的選項是必需的時,(M required) 跟隨 not yet set。
如果您從 shell 安裝,請使用 --config 傳遞值,每個選項一個旗標:
claude plugin install my-plugin@my-marketplace--config api_url=https://example.com
如果您傳遞資訊清單未宣告的 --config 鍵,外掛程式仍會安裝,命令會列印 ⚠ Installed, but --config not applied: --config key "<key>" isn't declared in this plugin's userConfig. 後面跟著外掛程式確實宣告的鍵。
對於運送MCPB 套件檔案的外掛程式,該檔案宣告其自身的 user_config,訊息改為讀取 isn't declared in this plugin's userConfig or by its bundled MCP servers.,已知的鍵包括該伺服器的鍵,寫成 <server>.<key>。資訊清單按 URL 參考的套件在安裝時不會被讀取,因此其鍵不會被列出,訊息會說在 /plugin 中設定它。設定 <server>.<key> 鍵需要 Claude Code v2.1.285 或更新版本。
`claude plugin validate` 報告錯誤
您執行了 claude plugin validate <path>,或在工作階段中執行了 /plugin validate <path>,它列印了 Found N errors 和 Validation failed,然後以代碼 1 結束。
`Warning: No commands found in plugin custom directory`
當外掛程式載入時,claude --debug 日誌在 ~/.claude/debug/<session-id>.txt 記錄 Warning: No commands found in plugin <name> custom directory: <path>. Expected .md files or SKILL.md in subdirectories. 工作階段或 Errors 標籤中不會出現任何內容。
Duplicate plugin name "<name>" found in marketplace
錯誤
為每個外掛程式提供唯一的 name。
Path contains "..": <path> 在 plugins[N].source 下
錯誤
使用相對於市集根目錄的路徑,沒有 .. 段。
Marketplace name cannot contain control or bidirectional-formatting characters
錯誤
從名稱中移除字元,例如逃逸或換行符。
Plugin name cannot contain control or bidirectional-formatting characters
錯誤
從外掛程式 name 中移除字元。
Claude Code cannot install plugins from marketplace "<name>". Each part of a plugin id (plugin@marketplace) may use only the letters a-z and A-Z, digits, ".", "_" and "-", and must start with a letter or digit. Change the marketplace's "name".
錯誤
將市集重新命名以符合訊息所述的規則。
Claude Code cannot install plugin "<name>". Each part of a plugin id (plugin@marketplace) may use only the letters a-z and A-Z, digits, ".", "_" and "-", and must start with a letter or digit. Change this entry's "name".
錯誤
將條目重新命名以符合訊息所述的規則。
Marketplace has no plugins defined
警告
至少新增一個條目到 plugins。
No marketplace description provided
警告
新增頂級 description。
Plugin name "<name>" is not kebab-case 在 plugins[N] plugin.json → name 下
警告
重新命名為小寫字母、數字和連字號;claude.ai 市集同步需要該形式。
Entry declares version "<a>" but <path>/plugin.json says "<b>"
警告
更新條目以符合 plugin.json,在安裝時是權威的。
Marketplace name "<name>" is reserved in Claude Desktop
`Marketplace "" is not in the allowed marketplace list`
Errors 標籤顯示此行,或 Marketplace "<name>" is blocked by enterprise policy,用於您已註冊的市集。
相同的受管設定,阻止 市集來源,在載入時適用。strictKnownMarketplaces 不包括此市集,或 blockedMarketplaces 命名它,因此 Claude Code 停止載入它及其外掛程式。對於允許清單變體,指導行顯示允許的來源,或 Contact your administrator to configure allowed marketplace sources。對於阻止清單變體,它讀取 This marketplace source is explicitly blocked by your administrator。
`Plugin "" is blocked by your organization's policy and cannot be installed`
安裝被拒絕,並顯示此行,啟用時顯示相同的行,以 cannot be enabled 結尾,或安裝或更新時顯示命名原因的行:Plugin "<name>" is from marketplace "<marketplace>", which is blocked by your organization's policy,或 Plugin "<name>" depends on "<dep>", which is blocked by your organization's policy。
`--plugin-dir is disabled by your organization's managed settings (disableSideloadFlags)`
您使用 --plugin-dir、--plugin-url、--agents 或 --mcp-config 啟動了 claude。Claude Code 以此訊息退出,並顯示 Plugins, custom agents, and MCP servers can only be loaded from sources your administrator has approved.
426 `"<plugin>" was not installed: it would share its folder with "<other>"`
427</h3>
428
429您透過 `claude plugin install`、`/plugin` 或工作階段中的安裝建議安裝了外掛程式,Claude Code 拒絕了它,並顯示此行或 `would share its saved data with`。
430
431被拒絕的外掛程式的 id 和已安裝的外掛程式的 id 對應到磁碟上的相同資料夾:一旦 `.` 和 `@` 被寫成 `-`,它們就是相同的。在 macOS 和 Windows 上,僅在大寫字母中不同的 id 也對應到相同的資料夾。安裝兩者會將一個外掛程式的檔案放在另一個的資料夾中,因此 Claude Code 拒絕,已安裝的外掛程式保留其檔案。
432
433訊息命名了解決方案:
434
435* **其他外掛程式已安裝**:訊息說 `Only one of the two can be installed.` 並命名 `claude plugin uninstall` 命令或 `/plugin` 中的卸載步驟,以移除其他外掛程式。執行它,然後再次安裝。對於卸載移除的內容,請參閱 [卸載刪除和保留的內容](/docs/zh-TW/plugins/cli-reference#what-an-uninstall-deletes-and-keeps)。
436* **兩個 id 在一次安裝中到達**,例如外掛程式及其需要的依賴項:沒有安裝順序可以幫助。只有列出這兩個外掛程式的市集的維護者可以修復它,方法是重新命名其中一個。當兩者來自不同的市集時,任一個的維護者都可以。
414 `This plugin uses a source type your Claude Code version does not support`439 `This plugin uses a source type your Claude Code version does not support`
415</h3>440</h3>
790* **`URL is unset or invalid`**:URL 使用的 `${user_config.*}` 選項未設定。執行 `/plugin configure <plugin>` 以設定它815* **`URL is unset or invalid`**:URL 使用的 `${user_config.*}` 選項未設定。執行 `/plugin configure <plugin>` 以設定它
791* **`has an invalid MCP url`** 或 **`headersHelper for MCP server '<server>' references ${user_config.*}`**:外掛程式自己的配置有問題。修復您外掛程式的 MCP 配置中的 `url` 或 `headersHelper`,或如果外掛程式不是您的,向外掛程式的作者報告。`headersHelper` 情況在 [外掛程式命令參考 user\_config](/docs/zh-TW/errors#plugin-command-references-user-config) 下有自己的條目816* **`has an invalid MCP url`** 或 **`headersHelper for MCP server '<server>' references ${user_config.*}`**:外掛程式自己的配置有問題。修復您外掛程式的 MCP 配置中的 `url` 或 `headersHelper`,或如果外掛程式不是您的,向外掛程式的作者報告。`headersHelper` 情況在 [外掛程式命令參考 user\_config](/docs/zh-TW/errors#plugin-command-references-user-config) 下有自己的條目
950如果您傳遞資訊清單未宣告的 `--config` 鍵,外掛程式仍會安裝,命令會列印 `⚠ Installed, but --config not applied: --config key "<key>" isn't declared in this plugin's userConfig.` 後面跟著外掛程式確實宣告的鍵。986如果您傳遞資訊清單未宣告的 `--config` 鍵,外掛程式仍會安裝,命令會列印 `⚠ Installed, but --config not applied: --config key "<key>" isn't declared in this plugin's userConfig.` 後面跟著外掛程式確實宣告的鍵。
951987
988對於運送[MCPB 套件檔案](/docs/zh-TW/plugins/components#include-a-packaged-mcpb-server)的外掛程式,該檔案宣告其自身的 `user_config`,訊息改為讀取 `isn't declared in this plugin's userConfig or by its bundled MCP servers.`,已知的鍵包括該伺服器的鍵,寫成 `<server>.<key>`。資訊清單按 URL 參考的套件在安裝時不會被讀取,因此其鍵不會被列出,訊息會說在 `/plugin` 中設定它。設定 `<server>.<key>` 鍵需要 Claude Code v2.1.285 或更新版本。
968| `Path contains ".." which could be a path traversal attempt: <path>` | 元件路徑逃逸外掛程式目錄。 | 使用外掛程式根目錄內的路徑。 |1006| `Path contains ".." which could be a path traversal attempt: <path>` | 元件路徑逃逸外掛程式目錄。 | 使用外掛程式根目錄內的路徑。 |
969| `Path is a file; skills entries must be directories containing SKILL.md` | `skills` 項目指向 `SKILL.md` 而不是其目錄。 | 指向父目錄,或 `.` 表示根層級 `SKILL.md`。 |1007| `Path is a file; skills entries must be directories containing SKILL.md` | `skills` 項目指向 `SKILL.md` 而不是其目錄。 | 指向父目錄,或 `.` 表示根層級 `SKILL.md`。 |
1009| `Plugin name "<name>" is reserved: it passes as one of Anthropic's own` | 外掛程式的 `name` 是其中一個[保留名稱](/docs/zh-TW/plugins/manifest-reference#name)。 | 根據其功能重新命名外掛程式。 |