Skip to content

fix: marketplace.json plugin source schema for Claude Code#77

Open
avirgili-eclub wants to merge 1 commit intoGentleman-Programming:mainfrom
avirgili-eclub:fix/marketplace-json-source-schema
Open

fix: marketplace.json plugin source schema for Claude Code#77
avirgili-eclub wants to merge 1 commit intoGentleman-Programming:mainfrom
avirgili-eclub:fix/marketplace-json-source-schema

Conversation

@avirgili-eclub
Copy link

Summary

  • Fix marketplace.json plugin source field to use a relative path string instead of an object with "type": "git-subdir"
  • The Claude Code marketplace schema expects relative path strings for plugins that live within the same marketplace repo

Problem

Running claude plugin marketplace add Gentleman-Programming/engram or engram setup claude-code fails with:

Failed to parse marketplace file: Invalid schema: plugins.0.source: Invalid input

The source field in .claude-plugin/marketplace.json used an object format:

"source": {
    "type": "git-subdir",
    "url": "https://github.com/Gentleman-Programming/engram.git",
    "path": "plugin/claude-code"
}

The Claude Code marketplace schema expects:

  • Relative path string for plugins within the same repo (e.g., "./plugin/claude-code")
  • Object with "source" discriminator for external repos (e.g., { "source": "url", "url": "..." })

Since the engram plugin lives inside this same repository at plugin/claude-code/, it should use the relative path format.

Fix

-      "source": {
-        "type": "git-subdir",
-        "url": "https://github.com/Gentleman-Programming/engram.git",
-        "path": "plugin/claude-code"
-      },
+      "source": "./plugin/claude-code",

Tested

  1. claude plugin marketplace add — succeeds
  2. claude plugin install engram — succeeds
  3. Plugin loads correctly in Claude Code session

Note

This also impacts engram setup claude-code since it internally calls claude plugin marketplace add. The setup command will work after this fix.

The marketplace.json used an object format with `"type": "git-subdir"`
for the plugin source field. This does not conform to the Claude Code
marketplace schema, which expects either:
- A relative path string (for plugins within the same marketplace repo)
- An object with `"source"` as the discriminator key (for external repos)

Since the engram plugin lives inside this same repository at
`plugin/claude-code/`, the correct format is a relative path string:
`"./plugin/claude-code"`.

This caused `claude plugin marketplace add` and `engram setup claude-code`
to fail with: "Invalid schema: plugins.0.source: Invalid input"

Tested locally: marketplace add + plugin install both succeed after fix.
@jonato96
Copy link

I ran into this exact issue on Windows 11 and can confirm the problem.

The marketplace.json uses "type": "git-subdir" inside the source object, which is not a valid source type in Claude Code's schema. This causes the following error when trying to add the marketplace:

Failed to parse marketplace file: Invalid schema: plugins.0.source: Invalid input

I tested the fix locally by replacing the entire source object with a simple relative path string:

"source": "./plugin/claude-code"

After that change, the marketplace loads correctly and the plugin installs without issues. Hope this helps get the PR merged!

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.

2 participants