Skip to content

Instantly share code, notes, and snippets.

@samkeen
Created May 3, 2026 22:35
Show Gist options
  • Select an option

  • Save samkeen/4bdfee65b0237c5f3ee76124d5a1e983 to your computer and use it in GitHub Desktop.

Select an option

Save samkeen/4bdfee65b0237c5f3ee76124d5a1e983 to your computer and use it in GitHub Desktop.
example hook implementation to see when CLAUDE.md files are loaded
{
"hooks": {
"InstructionsLoaded": [
{
"hooks": [
{
"type": "command",
"command": "jq -r '({\"User\":\"πŸ‘€\",\"Project\":\"πŸ“\",\"Local\":\"πŸ“\",\"Plugin\":\"πŸ”Œ\"}[.memory_type] // \"πŸ“„\") as $e | \"\\($e) \\(.memory_type) \\(.file_path) \\(.load_reason)\"' >> instructions-loaded.log"
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment