Skip to content

plugin.json validation fails: "hooks" and "agents" string paths rejected by current Claude Code schema #1

Description

@vbutardo

Problem

Installing matsengrp-agents from the marketplace produces this error in claude /doctor:

Plugin matsengrp-agents has an invalid manifest file at .claude-plugin/plugin.json.
Validation errors: hooks: Invalid input, agents: Invalid input

Cause

.claude-plugin/plugin.json declares:

"agents": "agents/",
"hooks": "hooks/hooks.json"

The current Claude Code plugin schema rejects strings for these keys:

  • agents expects an array of agent objects (or omitted, in which case agents/ is auto-discovered).
  • hooks expects an inline hooks-config object (or omitted, in which case hooks/hooks.json is auto-discovered).

Analogous to commit 960560a ("Fix marketplace.json source path format"), which corrected a similar schema mismatch.

Suggested fix

Drop both fields — the agents/ directory and hooks/hooks.json already sit at the standard auto-discovery paths, so all 12 agents plus the Notification/Stop hooks continue to load.

   "keywords": [
     "scientific-writing",
     ...
     "bioinformatics"
-  ],
-  "agents": "agents/",
-  "hooks": "hooks/hooks.json"
+  ]
 }

Verified locally

After applying this diff to my local clone:

  • claude /doctor passes.
  • All 12 agents (scientific-tex-editor, snakemake-pipeline-expert, etc.) still load.
  • Both Notification and Stop hooks still fire.

Environment

  • Claude Code: latest
  • Plugin commit: f6cd4d1

Happy to send a PR — will follow up shortly.


Reported by Vito Butardo (vbutardo), Swinburne University of Technology.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions