By dannycoates
Logs all Claude Code hook events to NDJSON files in /tmp/cc-hook-debug/
npx claudepluginhub dannycoates/cc-hook-log --plugin cc-hook-logA Claude Code plugin that logs every hook event to NDJSON files for debugging and observability.
Each session writes to /tmp/cc-hook-debug/<session_id>.jsonl with one JSON object per line.
All 14 hook events: SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, PostToolUseFailure, Notification, SubagentStart, SubagentStop, Stop, TeammateIdle, TaskCompleted, PreCompact, SessionEnd
All hooks run async (non-blocking). No matchers — everything is captured.
claude --plugin-dir /path/to/cc-hook-log
/plugin marketplace add https://github.com/dannycoates/cc-hook-log
/plugin install cc-hook-log@cc-hook-log
After running a session with the plugin active:
# Check for log files
ls /tmp/cc-hook-debug/
# View recent events
cat /tmp/cc-hook-debug/*.jsonl | head -5 | jq .
# List event types captured
cat /tmp/cc-hook-debug/*.jsonl | jq -r '.hook_event_name' | sort -u
A single script (log-hook.mjs) handles all hook events. It reads the hook input JSON from stdin, extracts the session_id, and appends the JSON as a single line to the session's .jsonl file.
node:fs/promises)MIT
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Matches all tools
Hooks run on every tool call, not just specific ones
Persistent memory system for Claude Code - seamlessly preserve context across sessions
Intelligent prompt optimization using skill-based architecture. Enriches vague prompts with research-based clarifying questions before Claude Code executes them