Plugin Hooks

Auto-loading runtime hooks and the judge gate.

Plugin hooks

The core and judge-design plugins ship runtime hooks that load automatically when the plugin is enabled. No settings.json editing and no install step.

HookPluginEventBehavior
judge-hookjudge-designPreToolUseMatches risky tool calls against ~/.claude/judge-rules.json. Deny rules block; ambiguous cases escalate to a Haiku judge. No-op until the rules file exists.
writing-guardcorePostToolUseFlags AI writing tells in written artifacts and asks for a revision.
notifycoreStop, compaction, idleOS desktop notifications on lifecycle events.
session-startcoreSessionStartInjects context when DISABLE_ADVISOR=1; otherwise a no-op.
judge-hook PreToolUse flow

Activate the judge gate

The judge hook is a no-op until ~/.claude/judge-rules.json exists. Run /judge-design:judge-setup to create it from the bundled example and optionally set defaultMode to bypassPermissions.

Don’t mix install modes

The marketplace and aggregate install modes ship the same hooks. Enable one or the other, never both, or every hook fires twice.

How to get this wrong

A common mistake: you install a few plugins from the marketplace, then later add the whole repository as the single aggregate plugin to “get everything in one go”. Both are now enabled:

# marketplace mode (per plugin)
/plugin install core
/plugin install judge-design

# ...then ALSO the aggregate plugin (the whole repo as one plugin)
/plugin install skylence-claude-code-marketplace

Two hook configs are now active at the same time: plugins/core/hooks/hooks.json (from the core plugin) and aggregate-hooks.json (from the aggregate plugin). They register the same judge-hook, writing-guard, and notify entries.

What you would notice

  • Two desktop notifications on every Stop instead of one.
  • The judge gate runs on each Bash, Edit, or Write twice: doubled latency and a second “Judging tool call…” status.
  • writing-guard scans every file write twice, so a blocked write reports the same violation twice.

The fix

Keep one mode, remove the other, then reload:

# keep the marketplace plugins:
/plugin uninstall skylence-claude-code-marketplace

# or keep the aggregate plugin instead:
/plugin uninstall core judge-design

/reload-plugins

A third copy can also come from an older core:solo-setup that wrote the hooks into ~/.claude/settings.json. If you ran it, delete the judge-hook.sh, writing-guard.sh, and notify.sh entries there too.