From aab5bd4ab4ddd28964bed8e848ab04eb80f6c117 Mon Sep 17 00:00:00 2001 From: ahsan-amin-wego <118365285+ahsan-amin-wego@users.noreply.github.com> Date: Wed, 25 Nov 2026 14:58:25 +0500 Subject: [PATCH] fix(plugin): make wego/skills installable in Claude Code and Codex Claude Code and Codex both refused wego/skills as a plugin marketplace, because it had no .claude-plugin/marketplace.json. Add that file and a .claude-plugin/plugin.json that reuses the existing mcp.json, publish both with the plugin, and add the install commands to the README. PET-650: https://wegomushi.atlassian.net/browse/PET-650 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01KBobtgAt2GSvB2UW9v5kXe --- plugin/.claude-plugin/marketplace.json | 11 ++++++++ plugin/.claude-plugin/plugin.json | 8 ++++++ plugin/README.md | 19 +++++++++++++ scripts/plugin-conformance.test.ts | 37 ++++++++++++++++++++++++++ scripts/plugin-publish.test.ts | 8 ++++++ scripts/plugin-publish.ts | 11 ++++++++ 6 files changed, 94 insertions(+) create mode 100644 plugin/.claude-plugin/marketplace.json create mode 100644 plugin/.claude-plugin/plugin.json diff --git a/plugin/.claude-plugin/marketplace.json b/plugin/.claude-plugin/marketplace.json new file mode 100644 index 0000000..c0adb2c --- /dev/null +++ b/plugin/.claude-plugin/marketplace.json @@ -0,0 +1,11 @@ +{ + "name": "wego-skills", + "owner": { "name": "Wego" }, + "plugins": [ + { + "name": "wego", + "source": "./", + "description": "Search and compare flights and hotels, then hand back a Wego link." + } + ] +} diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json new file mode 100644 index 0000000..350674a --- /dev/null +++ b/plugin/.claude-plugin/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "wego", + "description": "Search and compare flights and hotels, then hand back a Wego link.", + "homepage": "https://agents.wego.com/plugin", + "repository": "https://github.com/wego/skills", + "license": "Apache-2.0", + "mcpServers": "./mcp.json" +} diff --git a/plugin/README.md b/plugin/README.md index 4a3761b..d5eda19 100644 --- a/plugin/README.md +++ b/plugin/README.md @@ -30,6 +30,25 @@ agent cannot run the CLI, it uses the Wego MCP server that comes with the plugin ## Install +### As a plugin + +The plugin adds the skill and connects the Wego MCP server in one step. + +In Claude Code 2.1.292 or later: + +```text +/plugin install wego --marketplace wego/skills +``` + +In Codex: + +```bash +codex plugin marketplace add wego/skills +codex plugin add wego@wego-skills +``` + +### The skill on its own + On an agent that can run commands, the skill uses the `wego` CLI, so both need to be present, in either order. On an agent that cannot run commands, or that cannot install the CLI or reach the network with it, the skill uses the Wego diff --git a/scripts/plugin-conformance.test.ts b/scripts/plugin-conformance.test.ts index ec99071..a748f61 100644 --- a/scripts/plugin-conformance.test.ts +++ b/scripts/plugin-conformance.test.ts @@ -267,3 +267,40 @@ describe("README.md's claims about the plugin", () => { expect(readme).toMatch(/Nothing is ever booked/i); }); }); + +describe(".claude-plugin/ is installable by Claude Code and Codex", () => { + // Both clients refuse `wego/skills` as a marketplace without this folder, and + // the install commands on agents.wego.com/plugin name `wego-skills` and `wego`. + const read = (name: string) => + JSON.parse( + readFileSync(join(cliRoot, "plugin/.claude-plugin", name), "utf8"), + ) as Record; + const marketplace = read("marketplace.json") as { + name: unknown; + plugins: Record[]; + }; + const claudeManifest = read("plugin.json"); + + it("lists one plugin, `wego`, from the repo root, in marketplace `wego-skills`", () => { + expect(marketplace.name).toBe("wego-skills"); + expect(marketplace.plugins).toHaveLength(1); + expect(marketplace.plugins[0]?.name).toBe("wego"); + expect(marketplace.plugins[0]?.source).toBe("./"); + }); + + it("agrees with the root manifest on name, repository and licence", () => { + expect(claudeManifest.name).toBe(manifest.name); + expect(claudeManifest.repository).toBe(manifest.repository); + expect(claudeManifest.license).toBe(manifest.license); + }); + + it("reuses the root mcp.json, so the server is declared once", () => { + expect(claudeManifest.mcpServers).toBe("./mcp.json"); + }); + + it("uses one description in both files", () => { + expect(marketplace.plugins[0]?.description).toBe( + claudeManifest.description, + ); + }); +}); diff --git a/scripts/plugin-publish.test.ts b/scripts/plugin-publish.test.ts index d08c189..3130e02 100644 --- a/scripts/plugin-publish.test.ts +++ b/scripts/plugin-publish.test.ts @@ -410,6 +410,14 @@ describe("pluginPublishPlan", () => { { from: "plugin/mcp.json", to: "mcp.json" }, { from: "plugin/README.md", to: "README.md" }, { from: "plugin/LICENSE", to: "LICENSE" }, + { + from: "plugin/.claude-plugin/marketplace.json", + to: ".claude-plugin/marketplace.json", + }, + { + from: "plugin/.claude-plugin/plugin.json", + to: ".claude-plugin/plugin.json", + }, { from: "skills/first/SKILL.md", to: "skills/first/SKILL.md" }, { from: "skills/first/references/one.md", diff --git a/scripts/plugin-publish.ts b/scripts/plugin-publish.ts index da4194b..029aaf1 100644 --- a/scripts/plugin-publish.ts +++ b/scripts/plugin-publish.ts @@ -62,6 +62,9 @@ export interface PluginPublishPair { * verbatim Apache 2.0 text carries it. It gets a source file under `plugin/` * like every other published path, because "every published path has a verbatim * source file" is the rule the after-clone predicate depends on. + * + * `.claude-plugin/` is what Claude Code and Codex read to install the plugin from + * `wego/skills`. Without it both refuse the repo as a marketplace. */ export function pluginPublishPlan( skills: readonly { id: string; files: readonly { path: string }[] }[], @@ -71,6 +74,14 @@ export function pluginPublishPlan( { from: `${PLUGIN_SOURCE_DIR}/mcp.json`, to: "mcp.json" }, { from: `${PLUGIN_SOURCE_DIR}/README.md`, to: "README.md" }, { from: `${PLUGIN_SOURCE_DIR}/LICENSE`, to: "LICENSE" }, + { + from: `${PLUGIN_SOURCE_DIR}/.claude-plugin/marketplace.json`, + to: ".claude-plugin/marketplace.json", + }, + { + from: `${PLUGIN_SOURCE_DIR}/.claude-plugin/plugin.json`, + to: ".claude-plugin/plugin.json", + }, ...skills.flatMap(({ id, files }) => files.map(({ path }) => ({ from: `skills/${id}/${path}`,