Skip to content

Fix hooks.json schema to use direct format across all plugins#31717

Open
RyanAlberts wants to merge 1 commit intoanthropics:mainfrom
RyanAlberts:fix-hooks-json-schema
Open

Fix hooks.json schema to use direct format across all plugins#31717
RyanAlberts wants to merge 1 commit intoanthropics:mainfrom
RyanAlberts:fix-hooks-json-schema

Conversation

@RyanAlberts
Copy link

Fixes #31278

The hooks.json schema validation enforces the direct event format. The previous setup incorrectly nested the events in a {"hooks": {...}} wrapper and included an invalid "description" field, resulting in errors during Claude Code hook execution (e.g., Stop hook error: JSON validation failed). This nested format also triggered jq validation errors inside validate-hook-schema.sh.

Changes Made

  • Removed the incorrect {"hooks": {...}} wrapper and "description" field from all hooks.json files across all plugins.
  • Added the required "matcher": "*" fields where they were omitted (e.g., hookify, learning-output-style, ralph-wiggum).
  • Fixed plugin-dev/skills/hook-development/SKILL.md documentation to instruct developers to use the correct direct format instead of the nested wrapper.
  • Verified that all updated hooks.json configurations now cleanly pass validate-hook-schema.sh.

Made with Cursor

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.

ralph-loop plugin: hooks.json has invalid schema (causes Stop hook JSON validation error)

2 participants