dabydat/alpha-omega/nestjs-saga-pattern
Claude Code and agent skill by dabydat/alpha-omega
- community
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-patternSKILL.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
| Aspect | Event Handler | Saga | |
|---|---|---|---|
| Trigger | Single event | Single or multiple events | |
| Output | Side effect | One or more commands | |
| Use case | Notify, sync | Orchestrate multi-step process | |
| Coupling | Decoupled | Coordinates multiple handlers | |
| Compensation | Not built-in | Can 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
| Pattern | Use When | |
|---|---|---|
| Event -> Command | Simple reaction to event | |
| Event -> Multiple Commands | Fan-out to parallel handlers | |
| Chained Commands | Sequential steps | |
| Compensation Saga | Rollback 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 PaymentLinkCreatedEventSagareferences/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
- SKILL.md in the repositoryCheckingskills/nestjs/nestjs-saga-pattern/SKILL.md
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
[](https://verified-skill.com/skills/dabydat/alpha-omega/nestjs-saga-pattern)