Agent skill · software engineering · jeremylongshore

emitting-api-events

Build event-driven APIs with webhooks, Server-Sent Events, and real-time

Why this skill is useful

Adds executable scripts for event-driven API architecture, including webhook management and SSE streaming that aren't in public docs.

What it needs

Requires apache-kafka, aws-sns, aws-sqs, bull, celery, mongodb, postgresql, rabbitmq, redis installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Emitting API Events Overview Build event-driven API architectures using outbound webhooks, Server-Sent Events (SSE), and message broker integration. Implement event emission from API mutations, event schema registry, subscriber management, delivery guarantees with retry logic, and event sourcing patterns for maintaining a complete audit log of API state changes. Prerequisites Message broker: Redis Pub/Sub, RabbitMQ, Apache Kafka, or AWS SNS/SQS Persistent storage for event log and subscriber registrations (PostgreSQL, MongoDB) Webhook delivery infrastructure with retry queue (Bull, Celery, or managed service) Event schema registry for versioned event type definitions SSE-capable web framework for real-time event streaming to browser clients Instructions 1. Identify event-producing operations using Grep and Read, cataloging every API mutation (POST, PUT, PATCH, DELETE) that should emit events, with event type names following resource.action convention (e.g., order.created, user.updated). 2. Define event schemas for each event type with versioning: include eventId (UUID), eventType, version, timestamp (ISO 8601), source (service identifier), and data (type-specific payload). 3. Implement the event emitter service that publishes events to the message broker after successful API mutations, using the transactional outbox pattern to ensure events are not lost on application crash. 4. Build a webhook subscription management API: POST /webhooks (subscribe), GET /webhooks (list), DELETE /webhooks/:id (unsubscribe), with URL validation, event type filtering, and signing secret generation. 5. Implement webhook delivery with HMAC-SHA256 signed payloads, configurable retry policy (exponential backoff: 1min, 5min, 30min, 2hr, 24hr), and automatic subscription deactivation after consecutive failures. 6. Add Server-Sent Events endpoint (GET /events/stream) for real-time event delivery to browser clients, with Last-Event-ID support for reconnection and missed event replay. 7. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/emitting-api-events--512aa7

View the source on GitHub

Browse the @skills marketplace