Skip to content

fix: remove invalid hooks field from plugin.json#94

Open
ctrl-post wants to merge 1 commit intotanweai:mainfrom
ctrl-post:fix-plugin-json-hooks-field
Open

fix: remove invalid hooks field from plugin.json#94
ctrl-post wants to merge 1 commit intotanweai:mainfrom
ctrl-post:fix-plugin-json-hooks-field

Conversation

@ctrl-post
Copy link
Copy Markdown

Problem

The plugin fails to install with the following error:

✘ Failed to install plugin "pua@pua-skills": Plugin has an invalid manifest
file. Validation errors: hooks: Invalid input

Root Cause

The plugin.json contains an invalid "hooks": "hooks/hooks.json" field.
According to Claude plugin specification, hooks should be placed in
hooks/hooks.json at the repository root, and should NOT be declared in
plugin.json.

Looking at official plugins like security-guidance, the plugin.json does not
include a hooks field - Claude automatically discovers hooks/hooks.json.

Solution

Remove the "hooks": "hooks/hooks.json" field from
.claude-plugin/plugin.json. The hooks configuration file at hooks/hooks.json
remains unchanged and will be auto-discovered.

Testing

After the fix:

claude plugin install pua@pua-skills
# ✔ Successfully installed plugin: pua@pua-skills (scope: user)

Files Changed

- .claude-plugin/plugin.json - Removed invalid hooks field

@tanweai
Copy link
Copy Markdown
Owner

tanweai commented Mar 22, 2026

Approved. Merge conflict — please rebase on latest main and we'll merge.

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