plugins-reference.md +24 −12
65```markdown theme={null}65```markdown theme={null}
66---66---
67name: agent-name67name: agent-name
6868description: What this agent specializes in and when Claude should invoke itdescription: 此 agent 的專長以及 Claude 應何時叫用它
69model: sonnet69model: sonnet
70effort: medium70effort: medium
71maxTurns: 2071maxTurns: 20
72disallowedTools: Write, Edit72disallowedTools: Write, Edit
73---73---
74 74
7575Detailed system prompt for the agent describing its role, expertise, and behavior.詳細的系統提示,描述 agent 的角色、專業知識和行為。
76```76```
77 77
78Plugin agents 支援 `name`、`description`、`model`、`effort`、`maxTurns`、`tools`、`disallowedTools`、`skills`、`memory`、`background` 和 `isolation` frontmatter 欄位。唯一有效的 `isolation` 值是 `"worktree"`。出於安全原因,plugin 提供的 agents 不支援 `hooks`、`mcpServers` 和 `permissionMode`。78Plugin agents 支援 `name`、`description`、`model`、`effort`、`maxTurns`、`tools`、`disallowedTools`、`skills`、`memory`、`background` 和 `isolation` frontmatter 欄位。唯一有效的 `isolation` 值是 `"worktree"`。出於安全原因,plugin 提供的 agents 不支援 `hooks`、`mcpServers` 和 `permissionMode`。
976**選項:**976**選項:**
977 977
978| 選項 | 描述 | 預設 |978| 選項 | 描述 | 預設 |
979979| :-------------------- | :------------------------------ | :----- || :--------------------- | :---------------------------------------------------------------------------- | :----- |
980| `-s, --scope <scope>` | 安裝範圍:`user`、`project` 或 `local` | `user` |980| `-s, --scope <scope>` | 安裝範圍:`user`、`project` 或 `local` | `user` |
981| `--config <key=value>` | 設定 plugin manifest 中宣告的 [`userConfig`](#user-configuration) 選項。重複使用此旗標以設定多個選項 | |
981| `-h, --help` | 顯示命令說明 | |982| `-h, --help` | 顯示命令說明 | |
982 983
983範圍決定已安裝的 plugin 新增到哪個設定檔。例如,`--scope project` 寫入 `.claude/settings.json` 中的 `enabledPlugins`,使 plugin 對克隆專案存放庫的每個人都可用。984範圍決定已安裝的 plugin 新增到哪個設定檔。例如,`--scope project` 寫入 `.claude/settings.json` 中的 `enabledPlugins`,使 plugin 對克隆專案存放庫的每個人都可用。
1023 1024
1024預設情況下,從最後一個剩餘範圍卸載也會刪除 plugin 的 `${CLAUDE_PLUGIN_DATA}` 目錄。使用 `--keep-data` 保留它,例如在測試新版本後重新安裝時。1025預設情況下,從最後一個剩餘範圍卸載也會刪除 plugin 的 `${CLAUDE_PLUGIN_DATA}` 目錄。使用 `--keep-data` 保留它,例如在測試新版本後重新安裝時。
1025 1026
1027<Note>
1028 當來自不同 marketplaces 的已安裝 plugins 共用名稱時,`plugin-name@marketplace-name` 形式只會卸載指定 marketplace 的 plugin。在 v2.1.212 之前,限定形式可能會比對並卸載來自不同 marketplace 的同名 plugin。
1029</Note>
1030
1026<h3 id="plugin-prune">1031<h3 id="plugin-prune">
1027 plugin prune1032 plugin prune
1028</h3>1033</h3>
1067**選項:**1072**選項:**
1068 1073
1069| 選項 | 描述 | 預設 |1074| 選項 | 描述 | 預設 |
10701075| :-------------------- | :-------------------------------- | :----- || :-------------------- | :------------------------------------------------------------------- | :--- |
10711076| `-s, --scope <scope>` | 要啟用的範圍:`user`、`project` 或 `local` | `user` || `-s, --scope <scope>` | 要啟用的範圍:`user`、`project` 或 `local`。省略時,Claude Code 會偵測 plugin 安裝所在的範圍 | 自動偵測 |
1072| `-h, --help` | 顯示命令說明 | |1077| `-h, --help` | 顯示命令說明 | |
1073 1078
1074<h3 id="plugin-disable">1079<h3 id="plugin-disable">
1078停用 plugin 而不卸載它。當另一個已啟用的 plugin [depends on](/zh-TW/plugin-dependencies#enable-or-disable-a-plugin-with-dependencies) 目標時失敗。錯誤訊息包含一個鏈式命令,該命令會先停用每個相依項。1083停用 plugin 而不卸載它。當另一個已啟用的 plugin [depends on](/zh-TW/plugin-dependencies#enable-or-disable-a-plugin-with-dependencies) 目標時失敗。錯誤訊息包含一個鏈式命令,該命令會先停用每個相依項。
1079 1084
1080```bash theme={null}1085```bash theme={null}
10811086claude plugin disable <plugin> [options]claude plugin disable [plugin] [options]
1082```1087```
1083 1088
1084**引數:**1089**引數:**
1085 1090
10861091* `<plugin>`:Plugin 名稱或 `plugin-name@marketplace-name`* `[plugin]`:Plugin 名稱或 `plugin-name@marketplace-name`。使用 `--all` 時可省略
1087 1092
1088**選項:**1093**選項:**
1089 1094
1090| 選項 | 描述 | 預設 |1095| 選項 | 描述 | 預設 |
10911096| :-------------------- | :-------------------------------- | :----- || :-------------------- | :------------------------------------------------------------------- | :--- |
10921097| `-s, --scope <scope>` | 要停用的範圍:`user`、`project` 或 `local` | `user` || `-a, --all` | 停用所有已啟用的 plugins。不能與 `--scope` 結合使用 | |
1098| `-s, --scope <scope>` | 要停用的範圍:`user`、`project` 或 `local`。省略時,Claude Code 會偵測 plugin 安裝所在的範圍 | 自動偵測 |
1093| `-h, --help` | 顯示命令說明 | |1099| `-h, --help` | 顯示命令說明 | |
1094 1100
1095<h3 id="plugin-update">1101<h3 id="plugin-update">
1192 plugin tag1198 plugin tag
1193</h3>1199</h3>
1194 1200
11951201為目前目錄中的 plugin 建立發行版 git 標籤。從 plugin 的資料夾內執行。請參閱 [Tag plugin releases](/zh-TW/plugin-dependencies#tag-plugin-releases-for-version-resolution)。為 plugin 建立發行版 git 標籤。預設情況下,命令會標記目前目錄中的 plugin;傳遞路徑即可標記其他位置的 plugin。請參閱 [Tag plugin releases](/zh-TW/plugin-dependencies#tag-plugin-releases-for-version-resolution)。
1196 1202
1197```bash theme={null}1203```bash theme={null}
11981204claude plugin tag [options]claude plugin tag [path] [options]
1199```1205```
1200 1206
1207**引數:**
1208
1209* `[path]`:Plugin 目錄的路徑。預設為目前目錄。
1210
1201**選項:**1211**選項:**
1202 1212
1203| 選項 | 描述 | 預設 |1213| 選項 | 描述 | 預設 |
12041214| :------------ | :----------------- | :- || :-------------------- | :---------------------- | :------- |
1205| `--push` | 建立標籤後將其推送到遠端 | |1215| `--push` | 建立標籤後將其推送到遠端 | |
1206| `--dry-run` | 列印將被標籤的內容而不建立標籤 | |1216| `--dry-run` | 列印將被標籤的內容而不建立標籤 | |
1207| `-f, --force` | 即使工作樹髒污或標籤已存在也建立標籤 | |1217| `-f, --force` | 即使工作樹髒污或標籤已存在也建立標籤 | |
1218| `-m, --message <msg>` | 標籤註解訊息。使用 `%s` 作為版本的佔位符 | |
1219| `--remote <name>` | 使用 `--push` 時推送到的遠端 | `origin` |
1208| `-h, --help` | 顯示命令說明 | |1220| `-h, --help` | 顯示命令說明 | |
1209 1221
1210***1222***