Skip to content
Back to skills

Eventing Hub

ASecurity

Event-sourcing and EventBus directives for Black-Tortoise, covering structured event schemas, append-before-publish flow, causality/id rules, and safe subscribers; use when touching src/app/eventing, EventBus, or any event handlers/projections.

  • 225 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 4, 2026
ai-agentsreactgit

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned September 4, 2026

npx -y skills add NeverSight/skills_feed --skill eventing-hub --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Eventing Hub?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Eventing Hub
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/neversight-eventing-hub/badge)](https://www.skillsdirectory.com/skills/neversight-eventing-hub)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: eventing-hub
description: Event-sourcing and EventBus directives for Black-Tortoise, covering structured event schemas, append-before-publish flow, causality/id rules, and safe subscribers; use when touching src/app/eventing, EventBus, or any event handlers/projections.
---

# Eventing Hub Master Guide

## Intent
Describe event contracts, persistence/publish order, and consumer safety for the shared EventBus described in `src/app/eventing/AGENTS.md` and `.github/instructions/20-ddd-event-sourcing-copilot-instructions.md`.

## Event Schema
- Declare events with a Type, Payload, Metadata, and Semantics structure; keep payloads immutable and document any allowed mutations in the metadata.
- Use a `correlationId` to tie related events, and assign a `causationId` that points to the triggering event (null only for root events).
- Emit only typed events from the Aggregates/Application services; do not publish raw DTOs or Firebase objects.

## Append → Publish → React
- Persist every outcome (Append) before invoking the `EventBus` publish step; never wrap append/publish in `Promise.all` or parallel flows to avoid causality gaps.
- After the append promise resolves, publish the event and let downstream stores/projections react via the global `EventBus` singleton.
- Reactions should be limited to simple projections or side effects; long-running work belongs to dedicated use cases handled by the Application layer.

## Causality Tracking & Immutability
- Maintain causation/correlation IDs for every published event; log them for tracing and include them in metadata for audit tooling.
- Treat emitted events as read-only facts; consumers may inspect but must never mutate payload or metadata objects.
- Use `Object.freeze()` or deep copies when broadcasting to ensure immutability guarantees reach all subscribers.

## Safe Subscriptions
- Convert the RxJS stream behind `EventBus` into signals at the Application boundary using `toSignal()` before exposing data to Presentation stores.
- Guard subscriptions with `takeUntilDestroyed()` or signal-based cleanup so that event handlers do not leak after a component/store is destroyed.
- Prefer `@ngrx/signals` stores for reacting to events; their `withMethods` handlers should call `patchState` based on event payloads rather than mutating the store directly.

## Validation & Monitoring
- Validate payload schemas before append, using domain value objects to enforce invariants (Domain layer) and rejecting invalid data early.
- Emit audit events when Append or Publish steps fail so `docs/AUDIT-*` trackers capture the problem context.
- Feed causality IDs into any observability tooling to verify the Append→Publish→React chain during CI or runtime tracing.

Files in this skill

  • SKILL.md2.7 KB
  • description_ar.txt393 B
  • description_cn.txt228 B
  • description_de.txt297 B
  • description_en.txt245 B
  • description_es.txt310 B
  • description_fr.txt343 B
  • description_it.txt284 B
  • description_ja.txt383 B
  • description_ko.txt280 B
  • description_ru.txt523 B
  • description_tw.txt231 B
  • stats.json65 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.