Skip to content

fix: replace invalid notification hook type with command hooks - #1

Open
ocrlegal wants to merge 1 commit into
brainbytes-dev:mainfrom
ocrlegal:main
Open

fix: replace invalid notification hook type with command hooks#1
ocrlegal wants to merge 1 commit into
brainbytes-dev:mainfrom
ocrlegal:main

Conversation

@ocrlegal

Copy link
Copy Markdown

Summary

hooks/hooks.json used "type": "notification" for the PreToolUse and Stop hooks, which isn't a valid hook action type in the Claude Code hooks schema (only "command" is supported). This caused the entire plugin to fail to load after install (invalid_union / "No matching discriminator" on hooks.PreToolUse[0].hooks[0].type and hooks.Stop[0].hooks[0].type).

Replaced both with "type": "command" entries pointing at two new small scripts (scripts/hooks/pretooluse-reminder.js and scripts/hooks/session-end-reminder.js) that print the same reminder messages to stderr, following the existing convention used by the other hook scripts in this repo.

Type

  • Skill (new marketing domain knowledge)
  • Agent (new specialized marketing role)
  • Command (new slash command)
  • Hook (new automation)
  • Rule (new compliance/brand rule)
  • Bug fix
  • Documentation

Marketing Discipline

  • Brand & Positioning
  • Content
  • Copywriting
  • SEO
  • Social Media
  • Email Marketing
  • Paid Advertising
  • Analytics
  • Growth
  • PR & Communications
  • Product Marketing
  • CRO
  • Research
  • Influencer
  • Community
  • Marketing Ops
  • Other: ___

Testing

Installed the plugin locally via claude plugin marketplace add + claude plugin install and confirmed it failed to load with the schema validation error above. After this fix, reinstalling from the patched marketplace loads without error.

Checklist

  • Follows format guidelines (YAML frontmatter, section structure)
  • Tested with Claude Code
  • No sensitive info (API keys, client data)
  • Clear descriptions and examples
  • Compliance-aware content (no dark patterns, misleading claims)

hooks/hooks.json used "type": "notification" for PreToolUse and Stop
hooks, which isn't a valid hook action type in the Claude Code schema
(only "command" is supported). This caused the plugin to fail to load
entirely on install. Replaced both with small command hooks that print
the same reminder messages to stderr.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ibkcEcHyfcbXe7ErXQBUS
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.

1 participant