event-flow

Add dataclass-based events to Bob The Skull's publisher-subscriber architecture.

Updated Nov 21, 2025
One-click install
npx skills add https://github.com/want2bet/BobTheSkull5 --skill event-flow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: event-flow
Source: https://github.com/want2bet/BobTheSkull5/tree/main/.claude/skills/event-flow
Command: npx skills add https://github.com/want2bet/BobTheSkull5 --skill event-flow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill guides the design and integration of new events within Bob The Skull's event-driven architecture, ensuring publishers, subscribers, and handlers are consistently wired.

Core Features & Use Cases

  • Define New Events: Create well-typed dataclasses for new event types.
  • Publishers & Subscribers: Add producers and handlers with clear contracts.
  • Flow Mapping: Document end-to-end event flows and debugging patterns.

Quick Start

  1. Create YourEvent in events.py with dataclass fields.
  2. Publish events in a component when the trigger condition occurs.
  3. Subscribe to YourEvent in the relevant component and implement on_your_event().
  4. Update state machine integration if the event affects transitions.

Frequently Asked Questions about event-flow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add new events to an event-driven architecture?

Add new events by creating dataclass definitions in events.py with typed fields, then publish them from components when trigger conditions occur and subscribe to them in handlers. This ensures publishers, subscribers, and state-machine handlers are consistently wired across the system.

What's the best way to debug missing event handlers in a pub/sub system?

Map end-to-end event flows to identify disconnected publishers and subscribers. The Skill provides debugging patterns and guidance for wiring subscribers to events, ensuring handlers are called when events publish and state transitions execute correctly.

How do I implement event publishers and subscribers with clear contracts?

Define event types as dataclasses, implement on_event methods in subscriber components, and call publish from publishers when conditions trigger. This pattern establishes explicit contracts between producers and handlers within the event bus interface.

Can I integrate new events with state machine transitions?

Yes. Update state machine integration when events affect transitions by subscribing handlers to specific event types and triggering state changes within on_event callbacks, maintaining consistency across the event lifecycle.

What structure should event definitions follow in an event-driven system?

Events should be defined as typed dataclasses with specific fields representing event data. This approach provides type safety, clear contracts between publishers and subscribers, and simplifies end-to-end testing of event flows.