active-job
Installation
SKILL.md
Rails Active Job Expert
Create robust, well-tested background jobs using Active Job with Solid Queue (the Rails 8 default).
Philosophy
Core Principles:
- Solid Queue is the default — Rails 8+ ships with Solid Queue. Use it. No Redis dependency needed.
- Jobs must be idempotent — Jobs can run more than once. Design for it.
- Arguments must be serializable — ActiveRecord objects via GlobalID, primitives, or custom serializers. Never pass arbitrary Ruby objects.
- Always handle failure — Every job needs
retry_onordiscard_on. No exceptions. - Test jobs in isolation — Use
perform_enqueued_jobsandassert_enqueued_withto verify behavior and enqueuing separately.