stacks-events

Dispatch and handle application-wide events with action-based listeners in Stacks.

2|Updated Jul 8, 2026
One-click install
npx skills add https://github.com/bughq/bughq --skill stacks-events-bughq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stacks-events
Source: https://github.com/bughq/bughq/tree/main/.claude/skills/stacks-events
Command: npx skills add https://github.com/bughq/bughq --skill stacks-events-bughq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies the implementation of event-driven logic in Stacks applications by providing a lightweight, type-safe, and efficient way to dispatch and listen for application and model events.

Core Features & Use Cases

  • Event Dispatching: Easily trigger custom events or hook into automatic model lifecycle events like created, updated, or deleted.
  • Action-based Listeners: Decouple event triggers from business logic by mapping events to specific action files in the application structure.
  • Use Case: Automatically trigger a welcome email action whenever a new user is registered by dispatching a user:registered event.

Quick Start

Use the stacks-events skill to register a new listener for the user:created event that triggers the NotifyUser action.

Frequently Asked Questions about stacks-events

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

FAQPage Schema
How do I implement event-driven architecture in a Stacks application?

Event-driven architecture in Stacks is implemented using a lightweight emitter that dispatches application-wide events and maps them to action-based listeners, decoupling business logic from event triggers.

How do I automatically trigger an action when a model is created or updated?

Automatic model lifecycle observation hooks into created, updated, and deleted events by mapping them to specific action files in the application structure, triggering business logic without manual dispatching.

What is the best way to decouple business logic from event triggers in Stacks?

Decoupling business logic from event triggers is achieved through action-based listener resolution, which maps dispatched events to specific action files rather than embedding logic directly in the emitter.

Does the Stacks event system support type-safe event dispatching?

Yes, the Stacks event system provides a lightweight, type-safe method for dispatching custom application events and handling them through defined action-based listener structures.

How do I register a listener for a custom event like user:registered?

Registering a listener for custom events involves dispatching the event through the emitter and mapping it to a specific action file in the application structure to handle the triggered logic.

Do I need the Stacks framework to use this event emitter?

Yes, integration with the Stacks framework event system is required, as the emitter relies on the framework's defined event-to-action mapping structure and application architecture.