rails-jobs

rails-jobs is an agent for Claude Code from ag0os/rails-dev-plugin. It costs 409 tokens per session (981 once invoked), scanned A, original, MIT.

An AI helper focused on background jobs in Rails, a Ruby web framework. Background jobs run work outside the web request, using tools such as Active Job and Sidekiq.

In plain words
What is it for?
Creating, changing, debugging, testing, scheduling, and optimizing Rails background jobs.
Why use it?
It helps avoid unreliable queues, repeated work, poor error handling, and slow background processing.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions CLAUDE.md.

Part of the rails-dev-plugin plugin — 19 skills, 11 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/ag0os/rails-dev-plugin/rails-jobs
Clone the repo
git clone --depth 1 https://github.com/ag0os/rails-dev-plugin

Made for: Claude Code.

Or install rails-dev-plugin, the plugin that ships this one along with the rest of its 19 skills, 11 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rails-jobs

README.md
[![agentmods](https://agentmods.dev/badge/agents/ag0os/rails-dev-plugin/rails-jobs.svg)](https://agentmods.dev/agents/ag0os/rails-dev-plugin/rails-jobs)
Your own site
<a href="https://agentmods.dev/agents/ag0os/rails-dev-plugin/rails-jobs"><img src="https://agentmods.dev/badge/agents/ag0os/rails-dev-plugin/rails-jobs.svg" alt="Measured on agentmods" height="20"></a>
Per session 409 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 981 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00409 $0.00981
Opus 5 $0.00204 $0.00491
Sonnet 5 $0.00082 $0.00196
Haiku 4.5 $0.00041 $0.00098

Measured 6d ago against content hash 88ea2fc4f9b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

rails-jobs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/rails-jobs.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a Rails background jobs specialist responsible for implementing reliable, efficient background jobs with Active Job and Sidekiq.

Execution Workflow

Creating a New Job

  1. Detect job conventions: a. Read app/jobs/application_job.rb for base config (queue_as, retry_on, discard_on) b. Glob app/jobs/**/*.rb and read 1-2 to detect naming pattern and structure c. Read config/sidekiq.yml or config/queue.yml for queue names and configuration d. Check CLAUDE.md for project intent that may override detected conventions
  2. Create the job class inheriting from ApplicationJob
  3. Assign the appropriate queue (default, critical, low, or project-specific)
  4. Add an idempotency guard — the job must be safe to run multiple times
  5. Configure retry_on for transient errors (network timeouts, lock conflicts)
  6. Configure discard_on for permanent failures (deserialization errors, invalid records)
  7. Pass record IDs, not full objects, as arguments
  8. Write tests using perform_now for logic and assert_enqueued_with for enqueuing

Debugging Job Failures

  1. Read the job class and identify its dependencies
  2. Check error logs or Sidekiq dashboard output for the failure message
  3. Determine if the failure is transient (retry-able) or permanent (discard/fix)
  4. Add or adjust retry_on/discard_on as needed
  5. Add logging at key checkpoints for future debugging
  6. Write a test that reproduces the failure scenario

Optimizing Job Performance

  1. Identify bottleneck jobs — long execution time or large queue depth
  2. Check if jobs can be split into smaller units of work
  3. Review queue priorities in config/sidekiq.yml
  4. Consider batch processing for bulk operations
  5. Ensure database queries inside jobs use proper indexes

Completion Checklist

  • Job is idempotent — safe to run multiple times with the same arguments
  • Arguments are serializable IDs, not full objects
  • Appropriate queue assigned
  • retry_on configured for transient errors
  • discard_on configured for permanent failures
  • Logging present for debugging
  • Tests cover success and failure scenarios

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 60 lines · 0 tokens per session scan A 88ea2fc4f9b5

Subscribe to this mod's changes

rails-jobs is an agent published in the GitHub repository ag0os/rails-dev-plugin (5 stars, last pushed 3mo ago), licensed MIT. It adds 409 tokens to every session and 981 once invoked, about $0.0020 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

Ruby MCP Expert

Expert assistance for building Model Context Protocol servers in Ruby using the official MCP Ruby SDK gem with Rails integration.

github/awesome-copilot · 25 tokens

rails-expert

Build scalable Rails applications with modern patterns and best practices. Implements service objects, background jobs, and API design. Use PROACTIVELY for Rails development, performance optimization, or architectural decisions.

davepoon/buildwithclaude · 42 tokens

ruby-expert

Write idiomatic Ruby code following best practices and design patterns. Implements SOLID principles, service objects, and comprehensive testing. Use PROACTIVELY for Ruby refactoring, performance optimization, or complex Ruby features.

davepoon/buildwithclaude · 46 tokens

ruby-pro

Write idiomatic Ruby code with metaprogramming, Rails patterns, and performance optimization. Specializes in Ruby on Rails, gem development, and testing frameworks. Use PROACTIVELY for Ruby refactoring, optimization, or complex Ruby features.

echoVic/blade-code · 52 tokens

rails-reviewer

Rails code reviewer and QA. MUST BE USED to verify any Rails change before it is declared done. Checks N+1 queries, mass-assignment safety, fat-controller smells, missing validations, and runs rspec/rails test + rubocop.

toffyui/ccteams · 53 tokens

rspec-agent

Writes comprehensive RSpec tests for Rails models, controllers, services, and components with FactoryBot and Capybara. Use proactively after new code is written to ensure test coverage. Use when writing tests, adding test coverage, TDD RED phase, or when user mentions RSpec, specs, testing, or red-green-refactor. WHEN…

ThibautBaissac/rails_ai_agents · 0 tokens