dabydat/alpha-omega/nestjs-saga-pattern

Claude Code and agent skill by dabydat/alpha-omega

Trust tier 3
  • community
Source check pending

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

Saga pattern for NestJS. Covers choreography vs orchestration, saga steps, compensation logic, and multi-step process coordination. Use when implementing multi-step processes, compensation logic, or saga orchestration.

Install

npx vskill@latest install dabydat/alpha-omega/nestjs-saga-pattern

SKILL.md

NestJS Saga Pattern

Sagas orchestrate long-running, multi-step business processes across multiple services. Unlike simple event handlers, sagas coordinate multiple steps and handle compensation for failures.

Why Sagas

See references/why-sagas.md for the INCORRECT (sync calls) vs CORRECT (event-driven saga with compensation) comparison.


Saga Anatomy

See references/saga-anatomy.md for the PaymentLinkCreatedEventSaga and AuthenticationSaga.


Saga vs Event Handler

AspectEvent HandlerSaga
TriggerSingle eventSingle or multiple events
OutputSide effectOne or more commands
Use caseNotify, syncOrchestrate multi-step process
CouplingDecoupledCoordinates multiple handlers
CompensationNot built-inCan implement rollback logic

Saga Patterns

See references/saga-patterns.md for the three patterns (simple, multiple, chained).


Compensation (Rollback) Patterns

See references/compensation.md for simple compensation and the state machine pattern.


Event Schema for Sagas

See references/event-schema.md (PaymentLinkCreatedEvent, PaymentLinkSendedEvent).


Module Registration

See references/module-registration.md.


Anti-Patterns to Avoid

See references/anti-patterns.md for the four ❌ examples.


Summary: Saga Responsibilities

PatternUse When
Event -> CommandSimple reaction to event
Event -> Multiple CommandsFan-out to parallel handlers
Chained CommandsSequential steps
Compensation SagaRollback on failure

Golden rule: Sagas orchestrate. Handlers do the work. Keep business logic out of sagas.


Reference Files

  • references/saga-examples.md - Full saga implementations including PaymentLinkCreatedEventSaga
  • references/saga-testing.md - Testing patterns for sagas

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
5

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/dabydat/alpha-omega/nestjs-saga-pattern/badge)](https://verified-skill.com/skills/dabydat/alpha-omega/nestjs-saga-pattern)

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