eobrien60/forge/obh-add-events

Claude Code and agent skill by eobrien60/forge

Trust tier 3
  • community
Source check pending

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-events

SKILL.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)

  1. Find the writes. Inspect apps/api/src/routes/*.ts and apps/api/src/domain/* for handlers that INSERT/UPDATE/DELETE or change state. Every meaningful state transition is a candidate fact. Ignore pure reads.
  1. Name events as facts. Use resource.pastTenseVerb in dot.notation: note.created, note.updated, note.deleted, invoice.paid, user.invited. State changes get their own event (order.shipped), not a generic order.updated, when a consumer would care about the specific transition.
  1. 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.
  1. 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.
  1. 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 add choices — 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)

  1. Install the primitive. Run forge add events (use --dry-run first). This scaffolds the outbox/dispatcher migration in scripts/migrations.d/*, the @obh/events client, and the in-app bus at apps/api/src/bus.ts. Run pnpm migrate to apply the platform schema.
  1. Wire the emits. In each write handler, call bus.emit('note.created', payload) inside the tx. Auto-loaded subscribers live in apps/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). Use defineX/createXClient grammar from @obh/events for the typed event definitions. Then forge 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/eobrien60/forge/obh-add-events/badge)](https://verified-skill.com/skills/eobrien60/forge/obh-add-events)

Something wrong with this skill or its page? Tell us.