claude-code - 💡(How to fix) Fix `claude plugin validate` does not validate per-plugin `plugin.json` — invalid plugins pass validation, fail at install with opaque temp-cache error [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#60725Fetched 2026-05-20 03:51:07
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Error Message

claude plugin validate <path> only validates the marketplace.json schema at that path. It does not descend into the per-plugin plugin.json files referenced by the marketplace. Plugins whose manifests are invalid against the documented plugin.json schema pass validation cleanly, then fail at install with an opaque temp-cache path in the error.

  • The install-time error references the cache path (temp_local_<id>_<hash>), not the source plugin.json, making it hard to map the failure back to the file the author needs to fix. Plugin authors run claude plugin validate ., see green, and ship. Users hit the install-time failure with an opaque temp-path error message. The first round-trip to identify the actual problem (here: author must be an object, not a string per plugin.json schema) requires the author to know the schema by heart, since the validator's silence implied conformance.

Root Cause

This compounds existing pain documented in #54280 (validator silently allows version-field conflict between marketplace.json and plugin.json) — both bugs are instances of the same root cause: the validator does not enforce the full schema surface it appears to.

Code Example

{
     "name": "demo-marketplace",
     "owner": { "name": "Demo", "email": "[email protected]" },
     "metadata": { "description": "demo" },
     "plugins": [
       {
         "name": "demo-plugin",
         "source": "./",
         "description": "demo",
         "version": "0.1.0"
       }
     ]
   }

---

{
     "name": "demo-plugin",
     "version": "0.1.0",
     "description": "demo",
     "author": "Demo Person <[email protected]>"
   }

---

$ claude plugin validate .
   Validating marketplace manifest: .../.claude-plugin/marketplace.json
Validation passed

---

/plugin marketplace add <path>
   /plugin install demo-plugin@demo-marketplace

---

Failed to install: Plugin temp_local_1779238867431_g7r0x2 has an invalid manifest file at
   /Users/<you>/.claude/plugins/cache/temp_local_1779238867431_g7r0x2/.claude-plugin/plugin.json.
RAW_BUFFERClick to expand / collapse

Bug Description

claude plugin validate <path> only validates the marketplace.json schema at that path. It does not descend into the per-plugin plugin.json files referenced by the marketplace. Plugins whose manifests are invalid against the documented plugin.json schema pass validation cleanly, then fail at install with an opaque temp-cache path in the error.

The command name (claude plugin validate) implies plugin-manifest validation. The behavior is marketplace-manifest validation only. This is a false-confidence bug: a green check from validate does not mean the plugin will install.

Steps to Reproduce

  1. Create a single-plugin marketplace:

    .claude-plugin/marketplace.json:

    {
      "name": "demo-marketplace",
      "owner": { "name": "Demo", "email": "[email protected]" },
      "metadata": { "description": "demo" },
      "plugins": [
        {
          "name": "demo-plugin",
          "source": "./",
          "description": "demo",
          "version": "0.1.0"
        }
      ]
    }

    .claude-plugin/plugin.jsonintentionally invalid (author as string, schema requires object):

    {
      "name": "demo-plugin",
      "version": "0.1.0",
      "description": "demo",
      "author": "Demo Person <[email protected]>"
    }
  2. Run the validator:

    $ claude plugin validate .
    Validating marketplace manifest: .../.claude-plugin/marketplace.json
    ✔ Validation passed
  3. Add the marketplace and install the plugin:

    /plugin marketplace add <path>
    /plugin install demo-plugin@demo-marketplace
  4. Install fails with:

    Failed to install: Plugin temp_local_1779238867431_g7r0x2 has an invalid manifest file at
    /Users/<you>/.claude/plugins/cache/temp_local_1779238867431_g7r0x2/.claude-plugin/plugin.json.

Expected Behavior

claude plugin validate <path> should descend into each plugin entry's source and validate the referenced plugin.json against the documented plugin-manifest schema. Invalid plugin.json files should be reported with file path, field, and reason — before install is ever attempted.

If the command is intentionally scoped to marketplace-manifest-only validation, that scope should be (a) reflected in the command name (e.g., claude marketplace validate) and (b) called out explicitly in --help output and docs.

Actual Behavior

  • claude plugin validate <path> validates only marketplace.json's schema.
  • Per-plugin plugin.json files are not opened, not parsed, not validated.
  • Plugins with manifests that violate the documented schema pass validate and fail at install.
  • The install-time error references the cache path (temp_local_<id>_<hash>), not the source plugin.json, making it hard to map the failure back to the file the author needs to fix.
  • The validator gives no hint that per-plugin schema is out of scope.

Impact

Plugin authors run claude plugin validate ., see green, and ship. Users hit the install-time failure with an opaque temp-path error message. The first round-trip to identify the actual problem (here: author must be an object, not a string per plugin.json schema) requires the author to know the schema by heart, since the validator's silence implied conformance.

This compounds existing pain documented in #54280 (validator silently allows version-field conflict between marketplace.json and plugin.json) — both bugs are instances of the same root cause: the validator does not enforce the full schema surface it appears to.

Minimal Suggested Fix

Either:

  1. Make claude plugin validate <path> actually validate per-plugin plugin.json files referenced by the marketplace (resolving local source paths and downloading remote sources as install does). Report each schema violation with the source file path.
  2. Or rename to claude marketplace validate and add a separate claude plugin validate <plugin-dir> that validates a single plugin manifest at the given path.

Option 1 preserves the discoverable command name; option 2 preserves current behavior but stops misleading users.

Environment

  • Claude Code version: 2.1.145
  • OS: macOS 26.5 (Darwin 25.5.0)

Related Issues

  • #54280 — plugin.json silently overrides marketplace.json version with no validator warning (same root cause: validator scope < documented schema surface)
  • #42412 — claude plugin validate rejects $schema and description in marketplace.json (validator scope incorrectness, closed)
  • #38480 — same as #42412 (closed)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix `claude plugin validate` does not validate per-plugin `plugin.json` — invalid plugins pass validation, fail at install with opaque temp-cache error [1 participants]