Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions plugin/.claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -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."
}
]
}
8 changes: 8 additions & 0 deletions plugin/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -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"
}
19 changes: 19 additions & 0 deletions plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 37 additions & 0 deletions scripts/plugin-conformance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, unknown>;
const marketplace = read("marketplace.json") as {
name: unknown;
plugins: Record<string, unknown>[];
};
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,
);
});
});
8 changes: 8 additions & 0 deletions scripts/plugin-publish.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 11 additions & 0 deletions scripts/plugin-publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }[] }[],
Expand All @@ -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}`,
Expand Down
Loading