Skip to content

fix(claude-plugin): resolve schema validation error in marketplace.json#71

Merged
Alan-TheGentleman merged 1 commit into
Gentleman-Programming:mainfrom
alaslibress:fix-marketplace-schema
Mar 13, 2026
Merged

fix(claude-plugin): resolve schema validation error in marketplace.json#71
Alan-TheGentleman merged 1 commit into
Gentleman-Programming:mainfrom
alaslibress:fix-marketplace-schema

Conversation

@alaslibress

Copy link
Copy Markdown
Contributor

Fix invalid schema in marketplace.json breaking automated setup

Type Bug Fix
File ./.claude-plugin/marketplace.json
Scope Marketplace schema validation

The Bug

When users run the automated setup command:

engram setup claude-code

The CLI fails during the marketplace validation step with:

✘ Failed to add marketplace: Invalid schema: plugins.0.source: Invalid input

Root Cause

In ./.claude-plugin/marketplace.json, the source object contained a redundant nested "source" key. The strict JSON unmarshaler in the Go CLI (or the Anthropic marketplace schema validation) fails to parse this nested structure — it expects either a flattened string or a different key identifier like "type".


Changes Made

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

Note to maintainer

If the Anthropic schema requires a different specific key instead of "type", please adjust during merge. The current nested "source" key is the one actively breaking the automated setup flow.


Testing

Verified that correcting this JSON structure allows the engram setup claude-code unmarshaling process to pass without throwing the Invalid input panic.


Credits to @alaslibress ;)

Updated the nested source key to fix the setup unmarshaling panic.
@alaslibress

Copy link
Copy Markdown
Contributor Author

On a personal note: I was installing the tool for my personal Claude Code on my Fedora Linux machine and ran into this error. I couldn't resist digging into the repository to see what was going on. My only disappointment was finding out it was just a simple JSON schema fix—I was actually looking forward to poking around the Go codebase since I'm currently learning it! Thks for the awesome tool anyway ;;)

@Alan-TheGentleman
Alan-TheGentleman merged commit 1a61278 into Gentleman-Programming:main Mar 13, 2026
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