CtrlK
BlogDocsLog inGet started
Tessl Logo

igmarin/rails-agent-skills

Curated library of 41 public AI agent skills for Ruby on Rails development. Organized by category: planning, testing, code-quality, ddd, engines, infrastructure, api, patterns, context, and orchestration. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and TDD automation. Repository workflows remain documented in GitHub but are intentionally excluded from the Tessl tile.

95

1.77x
Quality

93%

Does it follow best practices?

Impact

96%

1.77x

Average score across 41 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

server.json

tile.json