Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Run automatically on Claude Code events. Claude doesn't decide.
1 critical · 2 cautions to review before installing
A hook runs before every tool call and can block or approve it
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
hook-logging, debugging, event-logging, json-logs, session-monitoring, ndjson, hooks, logging
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A Claude Code plugin that logs all hook invocations to a JSON file with automatic rotation.
This plugin captures every hook event that occurs in Claude Code and logs it to a structured JSON file. Perfect for debugging, monitoring, and understanding Claude Code's behavior during development.
Comprehensive Logging: Captures all 9 hook event types:
NDJSON Format: Efficient newline-delimited JSON for easy appending and streaming
Automatic Rotation: Keeps last 1000 entries to prevent unlimited growth
Thread-Safe: Uses file locking for concurrent hook executions
Non-Blocking: Logging failures won't interrupt Claude Code operations
Install from the marketplace:
# Add this marketplace to your Claude Code config (if not already added)
/plugin marketplace add sevii/agent-marketplace
# The hook-logger plugin will be available
Or install manually by copying this directory to your Claude Code plugins directory.
Logs are stored at:
plugins/hook-logger/logs/hooks.json
The log file uses NDJSON (Newline Delimited JSON) format, where each line is a separate JSON object:
{"timestamp":"2025-12-19T14:30:45Z","hook_event_name":"PreToolUse","session_id":"abc123","tool_name":"Read","tool_input":{"file_path":"/path/to/file.txt"},"cwd":"/path/to/project","permission_mode":"auto","transcript_path":"/path/to/transcript"}
{"timestamp":"2025-12-19T14:30:46Z","hook_event_name":"PostToolUse","session_id":"abc123","tool_name":"Read","tool_result":"success"}
{"timestamp":"2025-12-19T14:30:50Z","hook_event_name":"UserPromptSubmit","session_id":"abc123"}
Each entry contains:
timestamp: ISO-8601 formatted timestamphook_event_name: Type of hook eventThis format is:
cat plugins/hook-logger/logs/hooks.json | jq '.'
tail -n 10 plugins/hook-logger/logs/hooks.json | jq '.'
wc -l plugins/hook-logger/logs/hooks.json
# View only PreToolUse events
cat plugins/hook-logger/logs/hooks.json | jq 'select(.hook_event_name == "PreToolUse")'
# View only tool executions (Pre and Post)
cat plugins/hook-logger/logs/hooks.json | jq 'select(.hook_event_name | test("ToolUse"))'
# View all Write tool invocations
cat plugins/hook-logger/logs/hooks.json | jq 'select(.tool_name == "Write")'
# View all events from a specific session
cat plugins/hook-logger/logs/hooks.json | jq 'select(.session_id == "your-session-id")'
cat plugins/hook-logger/logs/hooks.json | jq -s 'group_by(.hook_event_name) | map({event: .[0].hook_event_name, count: length})'
# Last 20 entries with just timestamp and event name
tail -n 20 plugins/hook-logger/logs/hooks.json | jq '{timestamp, hook_event_name, tool_name}'
# Find events containing a specific file path
cat plugins/hook-logger/logs/hooks.json | jq 'select(.tool_input.file_path | contains("config"))'
The maximum number of entries can be adjusted by editing the script:
# Edit hook-logger.sh
# Change the MAX_ENTRIES variable:
MAX_ENTRIES=1000 # Change to desired value
After changing, restart Claude Code for the change to take effect.
Test the plugin manually:
# Run built-in test
./plugins/hook-logger/hook-logger.sh test
# Simulate a hook event
echo '{"hook_event_name":"PreToolUse","session_id":"test","tool_name":"Read","tool_input":{"file_path":"/test"}}' | ./plugins/hook-logger/hook-logger.sh
# Verify the log was created
tail -n 1 plugins/hook-logger/logs/hooks.json | jq '.'
brew install jqapt-get install jq or yum install jqBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub sevii/agent-marketplace --plugin hook-loggerPlugins from other owners that cover similar ground