Skip to content

Fix plugin.json: remove invalid hooks/agents string paths (closes #1)#2

Open
vbutardo wants to merge 1 commit into
matsengrp:mainfrom
vbutardo:fix/plugin-manifest-schema
Open

Fix plugin.json: remove invalid hooks/agents string paths (closes #1)#2
vbutardo wants to merge 1 commit into
matsengrp:mainfrom
vbutardo:fix/plugin-manifest-schema

Conversation

@vbutardo
Copy link
Copy Markdown

@vbutardo vbutardo commented May 7, 2026

Closes #1.

Summary

/.claude-plugin/plugin.json declares agents and hooks as string paths:

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

The current Claude Code plugin schema rejects strings for these keys, so installing the plugin produces:

Validation errors: hooks: Invalid input, agents: Invalid input

(see claude /doctor). Both fields are unnecessary anyway — the agents/ directory and hooks/hooks.json already sit at the standard auto-discovery paths, so dropping them restores manifest validity without changing behaviour.

Diff

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

Test plan

  • python3 -c "import json; json.load(open('.claude-plugin/plugin.json'))" — JSON parses
  • claude /doctor — passes (validated on a local copy with this patch applied)
  • All 12 agents (scientific-tex-editor, snakemake-pipeline-expert, pdf-question-answerer, etc.) still load via auto-discovery
  • Both hooks (Notification, Stop) in hooks/hooks.json still fire

Context

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


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

The current Claude Code plugin schema rejects strings for the `agents`
and `hooks` keys, causing /doctor to report:

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

Both fields are unnecessary anyway: the agents/ directory and
hooks/hooks.json already sit at the standard auto-discovery paths,
so removing the redundant declarations restores manifest validity
without changing behaviour. All 12 agents and the Notification/Stop
hooks continue to load.

Analogous to commit 960560a (marketplace.json source path format).

Closes matsengrp#1
Copilot AI review requested due to automatic review settings May 7, 2026 02:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes .claude-plugin/plugin.json manifest validation by removing the agents and hooks fields that were previously provided as string paths, which the current Claude Code plugin schema rejects. The plugin’s agents and hooks continue to be discovered via the standard agents/ and hooks/hooks.json auto-discovery locations.

Changes:

  • Removed invalid string-valued agents manifest entry.
  • Removed invalid string-valued hooks manifest entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

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

2 participants