Skip to content

Add Claude Code marketplace support alongside Codex - #12

Open
2911448 wants to merge 1 commit into
icebird1998:mainfrom
2911448:claude/claude-code-marketplace
Open

2911448 wants to merge 1 commit into
icebird1998:mainfrom
2911448:claude/claude-code-marketplace

Conversation

@2911448

@2911448 2911448 commented Aug 7, 2026 •

Copy link
Copy Markdown

Fixes #11(Claude Code 注册报错 Marketplace file not found ... .claude-plugin/marketplace.json)

本 PR 让同一仓库可同时注册到 Codex 和 Claude Code,Codex 侧清单与行为完全不变。

改动内容

  • 新增 .claude-plugin/marketplace.json 与 plugins/scientific-illustrator/.claude-plugin/plugin.json,MCP 服务器通过 ${CLAUDE_PLUGIN_ROOT} 内联声明——Claude Code 从 ~/.claude/plugins/cache/ 的副本运行插件,相对路径 + cwd 写法在其中会失效(已实测);Codex 的 .mcp.json 不会被 Claude Code 重复加载
  • 新增 install-claude.sh / install-claude.ps1(结构对照现有 install.sh / install.ps1):
    • venv 使用 --copies 创建,因为 Claude Code 的 cache 拷贝会丢弃指向插件外部的符号链接,符号链接版 venv 实测在 cache 中损坏
    • 注册时先卸载再安装,保证插件版本不变时重建的 venv 也能进入 cache(同版本 install/update 均不会重拷)
    • PowerShell 版在探测 Python 时临时放宽 $ErrorActionPreference(Windows PowerShell 5.1 会把重定向的原生命令 stderr 变成终止性错误),并过滤 Windows Store 的 python 占位 stub;venv 构建失败只降级为警告,不阻断插件注册
  • README 新增「在 Claude Code 中使用」章节(安装命令 + 三段提示词,与 Codex 版逐字一致、仅去掉首行插件引用)
  • validate-repo.mjs 新增两套清单的同步校验(名称/版本/描述/署名/服务器脚本路径 + --copies 防回退检查);windows-compat-smoke.ps1 增加对 install-claude.ps1 的语法解析
  • 纯文案调整:python-pptx 报错同时指向两个安装脚本,"Start a new Codex task" 等指引改为 host 中立措辞

验证

  • macOS + Claude Code 2.1.223 实测:claude plugin validate 双清单通过;安装后组件清单正确(6 skills + 3 MCP servers,无重复注册);三个 MCP 服务器从 cache 副本正常响应 initialize;卸载重装后 cache 内 venv import pptx 成功
  • node --run test 全套通过(Codex 清单校验、MCP、Office.js、focus-policy、平台兼容、WPS 可靠性)
  • skills 目录两端共用同一格式,未做任何改动

🤖 Generated with Claude Code

- Add .claude-plugin/marketplace.json and .claude-plugin/plugin.json so the
  same repository installs from either Codex or Claude Code; Codex manifests
  and behavior are unchanged.
- Declare the three MCP servers through ${CLAUDE_PLUGIN_ROOT} because Claude
  Code runs plugins from its cache copy instead of the marketplace checkout.
- Add install-claude.sh / install-claude.ps1; the OOXML venv uses --copies
  since the cache copy drops symlinked interpreters, and the plugin is
  reinstalled so a rebuilt venv reaches the cache at an unchanged version.
- Mention both installers in the python-pptx error, make session guidance
  host-neutral, document Claude Code installation and prompts, and validate
  that both manifest sets stay synchronized.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

请支持claude code的skill调用

1 participant