hook-event-emitter

Emit Claude Code hook events to a local JSONL queue and localhost WebSocket dashboard.

3|2|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/Yoodaddy0311/artibot --skill hook-event-emitter-yoodaddy0311
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hook-event-emitter
Source: https://github.com/Yoodaddy0311/artibot/tree/main/plugins/artibot/skills/hook-event-emitter
Command: npx skills add https://github.com/Yoodaddy0311/artibot --skill hook-event-emitter-yoodaddy0311

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Claude Code hook events (tool calls, session lifecycle, errors) are invisible by default, making it hard to debug agent behavior or monitor session activity. This Skill fans out every hook event into a normalized JSON envelope stored in a local JSONL queue and optionally broadcast over a localhost-only WebSocket, giving you an on-device observability surface with zero external data transfer. ## Core Features & Use Cases - Event Normalization: Converts 12 Claude Code hook event types (SessionStart, PreToolUse, PostToolUse, SubagentStop, PreCompact, and more) into a versioned JSON envelope schema. - Local-Only Pipeline: Appends events to runtime/events/YYYY-MM-DD.jsonl and broadcasts to a WebSocket server bound strictly to 127.0.0.1, with a local token file for authentication. - Built-in Privacy Redaction: Applies redactObject from lib/core/redaction.js to mask tokens, file paths, emails, and long prompts before any event is persisted. - Use Case: You are building a local agent dashboard and want a live timeline of tool calls, error rates, and token usage per session. This Skill defines the emitter hook, the envelope schema, retention policy (24h default), and aggregation views so the dashboard can subscribe and render immediately. ## Quick Start Ask the agent to set up the hook-event-emitter skill so Claude Code hook events are written to a local JSONL queue and streamed to a localhost dashboard.

Frequently Asked Questions about hook-event-emitter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I monitor Claude Code hook events in real time?▼

Use the event-emitter hook script to normalize each hook event into a JSON envelope, append it to a daily JSONL file, and broadcast it over a WebSocket on 127.0.0.1. A local dashboard subscribes to the socket and renders timelines, histograms, and error rates.

What events can a Claude Code hook monitor capture?▼

The emitter normalizes 12 event types: SessionStart, SessionEnd, UserPromptSubmit, PreToolUse, PostToolUse, Stop, SubagentStop, PreCompact, Notification, TaskCreated, TaskCompleted, and ErrorRaised. Each is wrapped in a versioned envelope with timestamp, sessionId, and payload.

Does this observability pipeline send data to external services?▼

No. All events stay on the local machine by design. The WebSocket server binds only to 127.0.0.1, events are stored in runtime/events/*.jsonl, and external SaaS collectors like Datadog or NewRelic are explicitly prohibited by the data policy.

How are secrets and file paths handled in hook event payloads?▼

Payloads pass through redactObject from lib/core/redaction.js before storage. API keys become <REDACTED_TOKEN>, file paths become <REDACTED_PATH>, emails are masked, and long prompts are truncated to head and tail fragments.

What happens to hook events when the WebSocket server is offline?▼

Events are never lost because the hook always appends them to the local JSONL file first. The WebSocket send is fire-and-forget with a 50ms timeout, and a restarted dashboard can replay the day's JSONL file to rebuild state.

When should I not use a local hook event emitter?▼

Avoid it when you need cloud or remote telemetry pipelines, long-term audit logging, or simple webhook notifications. Retention defaults to 24 hours, so permanent audit trails belong in a separate runtime/audit log instead.