尧图网络 高端网站定制 · 原创设计
免费咨询热线
400-888-6620
免费获取方案
如何把 Claude Code 插件发布到插件市场?claude-howto 的 marketplace.json、版本标签与提交流程
如何把 Claude Code 插件发布到插件市场claude-howto 的 marketplace.json、版本标签与提交流程【免费下载链接】claude-howtoA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.项目地址: https://gitcode.com/GitHub_Trending/cl/claude-howto如果你已经写好了一组 Claude Code 插件组件slash commands、subagents、MCP servers、hooks想让其他用户通过一条命令安装而不是手动复制文件就需要完成插件的发布流程写好.claude-plugin/plugin.json清单、定义市场目录.claude-plugin/marketplace.json、本地验证组件、用claude plugin tag打版本标签最后提交到插件市场。claude-howto 仓库的 07-plugins/README.md 完整记录了这条路径本文按该文档的操作顺序整理。发布前提插件结构与 manifest插件是一份可安装的分发单元manifest 位于.claude-plugin/plugin.json使用 JSON 格式。文档给出的基础示例其中homepage、repository需换成你自己的值{ name: my-first-plugin, description: A greeting plugin, version: 1.0.0, author: { name: Your Name }, homepage: https://example.com, repository: https://github.com/user/repo, license: MIT }文档示例的完整插件目录结构供核对你的仓库布局my-plugin/ ├── .claude-plugin/ │ └── plugin.json # Manifest (name, description, version, author) ├── commands/ # Skills as Markdown files ├── agents/ # Custom agent definitions ├── skills/ # Agent Skills with SKILL.md files ├── hooks/ # Event handlers in hooks.json ├── .mcp.json # MCP server configurations ├── bin/ # Executables added to Bash tools PATH while plugin is enabled ├── settings.json # Default settings applied when plugin is enabled (currently only agent key supported) ├── templates/ ├── scripts/ └── docs/ └── README.md其中commands/、agents/、skills/、hooks/是插件可捆绑的四类组件bin/中的可执行文件会在插件启用时被加进 Bash 工具的PATH记得在仓库里chmod xgit 会保留可执行位settings.json目前只支持agent键。发布流程文档明确列出三个必做项创建含全部组件的插件结构、写.claude-plugin/plugin.json、创建README.md文档且发布前必须本地测试。文档“Best Practices”还要求版本号使用 semver。定义市场目录.claude-plugin/marketplace.json插件市场marketplace本身由.claude-plugin/marketplace.json定义放在你的市场仓库中。文档给出的示例owner、插件名与 source 需替换为你自己的{ name: my-team-plugins, owner: my-org, plugins: [ { name: code-standards, source: ./plugins/code-standards, description: Enforce team coding standards, version: 1.2.0, author: platform-team }, { name: deploy-helper, source: { source: github, repo: my-org/deploy-helper, ref: v2.0.0 }, description: Deployment automation workflows } ] }顶层与插件条目的必填/可选字段FieldRequiredDescriptionnameYesMarketplace name in kebab-caseownerYesOrganization or user who maintains the marketplacepluginsYesArray of plugin entriesplugins[].nameYesPlugin name (kebab-case)plugins[].sourceYesPlugin source (path string or source object)plugins[].descriptionNoBrief plugin descriptionplugins[].versionNoSemantic version stringplugins[].authorNoPlugin author nameplugins[].renamesNoMaps a former pluginnameto its current name用户可自动迁移v2.1.193plugins[].displayNameNoUI 中显示的名称不用于查找v2.1.143plugins[].defaultEnabledNo为false时插件默认以禁用状态安装v2.1.154plugins[].source支持多种来源。发布到公开市场最常用的两种Source语法示例Relative path字符串路径./plugins/my-pluginGitHub{ source: github, repo: owner/repo }{ source: github, repo: acme/lint-plugin, ref: v1.0 }其余文档列出的来源还有 git URLsource: url、git 子目录git-subdir、npm、pip、archivezip 下载v2.1.224和commandv2.1.229。GitHub 与 git 类来源支持可选的ref分支/标签与sha提交哈希字段做版本锁定市场侧也有 “Version pinning” 能力用于把插件锁定到特定版本以获得可复现的安装环境。一个命名限制保留市场名包含first-party-plugins与healthcarev2.1.205这些名字预留给官方自定义市场不能占用。本地验证提交前的必做检查发布流程文档把 “Test locally withclaude --plugin-dir ./my-plugin” 列为正式步骤。该命令以加载你的插件的方式启动 Claude Codeflag 可重复使用v2.1.128 起也接受.zip路径文档列出的验证清单是确认所有 slash commands 可用测试 subagents/agents 行为正确确认 MCP servers 连接正常验证 hook 执行检查配置错误另外两条可用的检查命令claude plugin validate # Validate plugin structure claude plugin details name # 打印组件清单skills、hooks、MCP、LSP、monitors、commandsclaude plugin details name的输出示例文档示例实际数值随插件而定plugin: code-reviewer (1.2.0) skills: 3 hooks: 2 mcp: 1 lsp: 0 monitors: 0 commands: /review, /security-review projected ctx: 1,420 tokens per turn · 9,800 tokens per /review invocation本地验证通过是后续打标签和提交的前置条件组件加载类问题的排查入口就是claude plugin details。打版本标签claude plugin tag发布流程的第 5 步是打标签命令为claude plugin tag versionv2.1.118见 10-cli/README.md 的命令表claude plugin tag v0.3.0文档说明该命令会校验版本号格式并创建对应的 git tag是 “the recommended way to cut plugin releases for distribution”为分发切割插件版本的推荐方式。也就是说版本号先经过格式校验才会落到 git tag 上标签创建后推送到远端市场侧即可引用该版本git 类来源的ref可指向该 tag。社区市场目录中还有一层约束其中的第三方插件各自 pin 到一个具体的 commit SHA。提交到插件市场并让用户安装文档 “Publishing a Plugin” 给出的完整步骤Create plugin structure with all componentsWrite.claude-plugin/plugin.jsonmanifestCreateREADME.mdwith documentationTest locally withclaude --plugin-dir ./my-pluginTag the release withclaude plugin tag v0.3.0v2.1.118Submit to plugin marketplaceGet reviewed and approvedPublished on marketplaceUsers can install with one command关于第 6 步的提交入口文档写明提交到 Anthropic 策展的官方市场可通过 Claude 官方的插件提交页文档标注的路径为plugins/submit分别位于 claude.ai 与 platform.claude.com。文档还给出了一份示例提交文案的结构Description、Whats Included、Installation、Features、Usage、Requirements供你撰写提交材料时参考其中 Requirements 一节示例写的是 “Claude Code 2.1”。市场一侧的两种公开目录官方市场anthropics/claude-plugins-official由 Anthropic 管理首次交互式启动时自动注册社区市场anthropics/claude-plugins-community托管通过 Anthropic 自动化验证与安全筛查的第三方插件每个插件在目录中 pin 到具体 commit SHA。与官方市场不同用户需手动添加/plugin marketplace add anthropics/claude-plugins-community # Then install from it using the claude-community marketplace name /plugin install plugin-nameclaude-community如果你的插件通过marketplace.json以 GitHub 仓库形式分发用户的添加命令文档标注 GitHub 为推荐方式是# Users add your marketplace /plugin marketplace add owner/repo-name使用其他 git 服务时必须给完整 URL如https://gitlab.com/org/marketplace-repo.git自 v2.1.196 起不带 scheme 的裸gitlab.example.com/team/plugins形式会被拒绝为非法owner/repo缩写。私有仓库通过 git credential helpers 或环境变量 token 支持用户必须对仓库有读权限。安装侧的验证方式用户执行/plugin install name或 CLI 形式claude plugin install namemarketplace后读安装摘要的最后一行v2.1.221 起——Plugin is now active.表示插件已随安装激活Run /reload-plugins to activate.表示已安装但尚未生效执行/reload-plugins即可无需重启会话。排查与限制文档 “Troubleshooting” 中与发布链路直接相关的检查项Plugin Wont Install用/version检查 Claude Code 版本兼容性用 JSON validator 校验plugin.json语法远端插件需检查网络检查权限ls -la plugin/。Components Not Loading核对plugin.json中的路径与实际目录结构一致检查脚本权限chmod x scripts/用claude plugin details plugin-name查看组件清单。Commands Not Available After Install/plugin list确认安装成功/plugin list --enabled确认已启用检查是否需要/reload-plugins并排查与现有命令的命名冲突。两个容易踩的边界claude plugin marketplace update [name]只刷新插件目录可安装清单不会更新已安装的插件更新已装插件要用claude plugin update name。企业环境中strictKnownMarketplaces、blockedMarketplaces等管理设置在每次插件生命周期事件install、update、refresh、autoupdate上强制执行——如果目标用户组织配置了市场白名单你的插件所在市场必须匹配否则用户无法添加。可选分支不走市场也能分发如果不追求市场分发文档给了两条替代路径本地测试用的--plugin-dir/--plugin-urlclaude --plugin-url https://example.com/releases/my-plugin-0.3.0.zipv2.1.129仅作用于当前会话以及 v2.1.157 起放在.claude/skills目录的插件无需市场即可自动加载可用claude plugin init name脚手架一个新插件。这两条适合团队内部共享市场发布仍按前面的主路径执行。【免费下载链接】claude-howtoA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.项目地址: https://gitcode.com/GitHub_Trending/cl/claude-howto创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
RELATED

相关推荐

SystemInformer 汉化指南:3 步把系统监控工具改成中文界面

SystemInformer 汉化指南:3 步把系统监控工具改成中文界面

SystemInformer 汉化指南:3 步把系统监控工具改成中文界面 【免费下载链接】systeminformer A free, powerful, multi-purpose tool that helps you monitor system resources, debug software and detect malware. Brought to you by Winsider Seminars & Solu…

📅 2026/9/11 23:06:40
测试工程师技能栈更新与工具选型指南

测试工程师技能栈更新与工具选型指南

1. 为什么测试工程师需要持续更新技能栈? 在软件研发效能持续提升的今天,测试工程师的角色正在发生根本性转变。十年前的手工测试用例执行占比超过70%,而根据2023年DevOps状态报告显示,自动化测试在头部科技企业的覆盖率已达到85%…

📅 2026/9/11 23:06:40
光伏逆变器PV端口EMI整改实战:Class B辐射超标根因与七步闭环

光伏逆变器PV端口EMI整改实战:Class B辐射超标根因与七步闭环

1. 项目概述:为什么PV端口成了Class B电磁兼容测试的“拦路虎”大功率逆变器做EMC测试,卡在Class B过不了——这几乎是光伏逆变器研发、生产、认证一线工程师嘴里最常听到的一句牢骚。不是谐波超标,不是辐射骚扰超限,更不是传导发…

📅 2026/9/11 23:01:40
MORE NEWS

更多资讯

📰

LlamaIndex QueryEngineTool 深度指南:将查询引擎封装为 Agent 工具的完整实战

LlamaIndex QueryEngineTool 深度指南:将查询引擎封装为 Agent 工具的完整实战 【免费下载链接】llama_index LlamaIndex is the document processing platform for AI 项目地址: https://gitcode.com/GitHub_Trending/ll/llama_index 导读 本指南以 LlamaI…

📰

authentik WebUI 测试体系完全指南:unit / browser / lit / blueprints 四种测试类型的选择、编写与运行

authentik WebUI 测试体系完全指南:unit / browser / lit / blueprints 四种测试类型的选择、编写与运行 【免费下载链接】authentik The authentication glue you need. 项目地址: https://gitcode.com/GitHub_Trending/au/authentik 导读 本文以 web/test…

📰

IEEE33节点系统:配电网仿真基准模型落地实践

简介:本资源是电力系统专业学生与工程师开展配电网仿真研究的实用工具包,聚焦IEEE 33节点标准测试系统,适用于潮流计算、电压稳定性分析、分布式能源接入评估及保护策略验证等典型研究场景。压缩包共2个文件(1个Simulink模型文件i…

📰

基于 agno 的 Inter-Annotator Agreement 实践:用纯标准库实现评估 LLM 标注与陪审团投票的一致性

基于 agno 的 Inter-Annotator Agreement 实践:用纯标准库实现评估 LLM 标注与陪审团投票的一致性 【免费下载链接】agno Build, run, and manage agent platforms. 项目地址: https://gitcode.com/GitHub_Trending/ag/agno 本文基于 agno 数据标注系列 cook…

📰

轧机异步电机VF曲线怎么走?从400转到572.7转的调试详解

轧机电异步电机,给定转速范围从400转到572.7转,VF曲线到底怎么走?这个问题问得很典型:只给了两个转速点,没说电机铭牌,也没说变频器型号,但恰恰是这种问题,最能考验对异步电机调速本…

📰

交叉结构光焊缝识别:激光三角测量三维重建实战

简介:本资源是一套基于交叉结构光视觉传感器的智能焊缝识别系统完整工程实现,面向工业自动化、机器视觉与焊接机器人领域的开发者及高校相关专业师生,解决高精度焊缝三维检测、实时跟踪与质量控制难题。项目融合激光三角测量原理与OpenCV图像…

TODAY

今日更新

THIS WEEK

本周精选

THIS MONTH

本月热门

读完文章,想聊聊您的网站?

告诉我们您的行业与需求,资深顾问一对一梳理方案与报价,全程免费。

📞 💬