async-job-design

Design asynchronous jobs with idempotency keys, retry policies, and DLQ handling.

4|Updated May 16, 2026
One-click install
npx skills add https://github.com/machenjie/rd-skills --skill async-job-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: async-job-design
Source: https://github.com/machenjie/rd-skills/tree/main/src/foundation/capabilities/async-job-design
Command: npx skills add https://github.com/machenjie/rd-skills --skill async-job-design

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Prevents asynchronous background work from silently failing or causing duplicate side effects by making delivery, retries, timeouts, cancellation, observability, and failure handling explicit and testable.

Core Features & Use Cases

  • Idempotent job design: Defines how to derive an idempotency key, store replay outcomes, and handle conflicts when duplicates arrive.
  • Bounded reliability: Specifies transient vs permanent vs rate-limited vs poison-message failure classes with capped retry attempts and exponential backoff with full jitter.
  • Operational readiness: Requires structured logs, core metrics, DLQ/quarantine strategy, owner/runbook/alerts, and cancellation + compensation where side effects span steps.
  • Use case: Designing a queue worker or workflow that processes event-driven business side effects (e.g., webhooks, fan-out tasks, backfills) without duplicate charges, emails, or inconsistent state.

Quick Start

Ask for a production-ready async job design that covers idempotency, retry/backoff, timeouts, DLQ quarantine, observability fields, cancellation semantics, and compensation for multi-step side effects.

Frequently Asked Questions about async-job-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design async jobs to prevent duplicate side effects during retries?

Design async jobs with explicit idempotency keys to prevent duplicate side effects during retries. Store replay outcomes and handle conflicts when duplicates arrive to ensure workloads like queue workers remain safe under duplicate delivery.

What is the best way to handle poison messages in asynchronous queue workers?

The best way to handle poison messages in asynchronous queue workers is implementing a DLQ quarantine strategy. Classify failures as transient, permanent, rate-limited, or poison messages to isolate unrecoverable payloads and prevent infinite retry loops.

How does exponential backoff with full jitter work for retry policies?

Exponential backoff with full jitter works for retry policies by applying randomized delay intervals to prevent thundering herds. Bounded reliability specifies capped retry attempts with full jitter to safely manage transient failures in event consumers.

When do I need compensation contracts for long-running workflows?

You need compensation contracts for long-running workflows when side effects span multiple steps. Define explicit cancellation and compensation semantics to ensure recoverable outcomes and maintain consistent state across partial failures in durable workflows.

How do I add observability to background jobs processing event-driven side effects?

Add observability to background jobs by enforcing structured logs, core metrics, and alert configurations. Operational readiness requires defining owner runbooks and monitoring fields to track asynchronous work processing event-driven business side effects.

Can I use this approach for scheduled jobs and backfills without inconsistent state?

Yes, you can use this approach for scheduled jobs and backfills without inconsistent state. The design enforces versioned payload semantics and a durable status model to handle version skew and ensure recoverable outcomes across all asynchronous tasks.