CtrlK
BlogDocsLog inGet started
Tessl Logo

igmarin/rails-agent-skills

Curated library of 39 AI agent skills for Ruby on Rails development. Organized by category: planning, testing, code-quality, ddd, engines, infrastructure, api, patterns, context, orchestration, and workflows. Includes 5 callable workflow skills (rails-tdd-loop, rails-review-flow, rails-setup-flow, rails-quality-flow, rails-engines-flow) for complete development cycles. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and TDD automation.

95

1.20x
Quality

98%

Does it follow best practices?

Impact

95%

1.20x

Average score across 35 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

job_patterns.mdskills/infrastructure/rails-background-jobs/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