abrahamvilchesdelacruz/ididntcatchthat/api-events

Claude Code and agent skill by abrahamvilchesdelacruz/ididntcatchthat

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

DomainEventPublisher interface, DomainEventConsumer, Subscriber abstract en apps/api/. Trigger: Al definir el DomainEventPublisher, crear un Subscriber concreto en application, o entender el flujo de domain events.

Install

npx vskill@latest install abrahamvilchesdelacruz/ididntcatchthat/api-events

SKILL.md

The same SKILL.md was published earlier as abrahamvilchesdelacruz/ididntcatchthat/api-events.

When to Use

  • Al definir el DomainEventPublisher interface o DomainEventConsumer interface
  • Al crear un Subscriber concreto en application
  • Al entender el flujo de eventos y la regla de dependencia
Lee references/docs.md para skills relacionadas, ADRs y documentación externa.
Lee references/subscriber-pattern.md para la clase Subscriber abstract completa, un ejemplo de subscriber concreto, SubscribersBootstrapper y el registro en módulos NestJS.

Capas y responsabilidades

Domain → DomainEvent, DomainEventPublisher interface
Application → Subscriber (abstract), DomainEventConsumer interface
Infrastructure → AmqpMessageBus, SubscribersBootstrapper, módulos NestJS

Flujo completo

UseCase
→ domainEventPublisher.publish(aggregate.pullDomainEvents())
→ AmqpMessageBus.publish() → RabbitMQ exchange
→ cola del subscriber
→ SubscribersBootstrapper.onModuleInit() → subscriber.init()
→ AmqpMessageBus.consume() → setupQueues() automático
→ subscriber.on(event) → UseCase correspondiente

Domain — DomainEventPublisher interface

typescript
// src/shared/domain/domain-event-publisher.ts
export interface DomainEventPublisher {
publish(events: DomainEvent[]): Promise<void>;
}
export const DOMAIN_EVENT_PUBLISHER = Symbol('DomainEventPublisher');

Application — DomainEventConsumer interface

typescript
// src/shared/application/domain-event-consumer.ts
export interface DomainEventConsumer {
consume(
queueName: string,
eventName: string,
exchangeName: string,
domainEvent: new (...args: unknown[]) => DomainEvent,
handler: (event: DomainEvent) => Promise<void>,
): Promise<void>;
}
export const DOMAIN_EVENT_CONSUMER = Symbol('DomainEventConsumer');

Queue Naming

<bounded-context>.<acción>_on_<evento_pasado>
progress.update_flashcard_stats_on_attempt_recorded
content.generate_flashcard_audio_on_flashcard_examples_completed
identity.send_welcome_email_on_user_registered

Las colas .retry y .dead_letter se crean automáticamente — ver api-events-infra.


Reglas

  • Subscriber abstract — cero imports de `@nestjs/common`
  • @Inject + @Injectable en el subscriber concreto son la única excepción permitida
  • OnModuleInit vive en infrastructure (SubscribersBootstrapper) — nunca en application
  • on() siempre delega a un UseCase — sin lógica de negocio propia
  • El subscriber vive junto al use case que dispara — nunca en carpeta subscribers/ independiente
  • domainEventPublisher.publish() se llama después de repository.save() — nunca antes
  • Ver implementación de infrastructure: skill api-events-infra

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/abrahamvilchesdelacruz/ididntcatchthat/api-events/badge)](https://verified-skill.com/skills/abrahamvilchesdelacruz/ididntcatchthat/api-events)

Something wrong with this skill or its page? Tell us.