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.
By bendruckerMITIn 1 marketplace
Structured event log for mods: `$.modEvents.emit` writes per-session OTel log records as JSONL
Trending plugins
7-day copy clicks
Code that runs inside Claude Code on every session, as you, unsandboxed.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Terminal multiplexermultiplexer
Process name of the multiplexer whose attached clients decide whether a session is local or reached over mosh or ssh. Empty classifies from SSH_CONNECTION alone and skips the ps scan.
stringdefault
1 critical to review before installing
JavaScript or TypeScript that runs inside Claude Code as you, unsandboxed. Read from its source, it runs programs; writes files; reads environment variables (CLAUDE_CONFIG_DIR, HOME, SSH_CONNECTION); acts on other mods as they load.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Telemetry for mods. It adds $.modEvents.emit, which writes each mod's events to per-session JSONL. Each line is an OpenTelemetry log record, so a collector can tail the files, and the observability:session index ingests them as mod_events.
register.ts provides emit and records at session start whether the session is local or reached over mosh or ssh, with each attached client's reach for the multiplexer named by the multiplexer option (for example herdr). Empty, the default, classifies from SSH_CONNECTION alone.types/index.d.ts declares $.modEvents.emit.A mod lists "dependencies": ["mod-events"] in its plugin.json, adds "../../mod-events/types" to its mod/tsconfig.json include, and calls:
void $.modEvents.emit({ mod: "herdr", event: "herdr.call", ok: exitCode === 0, ms, detail: { command, exitCode, stderr } });
emit never rejects. Without this plugin enabled, the default emit drops events. Every mod emits session.start from its session.start hook, so a query can tell whether it was live.
Records land in <config>/mod-events/<session>/<mod>.<instance>.<n>.jsonl, <config> being CLAUDE_CONFIG_DIR or ~/.claude. <instance> is the first event's timestamp, so a reload starts new files, and <n> rolls at 64 KB.
Each line is one OTel log record with the data model's field names, flat rather than wrapped in an OTLP resourceLogs envelope:
{"timestamp":"2026-10-06T17:00:00.012Z","severity_text":"WARN","severity_number":13,"event_name":"herdr.herdr.call","attributes":{"command":"pane.report-agent","exitCode":1,"stderr":"…","duration_ms":12,"session.id":"<session-id>"},"resource":{"service.name":"claude-code","service.version":"2.1.291","claude_code.surface":"mosh"},"scope":{"name":"herdr"}}
timestamp is ISO 8601 in UTC, like Claude Code's own event.timestamp.severity_text is INFO (9), or WARN (13) when ok is false. A failing mod degrades the session without ending it, so nothing logs ERROR.event_name is <mod>.<event>.attributes holds detail, plus duration_ms from ms and session.id. Both keys match Claude Code's native OTel events, so a backend can join a mod's records to the session's own telemetry.resource carries service.name (claude-code, as the native exporter uses) and service.version. Once the session's heartbeat has judged it, it also carries claude_code.surface (local, mosh, or ssh).scope.name is the mod. The engine doesn't expose a calling plugin's version, so scope has no version.$.fs can only replace a file whole, so each event rewrites its chunk. The new text always extends the old, and a rolled chunk is never written again, so a tailer's fingerprint and offset stay valid. $.fs.write truncates and then writes in place rather than renaming a temp file over the chunk, and $.fs has no rename. A tailer polling inside that window reads an empty file. The collector's filelog receiver skips a file whose fingerprint is empty, then resumes at its offset once the bytes are back.
An otelcol-contrib filelog receiver maps each line into a log record. event_name lands as the event.name attribute, as Claude Code's own events carry it:
receivers:
filelog/mod_events:
include: ["${env:HOME}/.claude/mod-events/**/*.jsonl"]
start_at: beginning
operators:
- type: json_parser
parse_to: body
timestamp:
parse_from: body.timestamp
layout_type: gotime
layout: "2006-01-02T15:04:05.000Z07:00"
severity:
parse_from: body.severity_text
scope_name:
parse_from: body.scope.name
- type: move
from: body.attributes
to: attributes
- type: move
from: body.event_name
to: attributes["event.name"]
- type: move
from: body.resource
to: resource
- type: remove
field: body
Retention deletes the oldest files once the directory passes 500 MB. The session index keeps rows it has already ingested.
In a test, stub $.modEvents from your own engine.create hook and collect events at modEvents.emit:
on("engine.create", async ($, e, next) => ({ ...(await next(e)), modEvents: { emit: () => Promise.resolve() } }));
on("modEvents.emit", ($, e) => (events.push(e), { value: undefined }));
bun scripts/mod-test.ts mod-events runs the mod's tests.
Built 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 bendrucker/claude --plugin mod-eventsPlugins from other owners that cover similar ground