oban-essentials
Installation
SKILL.md
Oban Essentials
RULES — Follow these with no exceptions
- Always
use Oban.Workerwith explicitqueueandmax_attemptsoptions - Return
{:ok, result}for success,{:error, reason}for retryable failures,{:cancel, reason}for permanent failures — never return bare:okor raise - Make workers idempotent — the same job may run more than once due to retries or node restarts
- Use
uniqueoption to prevent duplicate jobs — specifyperiod,fields, andkeys - Test with
Oban.Testing— useassert_enqueuedandperform_job, never callperform/1directly - Never put large data in job args — store IDs and fetch fresh data in the worker
- Use
Oban.insert/1(notOban.insert!/1) and handle the error tuple
Worker Definition
defmodule MyApp.Workers.SendWelcomeEmail do
use Oban.Worker,
Related skills
More from j-morgan6/elixir-phoenix-guide
phoenix-json-api
MANDATORY for ALL JSON API work. Invoke before writing API controllers, pipelines, or JSON responses.
1ecto-essentials
MANDATORY for ALL database work. Invoke before modifying schemas, queries, or migrations.
1otp-essentials
MANDATORY for ALL OTP work. Invoke before writing GenServer, Supervisor, Task, or Agent modules.
1code-quality
Automated code quality detection — duplication, complexity, unused functions. Invoke when analyzing or refactoring Elixir code.
1phoenix-uploads
MANDATORY for file upload features. Invoke before implementing upload or file serving functionality.
1testing-essentials
MANDATORY for ALL test files. Invoke before writing any _test.exs file.
1