CtrlK
BlogDocsLog inGet started
Tessl Logo

igmarin/rails-agent-skills

Curated library of 28 public AI agent skills for Ruby on Rails development. Organized by category: testing, code-quality, engines, infrastructure, api, and context. Covers code review, architecture, security, testing (RSpec), engines, Hotwire, and TDD automation. Shared Ruby skills (YARD docs, DDD, service objects) have moved to ruby-core-skills. Repository agents remain documented in GitHub but are intentionally excluded from the Tessl tile.

93

1.78x
Quality

95%

Does it follow best practices?

Impact

93%

1.78x

Average score across 28 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

job_patterns.mdskills/infrastructure/implement-background-job/assets/

Background Jobs Patterns

Guidance for creating robust background jobs in Rails (Active Job + Sidekiq-friendly patterns).

  1. Use ActiveJob with an adapter (Sidekiq recommended for scale)

  2. Idempotency

  • Ensure each job is idempotent. Use a unique job key or a database guard if needed.
  1. Retry/Discard strategy
  • Use retry_on StandardError, attempts: 5, wait: :exponentially_longer for transient errors
  • Use discard_on ActiveRecord::RecordNotFound for permanent errors
  1. Partial work and continuation
  • Break large work into smaller jobs (fan-out/fan-in pattern)
  1. Logging and observability
  • Log job start/end and key metadata (job_id, args summary)
  • Capture failures to Sentry or similar with context
  1. Resource limits
  • Avoid large in-memory arrays; stream or use batch processing
  1. Testing
  • Use inline adapter in tests and assert perform_enqueued_jobs or perform_enqueued_jobs with block

Example job skeleton:

class SyncUserJob < ApplicationJob queue_as :default retry_on Net::OpenTimeout, attempts: 3, wait: :exponentially_longer discard_on ActiveRecord::RecordNotFound

def perform(user_id) user = User.find(user_id) ExternalService.sync(user) rescue StandardError => e Rails.logger.error("SyncUserJob failed: #{e.message}") raise end end

skills

infrastructure

README.md

tile.json