# Decide Events

> When to use Events & Listeners vs direct calls. Decoupling decisions.

- Skill: `attac-t/decide-events` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add attac-t/decide-events`
- Raw SKILL.md: https://api.skillmd.com/api/skills/attac-t/decide-events/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: attac-t (https://skillmd.com/u/attac-t)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/attac-t/decide-events

---


# Skill: Events

> "Events are for side effects. Actions are for intent."

## The Decision

**Use Events when:**
- Side effects can multiply (notifications, logs, syncs)
- Consumers don't need the result
- Cross-domain communication is needed
- The trigger shouldn't know about all consequences

**Use Direct Calls when:**
- The caller needs a return value
- There's exactly one consumer, forever
- Failure must halt the operation

## The Heuristic

Ask: *"If I add another consequence later, should the caller change?"*

- **No** → Event
- **Yes** → Direct call

## The Quick Test

| Ask Yourself                 | Answer | Use    |
|------------------------------|--------|--------|
| Multiple reactions possible? | Yes    | Event  |
| Caller needs result?         | Yes    | Direct |
| External system involved?    | Yes    | Event  |
| Single, obvious dependency?  | Yes    | Direct |

## Real-World Examples

For concrete examples, see [examples.md](examples.md).

