← ClaudeAtlas

blueprinteventbus-integrationlisted

Implement event-driven communication using BlueprintEventBus for cross-module coordination. Use this skill when modules need to communicate without tight coupling, broadcasting domain events (task.created, member.added), subscribing to events with proper lifecycle management, and implementing event-driven workflows. Ensures events follow naming conventions ([module].[action]), include Blueprint context, and use takeUntilDestroyed() for automatic cleanup.
aiskillstore/marketplace · ★ 329 · AI & Automation · score 82
Install: claude install-skill aiskillstore/marketplace
# BlueprintEventBus Integration Skill This skill helps implement event-driven architecture using BlueprintEventBus. ## Core Principles ### Event-Driven Architecture - **Decoupling**: Modules communicate via events, not direct calls - **Blueprint Context**: All events include Blueprint information - **Type Safety**: Events are strongly typed with TypeScript - **Lifecycle Management**: Automatic subscription cleanup ### When to Use EventBus ✅ **DO use EventBus for:** - Cross-module communication - Broadcasting state changes to multiple listeners - Audit logging and activity tracking - Notification triggers - Workflow orchestration ❌ **DON'T use EventBus for:** - Simple parent-child component communication (use @Output) - Direct service-to-service calls within same module - Synchronous data fetching - Request-response patterns (use Services) ## Event Structure ### Base Event Interface ```typescript interface BlueprintEvent<T = any> { type: string; // Format: [module].[action] blueprintId: string; timestamp: Date; actor: string; // User ID who triggered event data: T; metadata?: Record<string, any>; } ``` ### Event Naming Convention ``` [module].[action] ``` Examples: - `task.created` - `task.updated` - `task.deleted` - `task.assigned` - `member.added` - `member.removed` - `file.uploaded` - `blueprint.archived` ## Publishing Events ### Basic Event Publishing ```typescript import { inject } from '@angular/core'; import { BlueprintEventBus } from '@core/s