تفشل سير العمل الموزعة عندما لا تتنسيق الخطوات أو تتدحرج بشكل نظيف. توفر هذه المهارة أنماط Saga واضحة وقوالب لتنسيق الخطوات والتعويضات للمعاملات الموثوقة متعددة الخدمات.
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「saga-orchestration」。 Design an order fulfillment saga with compensations and timeouts.
預期結果:
- Steps: reserve inventory, process payment, create shipment, send confirmation.
- Compensations: release inventory, refund payment, cancel shipment.
- Timeout policy: fail step after 5 minutes and start compensation.
- Events: SagaStepCompleted, SagaStepFailed, SagaCompensationCompleted.
正在使用「saga-orchestration」。 Compare orchestration and choreography for payment processing.
預期結果:
- Orchestration: central orchestrator sends commands, receives responses.
- Choreography: services emit events, others subscribe and react.
- Orchestration benefits: explicit flow, easier debugging, clear ownership.
- Choreography benefits: loose coupling, no single point of failure.
正在使用「saga-orchestration」。 How do I handle a saga step that never completes?
預期結果:
- Implement per-step timeouts in the orchestrator.
- On timeout, mark step as failed and trigger compensation.
- Use scheduled tasks to check step status periodically.
- Log timeout events for monitoring and alerting.
安全審計
安全Pure documentation skill containing code templates for saga pattern implementation. Contains no executable code, filesystem access, network calls, or command execution. All static findings are false positives triggered by documentation text containing technical terminology that scanners incorrectly flag as cryptographic terms, C2 indicators, or shell commands.
風險因素
品質評分
你能建構什麼
سير عمل تنفيذ الطلبات
تصميم سير عمل طلبات متعدد الخدمات مع خطوات التعويضات ومعالجة الأعطال.
الموافقات طويلة المدى
نمذجة سير عمل الموافقات مع سلوك المهلات والرجوع.
مراجعة نمط Saga
محاذاة الفرق على مفاضلات التنسيق مقابل التوزيع.
試試這些提示
تصميم تنسيق Saga للدفع مع خطوات المخزون والدفع والشحن. تضمين التعويضات وحالات الانتقال.
تمديد منسق Saga مع مهلة لكل خطوة ومعالجة الأعطال. وصف كيفية تشغيل التعويضات عند انتهاء المهلة.
توفير Saga قائمة على التنسيق لمعالجة الطلبات وسرد أسماء الأحداث والمعالجات.
مسودة خطة Saga لتدفق استلام متعدد المراحل مع إعادة المحاولات والتعويضات وتوجيه تسجيل التدقيق.
最佳實務
- اجعل الخطوات قابلة للتكرار بأمان لإعادة المحاولة
- صمم تعويضات لكل إجراء لا رجعة فيه
- استخدم معرافات الارتباط للتتبع عبر الخدمات
避免
- افتراض إكتمال الخطوات فوراً
- تخطي اختبار التعويضات
- اقتران الخدمات بشكل وثيق مع استدعاءات مباشرة
常見問題
هل هذا متوافق مع Claude وCodex وClaude Code؟
ما حدود هذه المهارة؟
كيف يمكنني التكامل مع ناقل الرسائل الخاص بي؟
هل تصل هذه المهارة إلى بياناتي أو أسراري؟
ماذا يجب أن أتحقق منه إذا لم تكتمل الخطوات أبداً؟
كيف يقارن هذا مع التنسيق فقط؟
開發者詳情
作者
wshobson授權
MIT
儲存庫
https://github.com/wshobson/agents/tree/main/plugins/backend-development/skills/saga-orchestration引用
main
檔案結構
📄 SKILL.md