There are a number of hooks referenced in `.claude/settings.json` but not included in the `hooks` folder
e.g.
"hooks": {
...
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bun /Users/daniel/.claude/hooks/session-start-hook.ts"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "bun /Users/daniel/.claude/hooks/stop-hook.ts"
}
]
}
],
"SubagentStop": [
{
"hooks": [
{
"type": "command",
"command": "bun /Users/daniel/.claude/hooks/subagent-stop-hook.ts"
}
]
}
],
"PreCompact": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "bun /Users/daniel/.claude/hooks/context-compression-hook.ts"
}
]
}
]
},
I'd love to know what they are and whether worth using. Thanks!
@skinnyandbald tyhere a hint of it in the blog post.
This is a Claude Code hook that runs on EVERY user prompt submission. It literally intercepts every message I send and adds mandatory instructions that Claude sees before processing the actual prompt.
Here's what makes this so powerful—the hook lives at ~/.claude/hooks/user-prompt-submit-context-loader.ts and outputs something like this on every interaction:
// MANDATORY CONTEXT CHECK
// You MUST load these context files before responding:
// 1. Read ~/.claude/context/CLAUDE.md
// 2. Read ~/.claude/context/tools/CLAUDE.md
// 3. Read ~/.claude/context/projects/CLAUDE.md
//
// You will provide incorrect responses without this context.
@mattjoyce I don't believe that's relevant to the hook issue I flagged. I am referring to the other hooks (under SessionStart, etc).
cc/ @danielmiessler appreciate any insight on that.
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bun /Users/daniel/.claude/hooks/session-start-hook.ts"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "bun /Users/daniel/.claude/hooks/stop-hook.ts"
}
]
}
],
"SubagentStop": [
{
"hooks": [
{
"type": "command",
"command": "bun /Users/daniel/.claude/hooks/subagent-stop-hook.ts"
}
]
}
],
"PreCompact": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "bun /Users/daniel/.claude/hooks/context-compression-hook.ts"
}
]
}
]
Fixed, thank you!