cc-hooks
Made by JeffConfigure Claude Code hooks for PreToolUse, PostToolUse, Stop, Notification. Use when blocking commands, auto-formatting, custom permissions, or writing hooks.
From Jeffrey's Skills.md: professionally crafted skills for any AI agent, installed and kept in sync by the jsm CLI. Subscription only, $20/month.
Works With
Quality and Utility come from canonical skill metadata. Community ratings appear separately as stars when subscriber reviews exist.
Subscribe to download
Public previews are available, but downloads, CLI sync, and premium content require an active subscription.
Sign In to Subscribe- Full skill content with deterministic versioning
- CLI sync + local search index
- Access to Jeffrey’s premium library
Save to your account
Saved skills live in your cloud list. Run jsm sync on each machine to pull them locally.
What's New with this Skill
2Updates, enhancements, and release notes for this skill.
Updated: cc-hooks, hook behavior matched to current Claude Code
Several hook rules had drifted from how Claude Code behaves: exit 2 always blocks even with an allow JSON, JSON output is read on every exit code, the Task tool is now Agent, and Edit|Write matchers are exact-name lists. All matching hooks run in parallel on the original input, with deny taking precedence. Checked against Claude Code 2.1.282 and the official hooks docs.
- Exit 2 always blocks, even with an allow JSON; hook JSON is read on every exit code
- The Task tool is now Agent; Edit|Write matchers are exact-name lists
- Matching hooks run in parallel on the original input, and deny wins
- dcg blocks with a deny JSON on exit 0, not exit 2
- The advice-hook example now uses additionalContext, since stderr on exit 0 never reaches Claude
- Exit codes and JSON. Claude Code reads hook JSON on every exit code. Exit 2 always blocks, using the JSON reason when present and stderr otherwise; to allow or ask, exit 0 with JSON.
suppressOutputis accepted but has no effect, and Setup hook output is discarded. - Tools and matchers. The
Tasktool was renamedAgentin v2.1.63. A matcher likeEdit|Writeis a list of exact names; it becomes a regex only when it contains other characters.
New: Claude Code Hooks, customize Claude's behavior at every stage
Configure PreToolUse, PostToolUse, Stop, and Notification hooks to control what Claude Code can do. Block dangerous commands, auto-format on save, enforce custom permissions, and build automated workflows.
- PreToolUse hooks to block or modify tool calls before execution
- PostToolUse hooks for auto-formatting, linting, or logging after changes
- Stop hooks that keep Claude working until a condition holds, such as tests passing, with the stop_hook_active check that prevents infinite loops
- Real-world examples: block dangerous git commands and sensitive files, auto-run prettier, gofmt, or rustfmt, send desktop or Slack notifications