用途:当 claude plugin install 因 SSH 密钥错误失败,或目标仓库没有 .claude-plugin/marketplace.json 清单时,用此技能手动完成安装。
主要能力与步骤:
- 用 gh CLI 克隆仓库,绕过 SSH: gh repo clone <owner>/<repo> "~/.claude/plugins/marketplaces/<marketplace-name>" 目录应与市场管理器原本使用的路径一致(若市场已添加,可查 known_marketplaces.json)。
- 检查现有清单: ls "~/.claude/plugins/marketplaces/<name>/.claude-plugin/" 若 marketplace.json 已存在,跳到第 4 步。
- 检查仓库结构并生成清单。常见布局:skills/<skill-name>/SKILL.md、agents/、hooks/、.claude/commands/。阅读一两个 SKILL.md 了解内容,再写 .claude-plugin/marketplace.json,含 name、owner、metadata(description、version)、plugins 数组;在 plugins 的 skills 数组中列出 skills/ 下每个技能目录。
- 安装: claude plugin install <plugin-name>@<marketplace-name>
- 验证: claude plugin list 确认插件显示为 ✔ enabled。
注意事项:若通过 claude plugin marketplace add 添加但克隆失败,known_marketplaces.json 中有记录而目录为空或缺失,需手动重新克隆到其中的 installLocation 路径。仅有 SKILL.md(无 plugin.json)的技能通过市场清单的 skills 数组打包,无需每个技能单独 plugin.json。安装后需重启 Claude,新技能才会出现在可用技能列表中。
限制:资料未提供其他平台支持、收费或价格信息。