eobrien60/forge/obh-add-events
Claude Code and agent skill by eobrien60/forge
- community
Checking that the SKILL.md file is still in the repository.
Use to assess or add an event catalogue to a project's domain — turning writes into emitted facts. Inspects routes/services and proposes dot.notation event names, payloads, and exact in-transaction emit sites (assessment); then guides `forge add events` and wiring the emits (implementation). Assessment-only by default; implements on request.
Install
npx vskill@latest install eobrien60/forge/obh-add-eventsSKILL.md
The same SKILL.md was published earlier as eobrien60/forge/obh-add-events.
Purpose: give a project a coherent set of domain events (facts) so other primitives can react, without inventing events that don't map to real state changes. Events are facts in dot.notation (e.g. note.created); they are emitted inside the write transaction that produced them.
Assessment (read-only)
- Find the writes. Inspect
apps/api/src/routes/*.tsandapps/api/src/domain/*for handlers that INSERT/UPDATE/DELETE or change state. Every meaningful state transition is a candidate fact. Ignore pure reads.
- Name events as facts. Use
resource.pastTenseVerbin dot.notation:note.created,note.updated,note.deleted,invoice.paid,user.invited. State changes get their own event (order.shipped), not a genericorder.updated, when a consumer would care about the specific transition.
- Design payloads. Each payload carries the IDs and the minimal facts a consumer needs — resource id, actor id, workspace/tenant id, and the fields that changed (or before/after for updates). Keep payloads flat and serialisable; reference large blobs by id, don't inline them. Avoid leaking secrets or full PII into payloads that audit/analytics will persist.
- Pin the transaction boundary. For each event, identify the exact write transaction and note where the emit must go inside it (same tx/connection as the DB write) so the fact and the state commit atomically via the outbox. Record the precise call-site (file + function + line region). If a handler does multiple writes, decide whether it emits one event or several.
- Map future consumers. For each event, list which primitives should react: notifications (user-facing email/rules), audit (immutable trail), analytics (KPIs), search (index updates), webhooks (outbound), jobs (follow-up commands). This drives later
forge addchoices — don't wire them yet, just record intent.
Produces the event catalogue. Nothing above mutates the repo — a valid stopping point when you only need the survey (and the input several retrofit skills depend on: obh-retrofit-search / analytics / notifications / webhooks and obh-generate-audit-rules all consume events).
Implementation (only after the catalogue is agreed)
- Install the primitive. Run
forge add events(use--dry-runfirst). This scaffolds the outbox/dispatcher migration inscripts/migrations.d/*, the@obh/eventsclient, and the in-app bus atapps/api/src/bus.ts. Runpnpm migrateto apply the platform schema.
- Wire the emits. In each write handler, call
bus.emit('note.created', payload)inside the tx. Auto-loaded subscribers live inapps/api/src/bus.d/*— add a subscriber file per reacting concern (they run in-process; heavy work should enqueue a job rather than block the request). UsedefineX/createXClientgrammar from@obh/eventsfor the typed event definitions. Thenforge doctor.
Output
Assessment → the event catalogue: a table of event.name → payload shape → emitting file/tx site → intended consumers, flagging any write that currently emits nothing but should. Implementation → the forge add events (with --dry-run note) + pnpm migrate steps and a per-handler wiring plan showing where bus.emit(...) goes inside each transaction and which bus.d/* subscribers to create.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/obh-add-events/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/eobrien60/forge/obh-add-events)