oban-essentials

Installation
SKILL.md

Oban Essentials

RULES — Follow these with no exceptions

  1. Always use Oban.Worker with explicit queue and max_attempts options
  2. Return {:ok, result} for success, {:error, reason} for retryable failures, {:cancel, reason} for permanent failures — never return bare :ok or raise
  3. Make workers idempotent — the same job may run more than once due to retries or node restarts
  4. Use unique option to prevent duplicate jobs — specify period, fields, and keys
  5. Test with Oban.Testing — use assert_enqueued and perform_job, never call perform/1 directly
  6. Never put large data in job args — store IDs and fetch fresh data in the worker
  7. Use Oban.insert/1 (not Oban.insert!/1) and handle the error tuple

Worker Definition

defmodule MyApp.Workers.SendWelcomeEmail do
  use Oban.Worker,
Related skills
Installs
1
GitHub Stars
118
First Seen
Apr 21, 2026