oban
Use when writing, scheduling, testing or debugging Oban jobs, even for a how-to question: workers, cron, retries, unique jobs, queues, Pro Workflow/Batch. Load it before touching job code; it holds the job rules.
Install / Use
npx skills add oliver-kriska/claude-elixir-phoenix --skill obanInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Our assessment of oban
oban scores 85/100 on our quality scale, 1698th of 2,853 Automation skills we index.
Its SKILL.md is 4.1 KB long, well organised into 12 sections with 3 code examples: a solid amount of guidance for an agent.
It has 560 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated 2 days ago, so oban is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
oban compared with similar skills
All 4 of these similar skills score higher than oban; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| oban (this skill)by oliver-kriska | 85 | 560 | 2d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 89.8k | 18d ago | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 85.5k | today | MCP Server |
| rufloby ruvnet | 100 | 73.8k | today | MCP Server |
| algorithmic-artby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
Frequently asked questions
- How do I install oban?
- Run
npx skills add oliver-kriska/claude-elixir-phoenix --skill oban. The install tabs above show the steps for each supported agent. - Which AI agents does oban work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is oban safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is oban still maintained?
- The repository was last updated 2 days ago, so oban is actively maintained.
Skill content
View source on GitHubname: oban description: "Use when writing, scheduling, testing or debugging Oban jobs, even for a how-to question: workers, cron, retries, unique jobs, queues, Pro Workflow/Batch. Load it before touching job code; it holds the job rules." effort: medium user-invocable: false paths:
- "/workers//*.ex"
- "**/*_worker.ex"
- "**/*_worker_test.exs"
- "**/*_job.ex"
Oban Background Jobs Reference
Quick reference for Elixir Oban patterns.
Oban Pro Detection
Before applying patterns, check for Oban Pro:
grep -E "oban_pro|oban_web" mix.exs
grep -r "use Oban.Pro.Worker" lib/
grep -r "Oban.Pro.Engines.Smart" config/
If Oban Pro detected, use Pro patterns for ALL new workers:
| Standard Oban | Oban Pro |
|---------------|----------|
| use Oban.Worker | use Oban.Pro.Worker |
| def perform(%Job{}) | def process(%Job{}) |
| Oban.Testing | Oban.Pro.Testing |
| Advisory lock engine | Oban.Pro.Engines.Smart |
Pro features (all optional): args_schema (typed args), Workflows, Batches, Chunks,
Relay, hooks, encryption, deadlines, chaining, Smart Engine (global concurrency + rate limiting).
Pro plugins (DynamicCron, DynamicLifeline, DynamicPruner) enhance OSS equivalents — swap module, don't run both.
See ${CLAUDE_SKILL_DIR}/references/oban-pro-basics.md for all patterns and migration guide.
Iron Laws — Never Violate These
- JOBS MUST BE IDEMPOTENT — Safe to retry. Use idempotency keys for payments
- JOBS MUST STORE IDs, NOT STRUCTS — JSON serialization.
%{user_id: 1}not%{user: %User{}} - JOBS MUST HANDLE ALL RETURN VALUES —
:ok,{:error, _},{:cancel, _},{:snooze, _} - ARGS USE STRING KEYS — Pattern match
%{"user_id" => id}not%{user_id: id} - UNIQUE CONSTRAINTS FOR USER ACTIONS — Prevent double-click duplicates
- NEVER STORE LARGE DATA IN ARGS — Store references (IDs, paths), not content
- SMART ENGINE: NEVER USE
attemptTO LIMIT SNOOZES — Snooze rolls back attempt counter. Usemeta["snoozed"]instead. Causes infinite loops
Quick Worker Template
defmodule MyApp.Workers.ExampleWorker do
use Oban.Worker,
queue: :default,
max_attempts: 5,
unique: [period: {5, :minutes}, keys: [:entity_id]]
@impl Oban.Worker
def perform(%Oban.Job{args: %{"entity_id" => id}}) do
case process(id) do
{:ok, _} -> :ok
{:error, :not_found} -> {:cancel, "Entity not found"}
{:error, :rate_limited} -> {:snooze, {5, :minutes}}
{:error, reason} -> {:error, reason}
end
end
end
Return Value Meanings
| Return | State | Behavior |
|--------|-------|----------|
| :ok | completed | Success |
| {:ok, value} | completed | Success with value |
| {:error, reason} | retryable | Retry with backoff |
| {:cancel, reason} | cancelled | Stop permanently |
| {:snooze, seconds} | scheduled | Delay and retry |
Quick Decisions
Which Queue?
- Critical operations → High concurrency (20+)
- Mailers/Webhooks (I/O) → Medium concurrency (30-50)
- CPU-intensive → Low concurrency (3-5)
- External APIs → Use
dispatch_cooldownfor rate limiting
Testing Pattern
use Oban.Testing, repo: MyApp.Repo
# Assert enqueued
assert_enqueued worker: MyApp.Worker, args: %{id: 1}
# Execute and verify
assert :ok = perform_job(MyApp.Worker, %{id: 1})
Common Anti-patterns
| Wrong | Right |
|-------|-------|
| %{user_id: id} pattern match | %{"user_id" => id} (string keys) |
| %{user: %User{}} in args | %{user_id: 1} (IDs only) |
| No idempotency for payments | Use idempotency keys |
| Ignoring return values | Handle all outcomes explicitly |
References
For detailed patterns, see:
${CLAUDE_SKILL_DIR}/references/worker-patterns.md- Worker options, backoff, timeout${CLAUDE_SKILL_DIR}/references/queue-config.md- Queue design, pool sizing, cron, Smart Engine${CLAUDE_SKILL_DIR}/references/testing-patterns.md- Testing, assertions, drain (OSS + Pro)${CLAUDE_SKILL_DIR}/references/oban-pro-basics.md- Pro.Worker, Workflow, Batch, Chunk, Relay, plugins
Related Skills
Agent-Reach
89.8kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Scrapling
85.5k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
ruflo
73.8k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
